From 7bc8a4cb57667443cfabd9144e71f6a083030c56 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Fri, 24 Mar 2023 08:49:02 -0500 Subject: [PATCH] Clean up CSS - Add vim folds to make organized sections - Rename a lot of classes from post- to page- - Generalize series CSS classes better - Clean up navbar div structure - Remove langpicker and most of multilingual support - many other minor tweaks --- assets/css/bobastyle.css | 1190 ++++++++--------- data/meses.yml | 12 - exampleSite/config.yaml | 7 - i18n/en.yaml | 13 +- i18n/es.yaml | 149 --- layouts/_default/_markup/render-heading.html | 6 +- layouts/_default/baseof.html | 4 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 4 +- layouts/_default/summary.html | 8 +- layouts/authors/list.html | 2 +- layouts/authors/summary.html | 24 +- layouts/authors/term.html | 4 +- layouts/partials/page-list.html | 2 +- .../author.html | 6 +- .../item}/authors.html | 2 +- .../item}/categories.html | 2 +- .../item}/edithistory.html | 2 +- .../item}/readingtime.html | 2 +- .../item}/series.html | 2 +- .../item}/tags.html | 2 +- .../post-full.html} | 19 +- .../partials/page-metadata/post-short.html | 18 + .../series.html | 8 +- .../taxonomy.html | 0 .../partials/post-meta-item/translations.html | 8 - layouts/partials/post-metadata/short.html | 19 - layouts/partials/top.html | 63 +- layouts/series/list.html | 8 +- layouts/series/summary.html | 12 +- layouts/series/term.html | 2 +- layouts/taxonomy/list.html | 4 +- layouts/taxonomy/term.html | 4 +- 33 files changed, 674 insertions(+), 936 deletions(-) delete mode 100644 data/meses.yml delete mode 100644 i18n/es.yaml rename layouts/partials/{post-metadata => page-metadata}/author.html (61%) rename layouts/partials/{post-meta-item => page-metadata/item}/authors.html (85%) rename layouts/partials/{post-meta-item => page-metadata/item}/categories.html (74%) rename layouts/partials/{post-meta-item => page-metadata/item}/edithistory.html (71%) rename layouts/partials/{post-meta-item => page-metadata/item}/readingtime.html (62%) rename layouts/partials/{post-meta-item => page-metadata/item}/series.html (74%) rename layouts/partials/{post-meta-item => page-metadata/item}/tags.html (74%) rename layouts/partials/{post-metadata/full.html => page-metadata/post-full.html} (54%) create mode 100644 layouts/partials/page-metadata/post-short.html rename layouts/partials/{post-metadata => page-metadata}/series.html (70%) rename layouts/partials/{post-metadata => page-metadata}/taxonomy.html (100%) delete mode 100644 layouts/partials/post-meta-item/translations.html delete mode 100644 layouts/partials/post-metadata/short.html diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index ff071e5..f28be57 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -1,7 +1,11 @@ /* bobatheme is available under the MIT license at * https://github.com/BBaoVanC/bobatheme. + * + * vim: foldmethod=marker */ +/* Color palette {{{ */ + :root { --background-0: #111111; /* lch(5, 0, X) */ --background-1: #212121; /* lch(12.5, 0, X) */ @@ -117,9 +121,10 @@ } } +/* }}} */ +/* Fonts {{{ */ -/* Fonts */ @font-face { font-family: "Open Sans"; font-display: swap; @@ -131,6 +136,7 @@ font-display: swap; src: url("../font/jetbrainsmono/JetBrainsMono_wght-e190ee6595a3b9bd25278613a6f5d3766ee1a708f300ed44fa63dbe84051498f.woff2") format("woff2"); } + :root { --font-sans: "Open Sans", "Noto Sans", sans-serif; --font-mono: JetBrainsMono, monospace; @@ -150,453 +156,10 @@ pre > code { font-size: unset; } +/* }}} */ +/* Basic elements {{{ */ -/* Post layout (in list pages) */ -.list-page-content { - display: flex; - flex-direction: column; - gap: 40px; -} - -.page-list, -.series-taxonomy-list { - display: flex; - flex-direction: column; - list-style: none; - padding: 0; - gap: 40px; -} - -.series-taxonomy-list { - gap: 80px; -} - -.page-list .post, -.series-taxonomy-list .series-taxonomy, -.series-taxonomy .post { - padding: 24px; - border-radius: 12px; - background-color: var(--background-1); - color: var(--text-1); -} - -.post > .post-title, -.series-taxonomy > .post-title, -.author > .author-name { - margin-top: 0; -} - -/* hugo just can't handle this feature -.post-series-position { - position: relative; - float: right; - opacity: .75; -} -*/ - -.post-title, -.author-name { - margin-bottom: 10px; -} - -.post-title h1, -.author-name h1 { - margin: 0; -} - -.post-title a, -.author-name a { - color: inherit; - text-decoration: inherit; -} - -.post-meta-item, -.author-meta-item { - margin-right: 10px; - display: inline-block; -} - -.post-metadata, -.author-metadata { - margin-bottom: 24px; -} - -.categories, -.tags, -.series { - margin-top: 10px; -} - -.post-media { - margin-top: 15px; -} - -.post-description, -.author-description { - margin-top: 10px; -} - -.readmore { - margin-top: 5px; -} - - - -/* Taxonomy list format */ -.taxonomy-list a, -.taxonomy-list .taxonomy-metadata { - white-space: nowrap; -} - -.taxonomy-list p { - margin: 0; -} - -.taxonomy-list { - list-style: none; - padding: 0; - display: flex; - flex-direction: column; - gap: 10px; -} - -.taxonomy-list .taxonomy-term { - background-color: var(--background-1); - color: var(--text-1); - padding: 8px 12px; - border-radius: 8px; - display: flex; - flex-direction: row; - gap: 20px; -} - -.taxonomy-list-left { - display: flex; - flex-direction: column; -} - -@media (max-width: 480px) { - .taxonomy-list .taxonomy-term { - flex-direction: column; - gap: 4px; - } - - .taxonomy-list-left { - flex-direction: row; - justify-content: space-between; - } -} - - - -/* Series list format */ -.series-page-list { - display: flex; - gap: 10px; - flex-flow: row wrap; - list-style: none; - background-color: var(--background-0); - color: var(--text-0); - padding: 8px; - border-radius: 16px; -} - -.series-page-list .post { - flex: 1; - min-width: 49%; -} - - - -/* Subsection formatting */ -.sections { - display: flex; - flex-direction: column; - gap: 10px; -} - -.section { - background-color: var(--background-1); - color: var(--text-1); - border-radius: 12px; - padding: 1px 25px; -} - -.section:hover { - background-color: var(--background-2); - color: var(--text-2); -} - -.section-title { - margin: 10px 0; -} - -.section-anchor { - color: inherit; -} - -.section-anchor:hover { - text-decoration: none; -} - -.section-description { - margin-bottom: 5px; -} - -.view-section { - margin-top: 5px; -} - - - -/* Header formatting (website title and article section headers) */ -.header { - margin: 16px 0; -} - -.header a, -.section-header a { - color: inherit; - font-size: 1.5em; - font-weight: bold; -} - -.section-header-link svg { - width: 15px; - height: 15px; -} - - - -/* Content formatting */ -.series-box { - background-color: var(--background-1); - color: var(--text-1); - padding: 8px 16px; - border-radius: 8px; - margin: 15px 0; -} - -.table-of-contents { - background-color: var(--background-1); - color: var(--text-1); - padding: 8px 20px; - border-radius: 8px; - margin: 10px 0; -} - -.table-of-contents summary { - cursor: pointer; -} - -.table-of-contents.print { - display: none; - padding: 8px 15px; -} - - - -/* Related posts */ -.full-width-page-list { - /* make left/right 0 margin so it takes up full width */ - margin: 25px 0; -} - -.full-width-page-list > hr, -.full-width-page-list > h1 { - margin-left: 20px; - margin-right: 20px; -} - -.full-width-page-list .post { - min-width: 300px; - max-width: 300px; - -} - -.full-width-page-list .post:first-child { - margin-left: 20px; -} -.full-width-page-list .post:last-child { - margin-right: 20px; -} - -@media (max-width: 720px) { - /* when the screen is smaller than max size, make sure that the .related div - * still reaches the screen edge. then if the posts overflow and require - * scrolling, you can see it cut off on the side of your phone screen - */ - .full-width-page-list { - margin-left: -20px; - margin-right: -20px; - } -} - -@media (min-width: 720px) { - .full-width-page-list { - /* this makes it full width -- 720px max-width on body it is exactly 720px - * so .related takes up full width - */ - margin-left: calc(-100vw / 2 + 720px / 2); - margin-right: calc(-100vw / 2 + 720px / 2); - } -} - -.full-width-page-list .page-list { - display: flex; - flex-direction: row; - gap: 20px; - overflow-x: scroll; -} - - - -/* Social media share buttons */ -.share-buttons { - background: var(--background-1); - color: var(--text-1); - margin: 25px 0; - padding: 8px 0; - border-radius: 8px; - display: flex; - gap: 8px; - justify-content: center; -} - -.share-buttons a { - background-color: var(--background-2); - color: var(--text-2); - padding: 4px; - border-radius: 8px; -} -.share-buttons a:hover { - background-color: var(--background-3); - color: var(--text-3); -} - -.share-buttons svg { - width: 32px; - height: 32px; -} - -/* https://stackoverflow.com/a/72073682/19003757 */ -/* -.telegram-share > svg { - transform: scale(1.5); - margin: 9px -9px -9px 9px; -} -*/ - - - -/* See also formating */ -.see-also { - background-color: var(--background-1); - color: var(--text-1); - padding: 8px 12px; - border-radius: 8px; - margin: 10px 0; -} - -.see-also p { - margin: 0; -} - - - -/* Back to top */ -#back-to-top { - position: fixed; - float: right; - bottom: 25px; - right: 25px; - background-color: var(--background-1); - color: var(--text-1); - border-radius: 100%; - padding: 12px; - display: none; -} - - - -/* Navbar formatting */ -.topbar { - display: flex; - flex-wrap: nowrap; - flex-direction: row; - background-color: var(--background-1); - color: var(--text-1); - border-radius: 8px; - margin-top: 5px; - padding: 4px; - align-items: flex-start; -} - -.navbar { - display: flex; - flex-grow: 1; - overflow: auto; -} - -.navbar a { - padding: 8px 12px; - border-radius: 12px; - white-space: nowrap; -} - -.navbar-item:hover, -.langpicker summary:hover, -.langpicker[open] summary { - background-color: var(--background-3); - text-decoration: none; -} - -.langpicker summary:hover, -.langpicker[open] summary { - color: var(--text-3); -} - -.topbar .active { - font-weight: bold; -} - -.langpicker { - position: relative; - white-space: nowrap; -} - -.langpicker summary { - cursor: pointer; - margin-left: 24px; - padding: 8px 12px; - border-radius: 12px; -} - -.langpicker .languages { - position: absolute; - margin-top: 8px; - right: 0; - background-color: var(--background-1); - color: var(--text-1); - border: 2px solid var(--background-2); - padding: 8px 12px; - border-radius: 8px; - list-style: none; -} - -.langpicker .unavailable { - color: inherit; -} - -.langpicker .unavailable:hover { - cursor: not-allowed; - text-decoration: none; -} - - - -/* Basic elements */ html { scroll-behavior: smooth; } @@ -726,8 +289,532 @@ table.markdown tbody tr:nth-child(even) { } +/* Icons */ +.icon { + width: 20px; + height: 20px; + color: var(--text-1); + text-align: center; + display: inline; + vertical-align: middle; +} -/* Code blocks */ +h1 svg.icon { + width: 30px; + height: 30px; +} + +/* }}} */ + +/* @media specializations {{{ */ + +/* Light mode */ +@media print, +(prefers-color-scheme: light) { + li.disabled { + opacity: .25; + } +} + +/* Print compatibility {{{ */ +@media print { + .top, + .section-header-link, + .post-meta-edit-history, + .prevnext, + .share-buttons, + .related-posts, + .latest-posts { + display: none; + } + + * { + -webkit-print-color-adjust: exact !important; + color-adjust: exact !important; + } + + body { + max-width: 100%; + } + + table, + aside, + .code-block { + break-inside: avoid; + } + + .table-of-contents { + display: none; + } + + .table-of-contents.print { + display: block; + } + + #back-to-top { + display: none !important; + } +} + +/* }}} */ + +/* }}} */ + + +/* Heading formatting (website title and article section headers) {{{ */ + +.header { + margin: 16px 0; + font-size: 1.5em; +} + +/* this is also used i.e. in page-title */ +.heading-link { + color: inherit; + font-weight: bold; +} + +.heading-link svg { + width: 15px; + height: 15px; +} + +/* }}} */ + +/* Navbar formatting {{{ */ + +.navbar { + display: flex; + flex-grow: 1; + overflow: auto; + background-color: var(--background-1); + border-radius: 8px; + margin-top: 5px; + padding: 4px; +} + +.navbar-item { + padding: 8px 12px; + border-radius: 12px; + white-space: nowrap; +} + +.navbar-item:hover { + background-color: var(--background-3); + text-decoration: none; +} + +.navbar-item.active { + font-weight: bold; +} + +/* }}} */ + +/* Back to top {{{ */ +#top { + font-size: 0; +} +#back-to-top { + position: fixed; + float: right; + bottom: 25px; + right: 25px; + background-color: var(--background-1); + color: var(--text-1); + border-radius: 100%; + padding: 12px; + display: none; +} +/* }}} */ + +/* Breadcrumb navigation {{{ */ + +.breadcrumb { + margin: 20px 0; +} + +.breadcrumb ul { + margin: 0; + padding: 0; + list-style: none; +} + +.breadcrumb li { + display: inline; +} + +.breadcrumb li+li:before { + content: "»" +} + +/* }}} */ + + +/* Pagination {{{ */ + +.pagination { + list-style: none; + text-align: center; + padding: 0; +} + +.pagination .page-item { + display: inline; +} + +.pagination .page-link { + padding: 8px 16px; + border-radius: 5px; + color: var(--text-1); +} + +.pagination .page-item.active .page-link { + background-color: var(--pagination-active-background); + color: inherit; +} + +.pagination .page-item.active .page-link:hover { + background-color: var(--pagination-active-hover-background); + color: var(--pagination-active-hover-text); + cursor: default; +} + +.pagination .page-link:hover { + text-decoration: none; +} + +.pagination :not(li.disabled) > .page-link:hover { + background-color: var(--background-3); +} + +.pagination li.disabled { + opacity: .5; +} + +.pagination li.disabled > .page-link:hover { + cursor: not-allowed; +} + +/* }}} */ + +/* List layout {{{ */ + +/* flexbox container for sections and main page list */ +.list-page-container { + display: flex; + flex-direction: column; + gap: 40px; +} + +.page-list { + display: flex; + flex-direction: column; + list-style: none; + padding: 0; + gap: 40px; +} + +.page-list > .page { + padding: 24px; + border-radius: 12px; + background-color: var(--background-1); + color: var(--text-1); +} + +.page > .page-title { + margin-top: 0; +} + +/* hugo just can't handle this feature +.post-series-position { + position: relative; + float: right; + opacity: .75; +} +*/ + +.page-title { + margin-bottom: 10px; +} + +.page-title h1 { + margin: 0; +} + +.page-metadata { + margin-bottom: 24px; +} + +.page-metadata-item { + margin-right: 10px; + display: inline-block; +} + +.page-metadata-section { + margin-top: 10px; +} + +.post-media { + margin-top: 15px; +} + +.page-description { + margin-top: 10px; +} + +.readmore { + margin-top: 5px; +} + +/* }}} */ + +/* Taxonomy list layout {{{ */ + +.taxonomy-list a, +.taxonomy-list .taxonomy-metadata { + white-space: nowrap; +} + +.taxonomy-list p { + margin: 0; +} + +.taxonomy-list { + list-style: none; + padding: 0; + display: flex; + flex-direction: column; + gap: 10px; +} + +.taxonomy-list .taxonomy-term { + background-color: var(--background-1); + color: var(--text-1); + padding: 8px 12px; + border-radius: 8px; + display: flex; + flex-direction: row; + gap: 20px; +} + +.taxonomy-list-left { + display: flex; + flex-direction: column; +} + +@media (max-width: 480px) { + .taxonomy-list .taxonomy-term { + flex-direction: column; + gap: 4px; + } + + .taxonomy-list-left { + flex-direction: row; + justify-content: space-between; + } +} + +/* }}} */ + +/* Series list layout {{{ */ + +.page-list.series { + display: flex; + gap: 80px; + flex-flow: row wrap; + list-style: none; + color: var(--text-0); + padding: 8px; + border-radius: 16px; +} + +.page-list.series-inner { + gap: 10px; + flex-direction: row; + flex-flow: row wrap; + background-color: var(--background-0); + /*color: var(--text-0);*/ + padding: 8px; + border-radius: 16px; +} +.page-list.series-inner > .page { + flex: 1; + min-width: 49%; +} + +/* }}} */ + +/* Subsections on list pages {{{ */ + +.sections { + display: flex; + flex-direction: column; + gap: 10px; +} + +.section { + background-color: var(--background-1); + color: var(--text-1); + border-radius: 12px; + padding: 1px 25px; +} + +.section:hover { + background-color: var(--background-2); + color: var(--text-2); +} + +.section-title { + margin: 10px 0; +} + +.section-anchor { + color: inherit; +} + +.section-anchor:hover { + text-decoration: none; +} + +.section-description { + margin-bottom: 5px; +} + +.view-section { + margin-top: 5px; +} + +/* }}} */ + + +/* Content (single) formatting {{{ */ + +.series-box { + background-color: var(--background-1); + color: var(--text-1); + padding: 8px 16px; + border-radius: 8px; + margin: 15px 0; +} + +.table-of-contents { + background-color: var(--background-1); + color: var(--text-1); + padding: 8px 20px; + border-radius: 8px; + margin: 10px 0; +} + +.table-of-contents summary { + cursor: pointer; +} + +.table-of-contents.print { + display: none; + padding: 8px 15px; +} + +/* Social media share buttons */ + +.share-buttons { + background: var(--background-1); + color: var(--text-1); + margin: 25px 0; + padding: 8px 0; + border-radius: 8px; + display: flex; + gap: 8px; + justify-content: center; +} + +.share-buttons a { + background-color: var(--background-2); + color: var(--text-2); + padding: 4px; + border-radius: 8px; +} +.share-buttons a:hover { + background-color: var(--background-3); + color: var(--text-3); +} + +.share-buttons svg { + width: 32px; + height: 32px; +} + +/* https://stackoverflow.com/a/72073682/19003757 */ +/* +.telegram-share > svg { + transform: scale(1.5); + margin: 9px -9px -9px 9px; +} +*/ + +/* See also formating */ +.see-also { + background-color: var(--background-1); + color: var(--text-1); + padding: 8px 12px; + border-radius: 8px; + margin: 10px 0; +} + +.see-also p { + margin: 0; +} + +/* Previous and next page buttons {{{ */ + +.prevnext { + display: flex; + margin: 20px 0; +} + +.prevnext > * { + flex: 1; + white-space: nowrap; + overflow: hidden; + display: flex; + flex-direction: column; + color: inherit; + background-color: var(--background-1); + color: var(--text-1); + padding: 8px 16px; +} + +.prevnext > a:hover { + background-color: var(--background-2); + color: var(--text-2); + text-decoration: none; +} + +.prevnext > .prev { + text-align: left; + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; +} + +.prevnext > .next { + text-align: right; + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; +} + +.prevnext .prev-caption, +.prevnext .next-caption { + opacity: 65%; +} + +.prevnext .prev-post, +.prevnext .next-post { + overflow: hidden; + text-overflow: ellipsis; +} + +/* }}} */ + +/* Code & code blocks {{{ */ .code-block { display: flex; flex-direction: column; @@ -795,9 +882,10 @@ code { display: block; } /* fixes line numbers on firefox when there's only one line */ +/* }}} */ +/* Asides {{{ */ -/* Asides */ aside { padding: 8px 16px; margin: 16px 0; @@ -837,186 +925,62 @@ aside.quote { background-color: var(--background-1); } +/* }}} */ +/* }}} */ -/* Icons */ -.icon { - width: 20px; - height: 20px; - color: var(--text-1); - text-align: center; - display: inline; - vertical-align: middle; +/* Related posts section {{{ */ + +.full-width-page-list { + /* make left/right 0 margin so it takes up full width */ + margin: 25px 0; } -h1 svg.icon { - width: 30px; - height: 30px; +.full-width-page-list > hr, +.full-width-page-list > h1 { + margin-left: 20px; + margin-right: 20px; } +.full-width-page-list .page { + min-width: 300px; + max-width: 300px; - -/* Pagination */ -.pagination { - list-style: none; - text-align: center; - padding: 0; } -.page-item { - display: inline; +.full-width-page-list .page:first-child { + margin-left: 20px; +} +.full-width-page-list .page:last-child { + margin-right: 20px; } -.page-link { - padding: 8px 16px; - border-radius: 5px; - color: var(--text-1); +@media (max-width: 720px) { + /* when the screen is smaller than max size, make sure that the .related div + * still reaches the screen edge. then if the posts overflow and require + * scrolling, you can see it cut off on the side of your phone screen + */ + .full-width-page-list { + margin-left: -20px; + margin-right: -20px; + } } -.page-item.active .page-link { - background-color: var(--pagination-active-background); - color: inherit; +@media (min-width: 720px) { + .full-width-page-list { + /* this makes it full width -- 720px max-width on body it is exactly 720px + * so .related takes up full width + */ + margin-left: calc(-100vw / 2 + 720px / 2); + margin-right: calc(-100vw / 2 + 720px / 2); + } } -.page-item.active .page-link:hover { - background-color: var(--pagination-active-hover-background); - color: var(--pagination-active-hover-text); - cursor: default; -} - -.page-link:hover { - text-decoration: none; -} - -:not(li.disabled) > .page-link:hover { - background-color: var(--background-3); -} - -li.disabled { - opacity: .5; -} - -li.disabled > .page-link:hover { - cursor: not-allowed; -} - - - -/* Breadcrumb navigation */ -.breadcrumb ul { - margin: 30px 0 20px; -} - -.breadcrumb ul { - padding: 0; - list-style: none; -} - -.breadcrumb li { - display: inline; -} - -.breadcrumb li+li:before { - content: "»" -} - - - -/* Previous and next page */ -.prevnext { +.full-width-page-list .page-list { display: flex; - margin: 20px 0; + flex-direction: row; + gap: 20px; + overflow-x: scroll; } -.prevnext > * { - flex: 1; - white-space: nowrap; - overflow: hidden; - display: flex; - flex-direction: column; - color: inherit; - background-color: var(--background-1); - color: var(--text-1); - padding: 8px 16px; -} - -.prevnext > a:hover { - background-color: var(--background-2); - color: var(--text-2); - text-decoration: none; -} - -.prevnext > .prev { - text-align: left; - border-top-left-radius: 8px; - border-bottom-left-radius: 8px; -} - -.prevnext > .next { - text-align: right; - border-top-right-radius: 8px; - border-bottom-right-radius: 8px; -} - -.prevnext .prev-caption, -.prevnext .next-caption { - opacity: 65%; -} - -.prevnext .prev-post, -.prevnext .next-post { - overflow: hidden; - text-overflow: ellipsis; -} - - - -/* Light mode */ -@media print, -(prefers-color-scheme: light) { - li.disabled { - opacity: .25; - } -} - - - -/* Print compatibility */ -@media print { - .top, - .section-header-link, - .post-meta-edit-history, - .prevnext, - .share-buttons, - .related-posts, - .latest-posts { - display: none; - } - - * { - -webkit-print-color-adjust: exact !important; - color-adjust: exact !important; - } - - body { - max-width: 100%; - } - - table, - aside, - .code-block { - break-inside: avoid; - } - - .table-of-contents { - display: none; - } - - .table-of-contents.print { - display: block; - } - - #back-to-top { - display: none !important; - } -} +/* }}} */ diff --git a/data/meses.yml b/data/meses.yml deleted file mode 100644 index 8eaf106..0000000 --- a/data/meses.yml +++ /dev/null @@ -1,12 +0,0 @@ -1: "enero" -2: "febrero" -3: "marzo" -4: "abril" -5: "mayo" -6: "julio" -7: "junio" -8: "agosto" -9: "septiembre" -10: "octubre" -11: "noviembre" -12: "diciembre" diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index b72a831..2c568fe 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -61,10 +61,3 @@ languages: languageName: English title: Example Website weight: 1 - - es: - languageName: Español - title: Sitio web ejemplo - weight: 2 - params: - description: Sitio web ejemplo para bobatheme diff --git a/i18n/en.yaml b/i18n/en.yaml index e9c8780..52821e6 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -58,8 +58,8 @@ newer_post: # ARIA labels -aria_header_link: - other: "header link" +aria_heading_link: + other: "heading link" aria_back_to_top_button: other: "back to top button" @@ -70,9 +70,6 @@ aria_rss_link: aria_post_meta_edit_history: other: "link to page edit history" -aria_post_meta_translations: - other: "translations" - aria_post_meta_categories: other: "categories" @@ -121,12 +118,6 @@ aria_series_metadata: aria_navbar: other: "navigation bar" -aria_langpicker: - other: "language picker" - -aria_langpicker_list: - other: "language list" - aria_table_of_contents: other: "table of contents" diff --git a/i18n/es.yaml b/i18n/es.yaml deleted file mode 100644 index 334b580..0000000 --- a/i18n/es.yaml +++ /dev/null @@ -1,149 +0,0 @@ -# Misc -credit_comment: - other: "" - -table_of_contents: - other: "Índice" - -browser_no_video_support: - other: "Tu navegador de internet no admite video." - -latest_posts: - other: "Artículos recientes" - -see_also: - other: "Véase también:" - -copy_to_clipboard: - other: "Copiar" - - -# Meta items -long_date: - other: "{{ .Date.Day }} de {{ index .Data.meses (printf `%d` .Date.Month) }} de {{ .Date.Year }}" - -wordcount: - one: "{{ . }} palabra" - other: "{{ . }} palabras" - -readingtime: - one: "{{ . }} min" - other: "{{ . }} mins" - -edit_history: - other: "Historial de cambios" - - -# Post count -no_posts: - other: "¡No hay contenido para mostrar!" - -post_count: - one: "{{ . }} publicación" - other: "{{ . }} publicaciones" - - -# Navigation -read_more: - other: "Leer más" - -related_posts: - other: "Publicaciones similares" - -older_post: - other: "Más antiguo" - -newer_post: - other: "Más nuevo" - - -# ARIA labels -# aria_header_link: -# other: "header link" - -# aria_back_to_top_button: -# other: "back to top button" - -# aria_rss_link: -# other: "RSS feed link" - -# aria_post_meta_edit_history: -# other: "link to page edit history" - -# aria_post_meta_translations: -# other: "translations" - -# aria_post_meta_categories: -# other: "categories" - -# aria_post_meta_tags: -# other: "tags" - -# aria_post_meta_reading_time: -# other: "reading time" - -# aria_post_meta_authors: -# other: "authors" - -# aria_post_meta_series: -# other: "series" - -# aria_breadcrumbnav: -# other: "breadcrumb navigation bar" - -# aria_post_metadata: -# other: "post metadata" - -# aria_author_metadata: -# other: "author metadata" - -# aria_taxonomy_metadata: -# other: "taxonomy metadata" - -# aria_post_meta_date: -# other: "date" - -# aria_post_meta_modified_date: -# other: "last modified date" - -# aria_author_post_count: -# other: "post count" - -# aria_author_word_count: -# other: "word count" - -# aria_taxonomy_post_count: -# other: "post count" - -# aria_series_metadata: -# other: "series metadata" - -# aria_navbar: -# other: "navigation bar" - -# aria_langpicker: -# other: "language picker" - -# aria_langpicker_list: -# other: "language list" - -# aria_table_of_contents: -# other: "table of contents" - -# aria_share_twitter: -# other: "share to twitter button" - -# aria_share_facebook: -# other: "share to facebook button" - -# aria_share_linkedin: -# other: "share to linkedin button" - -# aria_share_reddit: -# other: "share to reddit button" - -# aria_share_telegram: -# other: "share to telegram button" - -# aria_share_print: -# other: "print article button" diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index 7a5cde4..f7b8652 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -1,7 +1,7 @@ - + {{ .Text | safeHTML }} - - + + {{ partial "icon.html" "link" }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 671286e..4dabd0f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,9 +10,7 @@ -
- {{ partial "top.html" . }} -
+ {{ partial "top.html" . }} {{ if not .IsHome }} {{ partial "breadcrumb.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 92f3564..01ea9c8 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -9,7 +9,7 @@ {{ . }} {{ end }} -
+
{{ with .Sections }}
{{ range . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2a7fd26..82475a4 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,12 +1,12 @@ {{ define "main" }} -
+

{{ .Title | markdownify }} {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}

- {{ partial "post-metadata/full.html" . }} + {{ partial "page-metadata/post-full.html" . }} {{ partial "series-box.html" . }} {{ if .Params.Toc }} diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html index 492a31f..a47a616 100644 --- a/layouts/_default/summary.html +++ b/layouts/_default/summary.html @@ -1,10 +1,10 @@ -

+

{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} - {{ .Title | markdownify }} + {{ .Title | markdownify }} {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }}

-{{ partial "post-metadata/short.html" . }} +{{ partial "page-metadata/post-short.html" . }} {{ with .Resources.GetMatch "feature" }}
@@ -12,7 +12,7 @@
{{ end }} -
+
{{ partial "description-or-summary.html" . }}
diff --git a/layouts/authors/list.html b/layouts/authors/list.html index 41df868..79ddbc6 100644 --- a/layouts/authors/list.html +++ b/layouts/authors/list.html @@ -11,7 +11,7 @@
{{ with .Paginator.Pages }} {{ range . }} -
+
{{ .Render "summary" }}
{{ end }} diff --git a/layouts/authors/summary.html b/layouts/authors/summary.html index c030539..f28c98d 100644 --- a/layouts/authors/summary.html +++ b/layouts/authors/summary.html @@ -1,16 +1,14 @@ -
-

- {{ .Title | markdownify }} - {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} -

+

+ {{ .Title | markdownify }} + {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} +

- {{ partial "post-metadata/author.html" . }} +{{ partial "page-metadata/author.html" . }} -
- {{ partial "description-or-summary.html" . }} -
- - +
+ {{ partial "description-or-summary.html" . }} +
+ + diff --git a/layouts/authors/term.html b/layouts/authors/term.html index 22e3fc2..23e0c16 100644 --- a/layouts/authors/term.html +++ b/layouts/authors/term.html @@ -1,5 +1,5 @@ {{ define "main" }} -
+

{{ partial "icon.html" "user-circle" }} {{ .Title | markdownify }} @@ -7,7 +7,7 @@

- {{ partial "post-metadata/author.html" . }} + {{ partial "page-metadata/author.html" . }} {{ with .Content }} {{ . }} diff --git a/layouts/partials/page-list.html b/layouts/partials/page-list.html index 599a778..a16ca51 100644 --- a/layouts/partials/page-list.html +++ b/layouts/partials/page-list.html @@ -1,7 +1,7 @@
{{ with . }} {{ range . }} -
+
{{ .Render "summary" }}
{{ end }} diff --git a/layouts/partials/post-metadata/author.html b/layouts/partials/page-metadata/author.html similarity index 61% rename from layouts/partials/post-metadata/author.html rename to layouts/partials/page-metadata/author.html index 8534cd2..7b31a56 100644 --- a/layouts/partials/post-metadata/author.html +++ b/layouts/partials/page-metadata/author.html @@ -1,16 +1,16 @@ -