Compare commits

...

3 Commits

2 changed files with 28 additions and 5 deletions

View File

@ -681,21 +681,27 @@ table.markdown {
border: 2px solid var(--text-1); border: 2px solid var(--text-1);
} }
.markdown thead { table.markdown thead {
background-color: var(--background-2); background-color: var(--background-2);
color: var(--text-2); color: var(--text-2);
border-bottom: 2px solid var(--text-1);
} }
.markdown th, table.markdown th,
.markdown td { table.markdown td {
padding: 8px; padding: 8px;
} }
.markdown tbody tr:nth-child(odd) { table.markdown th + th,
table.markdown td + td {
border-left: 2px solid var(--text-1);
}
table.markdown tbody tr:nth-child(odd) {
background-color: var(--background-0); background-color: var(--background-0);
color: var(--text-0); color: var(--text-0);
} }
.markdown tbody tr:nth-child(even) { table.markdown tbody tr:nth-child(even) {
background-color: var(--background-1); background-color: var(--background-1);
color: var(--text-1); color: var(--text-1);
} }

View File

@ -0,0 +1,17 @@
{{ $path := "" }}
{{ $markdown := false }}
{{ if .IsNamedParams }}
{{ $path = .Get "path" }}
{{ with .Get "markdown" }}
{{ $markdown = . }}
{{ end }}
{{ else }}
{{ $path = .Get 0 }}
{{ end }}
{{ if $markdown }}
{{ $path | readFile | markdownify }}
{{ else }}
{{ $path | readFile }}
{{ end }}