Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions assets/css/_page/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,9 @@
}
}

table {
width: 100%;
max-width: 100%;
margin: .625rem 0;
border-spacing: 0;
background: $table-background-color;
border-collapse: collapse;
.table-wrapper {
overflow-x: auto;
margin: .625rem 0;

&::-webkit-scrollbar {
background-color: $table-background-color;
Expand All @@ -183,6 +178,15 @@
background-color: $table-background-color-dark;
}
}
}

table {
width: 100%;
max-width: 100%;
margin: .625rem 0;
border-spacing: 0;
background: $table-background-color;
border-collapse: collapse;

[theme=dark] & {
background: $table-background-color-dark;
Expand Down
2 changes: 1 addition & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[module]
[module.hugoVersion]
min = "0.128.0"
min = "0.134.0"

[params]
# site default theme ["auto", "light", "dark"]
Expand Down
1 change: 1 addition & 0 deletions layouts/_markup/render-table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- partial "plugin/table.html" . -}}
25 changes: 25 additions & 0 deletions layouts/_partials/plugin/table.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div class="table-wrapper">
<table
{{- range $k, $v := .Attributes }}
{{- printf " %s=%q" $k $v | safeHTMLAttr -}}
{{- end }}>
<thead>
{{- range .THead }}
<tr>
{{- range . }}
<th{{ with .Alignment }} style="text-align: {{ . }}"{{ end }}>{{ .Text }}</th>
{{- end }}
</tr>
{{- end }}
</thead>
<tbody>
{{- range .TBody }}
<tr>
{{- range . }}
<td{{ with .Alignment }} style="text-align: {{ . }}"{{ end }}>{{ .Text }}</td>
{{- end }}
</tr>
{{- end }}
</tbody>
</table>
</div>
2 changes: 1 addition & 1 deletion theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ features = [
"SEO Optimized"
]

min_version = "0.128.0"
min_version = "0.134.0"

[author]
name = "Dillon"
Expand Down