mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-04 11:07:32 -05:00
Compare commits
1 Commits
c9095e948b
...
wip-print-
Author | SHA1 | Date | |
---|---|---|---|
fa1fb5d0ba
|
@ -248,31 +248,31 @@ hr {
|
||||
}
|
||||
}
|
||||
|
||||
table.simple {
|
||||
table.markdown {
|
||||
border-collapse: collapse;
|
||||
border: 2px solid var(--text-1);
|
||||
}
|
||||
|
||||
table.simple thead {
|
||||
table.markdown thead {
|
||||
background-color: var(--background-2);
|
||||
color: var(--text-2);
|
||||
border-bottom: 2px solid var(--text-1);
|
||||
}
|
||||
|
||||
table.simple th,
|
||||
table.simple td {
|
||||
table.markdown th,
|
||||
table.markdown td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
table.simple :is(th, td) + :is(th, td) {
|
||||
table.markdown :is(th, td) + :is(th, td) {
|
||||
border-left: 2px solid var(--text-1);
|
||||
}
|
||||
|
||||
table.simple tbody tr:nth-child(odd) {
|
||||
table.markdown tbody tr:nth-child(odd) {
|
||||
background-color: var(--background-0);
|
||||
color: var(--text-0);
|
||||
}
|
||||
table.simple tbody tr:nth-child(even) {
|
||||
table.markdown tbody tr:nth-child(even) {
|
||||
background-color: var(--background-1);
|
||||
color: var(--text-1);
|
||||
}
|
||||
@ -641,7 +641,7 @@ h1 svg.icon {
|
||||
/* Content (single) formatting {{{ */
|
||||
|
||||
.series-box {
|
||||
background-color: var(--background-1);
|
||||
background-color: var(--background-1); /* remember to update print styling */
|
||||
color: var(--text-1);
|
||||
padding: 8px 16px;
|
||||
border-radius: 8px;
|
||||
@ -649,7 +649,7 @@ h1 svg.icon {
|
||||
}
|
||||
|
||||
.table-of-contents {
|
||||
background-color: var(--background-1);
|
||||
background-color: var(--background-1); /* remember to update print styling */
|
||||
color: var(--text-1);
|
||||
padding: 8px 20px;
|
||||
border-radius: 8px;
|
||||
@ -704,7 +704,7 @@ h1 svg.icon {
|
||||
|
||||
/* See also formating */
|
||||
.see-also {
|
||||
background-color: var(--background-1);
|
||||
background-color: var(--background-1); /* remember to update print styling */
|
||||
color: var(--text-1);
|
||||
padding: 8px 12px;
|
||||
border-radius: 8px;
|
||||
@ -770,14 +770,14 @@ h1 svg.icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 16px 0;
|
||||
background-color: var(--background-1);
|
||||
background-color: var(--background-1); /* remember to update print styling */
|
||||
border-radius: 8px;
|
||||
}
|
||||
.code-block > .code-header {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
background-color: var(--background-2);
|
||||
background-color: var(--background-2); /* remember to update print styling */
|
||||
padding: 4px 8px;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
@ -857,6 +857,7 @@ aside {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* remember to update print styling for all the following asides */
|
||||
aside.note {
|
||||
background-color: var(--background-blue-1);
|
||||
}
|
||||
@ -972,6 +973,19 @@ aside.quote {
|
||||
.table-of-contents.print {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* replace background colors with borders {{{ */
|
||||
.series-box {
|
||||
}
|
||||
.table-of-contents {
|
||||
}
|
||||
.see-also {
|
||||
}
|
||||
.code-block {
|
||||
}
|
||||
.code-block > .code-header {
|
||||
}
|
||||
/* all the asides */
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
@ -4,23 +4,15 @@ defaultContentLanguage: en
|
||||
copyright: '© 2021 bbaovanc <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>'
|
||||
sectionPagesMenu: main
|
||||
enableRobotsTXT: true
|
||||
paginate: 5
|
||||
enableGitInfo: true
|
||||
|
||||
pagination:
|
||||
pagerSize: 5
|
||||
|
||||
taxonomies:
|
||||
_merge: deep
|
||||
|
||||
markup: # this just keeps the bobatheme markup styling
|
||||
_merge: deep
|
||||
|
||||
outputs:
|
||||
_merge: deep
|
||||
|
||||
outputFormats:
|
||||
_merge: deep
|
||||
|
||||
params:
|
||||
author:
|
||||
name: bbaovanc
|
||||
|
15
hugo.yaml
15
hugo.yaml
@ -2,12 +2,6 @@ markup:
|
||||
highlight:
|
||||
noClasses: false
|
||||
lineNos: true
|
||||
goldmark:
|
||||
parser:
|
||||
attribute:
|
||||
block: true
|
||||
# this is enabled by default already
|
||||
#title: true
|
||||
|
||||
params:
|
||||
readingtime: true
|
||||
@ -18,15 +12,6 @@ taxonomies:
|
||||
author: authors
|
||||
series: series
|
||||
|
||||
outputs:
|
||||
page:
|
||||
- html
|
||||
- markdown
|
||||
|
||||
outputFormats:
|
||||
markdown:
|
||||
ugly: true
|
||||
|
||||
privacy:
|
||||
googleAnalytics:
|
||||
disable: true
|
||||
|
@ -30,9 +30,6 @@ readingtime:
|
||||
edit_history:
|
||||
other: "Edit history"
|
||||
|
||||
view_markdown:
|
||||
other: "View raw"
|
||||
|
||||
|
||||
# Post count
|
||||
no_posts:
|
||||
@ -70,9 +67,6 @@ aria_rss_link:
|
||||
aria_post_meta_edit_history:
|
||||
other: "link to page edit history"
|
||||
|
||||
aria_post_meta_view_markdown:
|
||||
other: "link to view raw markdown code of page"
|
||||
|
||||
aria_post_meta_categories:
|
||||
other: "categories"
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
{{ with .File -}}
|
||||
{{ with (.Path | readFile) -}}
|
||||
{{ . -}}
|
||||
{{ else -}}
|
||||
{{ errorf "file not found: %s" .Path -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ errorf "no file available for markdown template?" -}}
|
||||
{{ end -}}
|
@ -1,8 +0,0 @@
|
||||
{{ with .OutputFormats.Get "markdown" }}
|
||||
<span class="page-metadata-item post-meta-view-markdown" aria-label="{{ i18n "aria_post_meta_view_markdown" }}">
|
||||
{{ partial "icon.html" "code" }}
|
||||
<a href="{{ .Permalink }}" target="_blank">
|
||||
{{- i18n "view_markdown" -}}
|
||||
</a>
|
||||
</span>
|
||||
{{ end }}
|
@ -20,10 +20,7 @@
|
||||
{{ partial "page-metadata/item/authors.html" . }}
|
||||
{{ partial "page-metadata/item/readingtime.html" . }}
|
||||
{{ partial "page-metadata/item/edithistory.html" . }}
|
||||
{{ partial "page-metadata/item/viewraw.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/categories.html" . }}
|
||||
|
||||
{{ partial "page-metadata/item/tags.html" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -24,6 +24,6 @@
|
||||
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
||||
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
||||
|
||||
{{ with .Site.Params.social.twitter }}
|
||||
{{ with .Site.Social.twitter }}
|
||||
<meta name="twitter:site" content="@{{ . }}">
|
||||
{{ end }}
|
||||
|
10
layouts/shortcodes/table.html
Normal file
10
layouts/shortcodes/table.html
Normal file
@ -0,0 +1,10 @@
|
||||
{{/* See https://willschenk.com/articles/2020/styling_tables_with_hugo/ */}}
|
||||
|
||||
{{ $class := "markdown" }}
|
||||
{{ with .Get "class" }}
|
||||
{{ $class = delimit (slice $class .) " " }}
|
||||
{{ end }}
|
||||
|
||||
{{ $htmlTable := .Inner | .Page.RenderString (dict "display" "block") }}
|
||||
{{ $new := printf `<table class="%s">` $class }}
|
||||
{{ (replace $htmlTable "<table>" $new) | safeHTML }}
|
Reference in New Issue
Block a user