From f9aaff71c00c7d1f736927264a3ee35ca2070a33 Mon Sep 17 00:00:00 2001 From: Ben Goldsworthy Date: Sat, 8 Apr 2023 12:57:21 -0600 Subject: [PATCH] update theme --- ...ad4603cccbd34107806fbb51a525bc88971791.css | 1073 +++++++++++++++++ js/leaflet-heat.js | 11 + js/render-roles-timeline.js | 92 +- layouts/_default/baseof.html | 3 +- layouts/blog/single.html | 10 +- layouts/cv/locations.html | 89 +- layouts/partials/item-tile.html | 10 +- layouts/shortcodes/abbr.html | 32 + layouts/shortcodes/cite.html | 16 + layouts/shortcodes/figure.html | 15 +- 10 files changed, 1302 insertions(+), 49 deletions(-) create mode 100644 css/main.477fb4fbb0ba98bbffeef55874ad4603cccbd34107806fbb51a525bc88971791.css create mode 100644 js/leaflet-heat.js create mode 100644 layouts/shortcodes/abbr.html create mode 100644 layouts/shortcodes/cite.html diff --git a/css/main.477fb4fbb0ba98bbffeef55874ad4603cccbd34107806fbb51a525bc88971791.css b/css/main.477fb4fbb0ba98bbffeef55874ad4603cccbd34107806fbb51a525bc88971791.css new file mode 100644 index 0000000..f204c67 --- /dev/null +++ b/css/main.477fb4fbb0ba98bbffeef55874ad4603cccbd34107806fbb51a525bc88971791.css @@ -0,0 +1,1073 @@ +@charset "UTF-8"; +/* +Put this file in /static/css/hugo-easy-gallery.css +Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/ +*/ +/* +Grid Layout Styles +*/ +.gallery { + overflow: hidden; } + +.gallery .box { + float: left; + position: relative; + /* Default: 1 tile wide */ + width: 100%; + padding-bottom: 100%; } + +@media only screen and (min-width: 365px) { + /* Tablet view: 2 tiles */ + .gallery .box { + width: 50%; + padding-bottom: 50%; } } + +@media only screen and (min-width: 480px) { + /* Small desktop / ipad view: 3 tiles */ + .gallery .box { + width: 33.3%; + padding-bottom: 33.3%; + /* */ } } + +@media only screen and (min-width: 9999px) { + /* Medium desktop: 4 tiles */ + .box { + width: 25%; + padding-bottom: 25%; } } + +/* +Transition styles +*/ +.gallery.hover-transition figure, +.gallery.hover-effect-zoom .img, +.gallery:not(.caption-effect-appear) figcaption, +.fancy-figure:not(.caption-effect-appear) figcaption { + -webkit-transition: all 0.3s ease-in-out; + -moz-transition: all 0.3s ease-in-out; + -o-transition: all 0.3s ease-in-out; + transition: all 0.3s ease-in-out; } + +/* +figure styles +*/ +figure { + position: relative; + /* purely to allow absolution positioning of figcaption */ + overflow: hidden; } + +.gallery figure { + position: absolute; + left: 5px; + right: 5px; + top: 5px; + bottom: 5px; } + +.gallery.hover-effect-grow figure:hover { + transform: scale(1.05); } + +.gallery.hover-effect-shrink figure:hover { + transform: scale(0.95); } + +.gallery.hover-effect-slidedown figure:hover { + transform: translateY(5px); } + +.gallery.hover-effect-slideup figure:hover { + transform: translateY(-5px); } + +/* +img / a styles +*/ +.gallery .img { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; + background-size: cover; + background-position: 50% 50%; + background-repeat: no-repeat; } + +.gallery.hover-effect-zoom figure:hover .img { + transform: scale(1.05); } + +.gallery img { + display: none !important; + /* only show the img if not inside a gallery */ } + +.gallery figure a { + position: absolute; + left: 0; + right: 0; + top: 0; + bottom: 0; } + +/* +figcaption styles +*/ +.gallery figcaption, +.fancy-figure figcaption { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: #000; + color: #FFF; + text-align: center; + font-size: 75%; + /* change this if you want bigger text */ + background: rgba(0, 0, 0, 0.5); + opacity: 1; + cursor: pointer; } + +.gallery.caption-position-none figcaption, +.fancy-figure.caption-position-none figcaption { + display: none; } + +.gallery.caption-position-center figcaption, +.fancy-figure.caption-position-center figcaption { + top: 0; + padding: 40% 5px; } + +.gallery.caption-position-bottom figcaption, +.fancy-figure.caption-position-bottom figcaption { + padding: 5px; } + +.gallery.caption-effect-fade figure:not(:hover) figcaption, +.gallery.caption-effect-appear figure:not(:hover) figcaption, +.fancy-figure.caption-effect-fade figure:not(:hover) figcaption, +.fancy-figure.caption-effect-appear figure:not(:hover) figcaption { + background: rgba(0, 0, 0, 0); + opacity: 0; } + +.gallery.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption, +.fancy-figure.caption-effect-slide.caption-position-bottom figure:not(:hover) figcaption { + margin-bottom: -100%; } + +.gallery.caption-effect-slide.caption-position-center figure:not(:hover) figcaption, +.fancy-figure.caption-effect-slide.caption-position-center figure:not(:hover) figcaption { + top: 100%; } + +.gallery figcaption p { + margin: auto; + /* override style in theme */ } + +@font-face { + font-family: "Input Mono"; + src: url(/fonts/InputMono-Regular.ttf); } + +html { + font-size: 16px; + color: #020202; + background-color: #fffff0; + font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; } + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: normal; + margin: 0; } + +a { + text-decoration-skip-ink: auto; + color: #020202; + text-decoration: underline; + opacity: 0.8; } + a:hover { + text-decoration: none; + opacity: 1; } + +.sic::after { + content: " [sic]"; + font-style: italic; } + +.latex { + display: inline !important; } + +pre { + padding-left: 1em; + border-left: 2px outset #020202; + display: inline-block; + max-width: 85%; } + +pre { + overflow: hidden; } + +@media only screen and (min-width: 1024px) { + pre { + margin: 1em 2em; } } + +/* + * Quotations + */ +q:lang(en-gb), +blockquote:lang(en-gb) { + quotes: "‘" "’" "“" "”"; } + +/* +q::before { + content: open-quote; +} + +q::after { + content: close-quote; +} +*/ +/* + * Legacy cites + */ +cite, +cite.book, +cite.film, +cite.tv-show, +cite.comic, +cite.book, +cite.podcast, +cite.album, +cite.report { + font-style: italic; } + +cite.book--proper-noun { + font-style: inherit; } + +cite.legislation, +cite.smallcite, +cite.comic-strip, +cite.short-story, +cite.article, +cite.episode, +cite.video, +cite.chapter, +cite.software, +cite.website, +cite.campaign, +cite.song, +cite.speech, +cite.course, +cite.presentation { + font-style: normal; } + +cite.smallcite::before, +cite.article::before, +cite.comic-strip::before, +cite.short-story::before, +cite.episode::before, +cite.video::before, +cite.chapter::before, +cite.song::before, +cite.poem::before, +cite.campaign::before, +cite.speech::before, +cite.course::before, +cite.presentation::before { + content: "“"; } + +cite.smallcite::after, +cite.article::after, +cite.comic-strip::after, +cite.short-story::after, +cite.episode::after, +cite.video::after, +cite.chapter::after, +cite.song::after, +cite.poem::after, +cite.campaign::after, +cite.speech::after, +cite.course::after, +cite.presentation::after { + content: "”"; } + +cite.article--shortcite::before, +cite.article--shortcite::after { + content: none; } + +/* + * New cites + */ +cite { + font-style: italic; } + cite--inherit { + font-style: inherit; } + cite--enquote { + font-style: normal; } + cite--enquote::before { + content: "“"; } + cite--enquote::after { + content: "”"; } + +code, +samp, +var, +pre { + font-family: "Input Mono", "Lucida Console", Monaco, monospace; + font-size: 1em; } + +pre .nocode { + font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; + font-size: 1em; + padding: 1px 3px; + border-radius: 6px; + border: dashed 1px black; } + +code, +samp, +var { + background-color: #d1d1d1; + border-radius: 5px; + padding: 2px; } + +pre { + max-width: 50vw; + overflow: scroll; } + +h1 code, +.post-title code, +pre code, +h1 samp, +.post-title samp, +pre samp, +h1 var, +.post-title var, +pre var { + background-color: transparent; + padding: 0; } + +.heading code, +.subheading code { + background-color: transparent; } + +pre.prettyprint ol { + padding-left: 3.5em; } + +pre.prettyprint li { + background: none !important; } + +samp { + display: block; + width: 80ch; + margin: 1em 4em; + border-left: 2px solid #ccc; + color: #333; } + +kbd { + padding: 0.1em 0.6em; + border: 1px solid #ccc; + font-size: 11px; + font-family: Arial, Helvetica, sans-serif; + background-color: #f7f7f7; + color: #333; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset; + border-radius: 3px; + display: inline-block; + margin: 0 0.1em; + text-shadow: 0 1px 0 white; + line-height: 1.4; + white-space: nowrap; } + +.pre-nominals, +.post-nominals { + font-size: 0.6em; + font-variant: small-caps; } + +.site-container { + display: grid; + grid-template-columns: 2.5% 1fr 2.5%; + grid-template-rows: auto 1fr 2.5%; + grid-template-areas: "header header header" "page-container page-container page-container" "footer footer footer"; + min-height: calc(100vh - 4em); + border-top: 0; } + @media only screen and (min-width: 1248px) { + .site-container { + margin-bottom: 2em; + grid-template-areas: "header header header" ". page-container ." "footer footer footer"; + border: 2px solid black; + margin-left: 2em; + margin-right: 2em; } } + .site-container--homepage { + align-items: center; + grid-template-rows: auto 2.5%; + grid-template-areas: "page-container page-container page-container" "footer footer footer"; + margin-top: 2em; + margin-bottom: 2em; } + @media only screen and (min-width: 1248px) { + .site-container--homepage { + border: 2px solid black; + margin-left: 2em; + margin-right: 2em; + grid-template-areas: ". page-container ." "footer footer footer"; } } + .site-container--list, .site-container--section { + align-items: center; } + +.site-header { + display: grid; + grid-area: header; + grid-gap: 0; + grid-template-columns: 1fr; + grid-template-rows: auto auto auto auto; + grid-template-areas: "header-title" "header-tagline" "header-icons" "header-nav"; + position: sticky; + top: 0; + left: 0; + width: 100%; + text-align: center; + z-index: 1; } + .site-header__title, .site-header__tagline, .site-header__icons, .site-header__nav { + background-color: #fffff0; + margin: 0; } + .site-header__title, .site-header__tagline, .site-header__icons { + padding: 5px 0; } + .site-header__title { + font-weight: normal; + grid-area: header-title; } + .site-header__tagline { + grid-area: header-tagline; } + .site-header__icons { + grid-area: header-icons; + border-bottom: 2px solid #020202; + margin-bottom: 0; } + .site-header__nav { + grid-area: header-nav; + margin: auto; + width: 100%; } + @media only screen and (min-width: 1248px) { + .site-header__nav { + width: 60%; } } + .site-header__nav ul { + margin-top: 0; + margin-bottom: 0; } + .site-header__nav li { + width: calc(100% / 3); + display: block; + float: left; + border-bottom: 2px solid black; + border-left: 1px solid black; + border-right: 1px solid black; + padding: 0.4em; + background-color: inherit; } + .site-header__nav a:first-child li { + border-left: 2px solid black; } + .site-header__nav a:last-child li { + border-right: 2px solid black; } + .site-header__nav li:hover { + background-color: #ffffd0; } + .site-header__nav li a { + width: 100%; + height: 100%; + display: block; } + +.site-footer { + grid-area: footer; + display: block; + width: 99%; + /* Overflows right of viewport otherwise */ + position: fixed; + bottom: 0; } + .site-footer p { + width: fit-content; + margin: auto; + background: #fffff0; + border: 2px solid black; + padding: 0.4em; + border-bottom: none; + font-size: 0.6em; } + @media only screen and (min-width: 1248px) { + .site-footer p { + font-size: 1em; } } +.site-content { + grid-area: page-container; + margin-left: 1em; + margin-right: 1em; } + @media only screen and (min-width: 1248px) { + .site-content { + margin: 2em; } } +.feed-icon { + display: inline-block; + height: 0.6em; + width: 0.6em; + margin-bottom: 0.2em; } + +.link--tile { + text-decoration: none; + box-sizing: border-box; + border: 2px solid transparent; } + .link--tile:hover { + border-color: #020202; } + +.item-tile { + display: grid; + min-height: 180px; + grid-template-columns: 5% auto 5%; + grid-template-rows: 2.5% auto 2.5%; + grid-template-areas: ". . ." ". tile-details ." ". . ."; + background-size: cover; + background-repeat: no-repeat; + background-position: center; } + @media (prefers-reduced-data: reduce) { + .item-tile { + background: none !important; } } + .item-tile.lazy { + background-image: none !important; } + .item-tile--heading { + font-size: 3em; } + .item-tile--heading .item-tile__header { + opacity: 1; } + .item-tile--ohwhatohjeez { + border: 2px solid #ff8900; } + .item-tile--oldphaloskepsis { + border: 2px solid #003d52; } + .item-tile--omphaloskepsis { + border: 2px solid #fffff0; } + .item-tile__header { + text-align: center; + background-color: #020202; + opacity: 0.8; + display: grid; + grid-area: tile-details; + grid-template-columns: 5px auto 5px; + grid-template-rows: 0 auto auto auto; + grid-template-areas: ". . ." ". banner ." ". tile-title ." ". tile-subtitle ."; } + .item-tile__banner { + padding: 0.5em 1em 0; + grid-area: banner; + width: auto; + margin-left: auto; + margin-right: auto; + border-radius: 0 0 10px 10px; + text-align: center; + text-decoration: none !important; + line-height: 0.5em; + background-color: #ebebeb; } + .item-tile__title, .item-tile__subtitle { + color: #fffff0; + margin: 0; + font-weight: normal; } + .item-tile__title { + font-size: 1.4em; + grid-area: tile-title; + align-self: center; } + .item-tile__title--long { + font-size: 1em; } + .item-tile__subtitle { + font-size: 0.8em; + grid-area: tile-subtitle; + align-self: start; } + +/* TODO: Not currently used */ +@media screen and (max-width: 480px) { + .table-scroller { + overflow-x: auto; + width: 320px; } } + +table { + border: 1px solid #020202; + margin: auto; } + table td { + padding: 0.5em 1em; + border: 1px solid #020202; } + +.site-content--homepage { + text-align: center; } + .site-content--homepage .page-title { + font-size: 2.5em; + margin-bottom: 1em; } + @media only screen and (min-width: 1248px) { + .site-content--homepage .page-title { + font-size: 4em; } } + .site-content--homepage .page-title span { + display: block !important; + font-size: 0.3em; } + +.site-content--section, +.site-content--list { + display: grid; + grid-gap: 10px; + grid-template-columns: 0.2fr 1fr 0.2fr; + grid-template-rows: auto auto 60px; + justify-items: center; + align-items: center; + grid-template-areas: "list-page-header list-page-header list-page-header" "list-page-grid list-page-grid list-page-grid" "list-page-footer list-page-footer list-page-footer"; + margin-top: 5em; } + @media only screen and (min-width: 1248px) { + .site-content--section, + .site-content--list { + grid-template-areas: ". list-page-header ." "list-page-grid list-page-grid list-page-grid" ". list-page-footer ."; } } + .site-content--section .site-content__header, + .site-content--list .site-content__header { + grid-area: list-page-header; + text-align: center; } + .site-content--section .site-content__header .page-header__minor-links, + .site-content--list .site-content__header .page-header__minor-links { + text-align: center; + margin: auto; + overflow: auto; } + .site-content--section .site-content__header .page-header__minor-links ul, + .site-content--list .site-content__header .page-header__minor-links ul { + list-style: none; } + .site-content--section .site-content__header .page-header__minor-links ul li, + .site-content--list .site-content__header .page-header__minor-links ul li { + float: left; + margin: 0 1em; } + .site-content--section .site-content__header .page-header__minor-links ul li *, + .site-content--list .site-content__header .page-header__minor-links ul li * { + display: inline-block; } + .site-content--section .site-content__header .page-header__minor-links .minor-links__categories, + .site-content--list .site-content__header .page-header__minor-links .minor-links__categories { + width: 100%; + display: block; + font-size: 0.8em !important; + overflow: auto; } + @media only screen and (min-width: 1248px) { + .site-content--section .site-content__header .page-header__minor-links .minor-links__categories, + .site-content--list .site-content__header .page-header__minor-links .minor-links__categories { + font-size: 1em !important; } } + .site-content--section .site-content__header .page-header__minor-links .minor-links__years, + .site-content--list .site-content__header .page-header__minor-links .minor-links__years { + width: 100%; + display: block; + margin: auto; + width: fit-content; } + .site-content--section .site-content__body, + .site-content--list .site-content__body { + width: 100%; + display: grid; + justify-items: stretch; + align-items: stretch; + grid-gap: 10px; + grid-area: list-page-grid; + grid-template-columns: 1fr; + grid-template-rows: repeat(8, 1fr); + justify-items: stretch; + align-items: stretch; } + @media only screen and (min-width: 768px) { + .site-content--section .site-content__body, + .site-content--list .site-content__body { + grid-template-columns: repeat(2, 1fr); + grid-template-rows: repeat(4, 1fr); } } + @media only screen and (min-width: 1248px) { + .site-content--section .site-content__body, + .site-content--list .site-content__body { + grid-template-columns: repeat(4, 1fr); + grid-template-rows: repeat(2, 1fr); } } + .site-content--section .site-content__body--list, + .site-content--list .site-content__body--list { + grid-template-columns: 1fr auto 1fr; + grid-template-rows: auto; + grid-template-areas: ". sections-list ."; } + .site-content--section .site-content__body--chart, + .site-content--list .site-content__body--chart { + grid-template-columns: 1em 100% 1fr; + grid-template-rows: 100%; + grid-template-areas: ". section-chart ."; } + .site-content--section .site-content__footer, + .site-content--list .site-content__footer { + grid-area: list-page-footer; } + +.site-content--single { + display: grid; + column-gap: 2em; + grid-template-columns: 0.4fr 0.6fr; + grid-template-rows: auto auto auto; } + .site-content--single .site-content__header, .site-content--single .site-content__footer { + display: grid; + grid-column-start: 1; + grid-column-end: 3; + background-color: #fffff0; + filter: brightness(80%); } + @media only screen and (min-width: 1248px) { + .site-content--single .site-content__header, .site-content--single .site-content__footer { + border: 2px solid #020202; + grid-column-end: 2; + padding: 2em; } } + .site-content--single .site-content__header { + grid-row-start: 1; + grid-row-end: 2; + overflow: auto; + border-bottom: 2px solid #020202; + margin-bottom: 2em; } + .site-content--single .site-content__header .article-header { + text-align: center; + background-color: #020202; + opacity: 0.8; + color: #fffff0; + display: grid; + grid-area: post-header-details; + grid-template-columns: 1fr; + padding: 20px; + grid-template-rows: 1fr auto auto 1fr; + justify-items: center; + align-items: center; + grid-template-areas: "." "post-title" "post-subtitle" "."; } + .site-content--single .site-content__header .article-header__series { + margin: 0 auto 1em; + font-size: 1.2em; } + .site-content--single .site-content__header .article-header__featured-image { + display: grid; + grid-template-columns: 15% 1fr 15%; + grid-template-rows: 20% 1fr 20%; + grid-template-areas: ". . ." ". post-header-details ." ". . ."; + background-position: center center; + background-repeat: no-repeat; + background-size: cover; + height: 40vh; + min-height: 380px; + width: 100%; + border: 2px solid #020202; } + .site-content--single .site-content__header .article-header__featured-image .attr { + background-color: #020202; + font-size: 0.7em; + color: #fffff0; + width: fit-content; + position: fixed; + padding: 0.2em 0.5em; + opacity: 0.8; + margin: 0 auto; } + .site-content--single .site-content__header .article-header__featured-image .attr a { + color: #fffff0; } + .site-content--single .site-content__header .article-header__title, .site-content--single .site-content__header .article-header__subtitle { + border-bottom: 2px inset #020202; + margin-top: 0.5em; + margin-bottom: 0.5em; + line-height: 1.2em; + border-bottom: 2px inset #020202; + margin-top: 0.5em; + margin-bottom: 0.5em; + line-height: 1.2em; } + .site-content--single .site-content__header .article-header__title-wrapper { + display: grid; + grid-area: post-header-details; + background-color: #020202; + opacity: 0.8; + text-align: center; + grid-template-columns: 1fr; + padding: 20px; + grid-template-rows: 1fr auto auto 1fr; + justify-items: center; + align-items: center; + grid-template-areas: "." "post-title" "post-subtitle" "."; } + .site-content--single .site-content__header .article-header__title-wrapper--no-title { + visibility: hidden; } + .site-content--single .site-content__header .article-header__title-wrapper .article-header__title, .site-content--single .site-content__header .article-header__title-wrapper .article-header__subtitle { + color: #fffff0; } + .site-content--single .site-content__header .article-header__title-wrapper .article-header__title { + grid-area: post-title; + font-weight: bold; } + .site-content--single .site-content__header .article-header__title-wrapper .article-header__title--long { + font-size: 1.5em; } + .site-content--single .site-content__header .article-header__title-wrapper .article-header__subtitle { + grid-area: post-subtitle; } + .site-content--single .site-content__header .article-header__word-count, .site-content--single .site-content__header .article-header__publish-date, .site-content--single .site-content__header .article-header__modified-date { + font-size: 1.2em; + margin: 0.2rem auto; } + .site-content--single .site-content__header .article-header__word-count { + margin-top: 1rem; } + .site-content--single .site-content__header .article-header__notes, .site-content--single .site-content__header .article-header__warnings { + width: 90%; + margin: 1.6em auto; + display: block; + padding-right: 1em; } + .site-content--single .site-content__header .article-header__notes ul, .site-content--single .site-content__header .article-header__warnings ul { + list-style: circle; } + .site-content--single .site-content__header .article-header__notes ul li, .site-content--single .site-content__header .article-header__warnings ul li { + margin: 0.5em 0; } + .site-content--single .site-content__header .article-header__notes { + background-color: #fffff0; + filter: brightness(70%); + border: 1px solid gray; } + .site-content--single .site-content__header .article-header__warnings { + border: 4px solid darkred; + background-color: #fc3a3a; + color: #fffff0; + font-weight: 500; } + .site-content--single .site-content__header .article-header__warnings ul { + list-style: disc; } + .site-content--single .site-content__header .article-header__table-of-contents ul { + list-style-type: arabic; + padding-left: 2em; } + .site-content--single .site-content__body { + grid-column-start: 1; + grid-column-end: 3; + grid-row-start: 2; + grid-row-end: 3; + /* Temporary until I've fixed all the figures */ + overflow-x: clip; + /* TODO: remove once replaced in content with figures */ } + @media only screen and (min-width: 1248px) { + .site-content--single .site-content__body { + grid-row-start: 1; + grid-row-end: 4; + grid-column-start: 2; } } + .site-content--single .site-content__body .heading { + text-align: center; + font-size: 2em; + font-weight: bold; } + .site-content--single .site-content__body .heading::before, .site-content--single .site-content__body .heading::after { + content: " ~ "; } + .site-content--single .site-content__body .heading-anchor { + font-size: 0.6em; + line-height: 1em; + text-decoration: none; + vertical-align: middle; } + .site-content--single .site-content__body .subheading { + font-size: 1.6em; + border-bottom: 2px inset #020202; + margin-top: 0.5em; + margin-bottom: 0.5em; + line-height: 1.2em; + text-align: center; } + .site-content--single .site-content__body .subheading--appendices, .site-content--single .site-content__body .subheading--comments { + text-decoration: underline; + border-bottom: none; + font-size: 2em; + padding-top: 1em; + border-top: 1px dashed #020202; } + .site-content--single .site-content__body .subheading__subtitle { + font-size: 1em; + border-bottom: 1px dashed #020202; + margin-top: 0; + margin-bottom: 1em; + padding-bottom: 0.5em; + line-height: 1em; + text-align: center; + font-weight: bold; + width: fit-content; + margin: auto; + padding: 0 3em 0.4em; } + .site-content--single .site-content__body .subsubheading { + font-size: 1.4em; + border-bottom: 1px dashed #020202; + margin-top: 1em; + margin-bottom: 1em; + padding-bottom: 0.5em; + line-height: 1em; + text-align: left; + font-weight: bold; } + .site-content--single .site-content__body .subsubsubheading { + font-size: 1.2em; + margin-top: 1em; + margin-bottom: 1em; + line-height: 1em; + text-align: left; + font-weight: bold; } + .site-content--single .site-content__body blockquote { + padding-left: 1em; + border-left: 2px outset #020202; + display: inline-block; + max-width: 85%; } + .site-content--single .site-content__body blockquote footer { + text-align: right; + font-style: normal; + display: inline-block; + margin-left: 5em; } + .site-content--single .site-content__body blockquote footer::before { + content: "—"; } + .site-content--single .site-content__body blockquote:first-child { + font-size: 1.2em; + text-align: center; + display: block; + margin: 0 auto; + border-left: 0; + padding-left: 0; + width: 100%; + padding-top: 1em; + padding-bottom: 1.2em; + border-top: 2px outset #020202; + border-bottom: 2px inset #020202; } + .site-content--single .site-content__body blockquote p:first-child { + margin-top: 0; } + .site-content--single .site-content__body blockquote p:last-of-type { + margin-bottom: 0.5em; } + .site-content--single .site-content__body blockquote.script { + display: grid; + grid-template-columns: auto 1fr 0.2fr; + padding-bottom: 0.4em; + text-align: left; } + .site-content--single .site-content__body blockquote.script > p::before, .site-content--single .site-content__body blockquote.script > p::after { + content: none !important; } + .site-content--single .site-content__body blockquote.script > .script-line__character { + grid-column: 1; + margin: 0.5em 2em 0.5em 0.5em; + font-style: italic; } + .site-content--single .site-content__body blockquote.script > .script-line__text { + grid-column-start: 2; + grid-column-end: 4; + margin: 0.5em; } + .site-content--single .site-content__body blockquote.script footer { + grid-column-start: 1; + grid-column-end: 3; } + @media only screen and (min-width: 1024px) { + .site-content--single .site-content__body blockquote { + margin: 1em 2em; } } + .site-content--single .site-content__body img, + .site-content--single .site-content__body video { + max-width: 100%; + height: auto; + width: auto; + max-height: 50vh; + margin: auto; + display: block; } + .site-content--single .site-content__body .figure { + margin: 16px auto; + width: fit-content; } + .site-content--single .site-content__body .figure__image { + display: block; + width: auto; + max-width: 100%; + margin: auto; + height: auto; + max-height: 50vh; } + .site-content--single .site-content__body .figure__chart { + min-height: 40vh; + max-height: 60vh; } + .site-content--single .site-content__body .figure__caption { + height: auto; + margin: auto; + text-align: center; } + .site-content--single .site-content__body .figure__caption--no-height { + height: 0; } + .site-content--single .site-content__body .figure__caption .figcaption__caption { + font-size: 0.9em; + font-style: italic; } + .site-content--single .site-content__body .figure__caption .figcaption__title { + font-size: 0.95em; + font-weight: bold; } + .site-content--single .site-content__body .figure__caption .figcaption__attr { + background-color: #020202; + font-size: 0.7em; + color: #fffff0; + width: fit-content; + top: -2em; + position: relative; + padding: 0.2em 0.5em; + opacity: 0.8; + margin: 0 auto; } + .site-content--single .site-content__body .figure__caption .figcaption__attr + .figcaption__caption { + margin-top: -0.5em; } + .site-content--single .site-content__body .figure__caption .figcaption__full-size-link { + font-size: 0.6em; + padding-left: 1em; } + .site-content--single .site-content__body .figure__caption .figcaption__full-size-link::before { + content: '['; } + .site-content--single .site-content__body .figure__caption .figcaption__full-size-link::after { + content: ']'; } + .site-content--single .site-content__footer { + grid-row-start: 3; + grid-row-end: 4; + border-top: 2px solid #020202; } + @media only screen and (min-width: 1248px) { + .site-content--single .site-content__footer { + margin-bottom: 2em; + grid-row-start: 2; + grid-row-end: 3; } } + .site-content--single .site-content__footer h2 { + margin: 1rem 0; } + .site-content--single .site-content__footer ul { + margin: 0; } + .site-content--single .site-content__footer #mapdiv { + border: 2px solid #020202; } + +.organisations-table { + grid-column-start: 1; + grid-column-end: 5; } + +#organisation-body .index { + display: grid; + grid-gap: 6px 5px; + grid-area: items; + grid-template-columns: repeat(4, 1fr); + grid-template-rows: 1fr; + justify-items: stretch; + align-items: stretch; + grid-template-areas: "item1 item2 item3 item4"; } + +#organisation-body .index .item:nth-child(1) { + grid-area: item1; } + +#organisation-body .index .item:nth-child(2) { + grid-area: item2; } + +#organisation-body .index .item:nth-child(3) { + grid-area: item3; } + +#organisation-body .index .item:nth-child(4) { + grid-area: item4; } + +#organisation-body details { + cursor: pointer; + opacity: 0.7; + border: 2px solid #020202; } + #organisation-body details:hover, #organisation-body details:focus { + opacity: 1; } + +#organisation-body summary::marker { + font-size: 2em; + padding-left: 2em; } + +#organisation-body summary .subheading { + display: inline; + width: 95%; + padding-bottom: 2em; } + +#organisation-body summary .index { + border-top: 2px solid #020202; } + +#hierarchy ul { + list-style: none; + padding-left: 1em; } + #hierarchy ul .hierarchy-item:before { + content: '\21B3'; + margin: 0 0.4em; } + #hierarchy ul .hierarchy-item--current { + font-weight: bold; } + #hierarchy ul .hierarchy-item--child:before { + content: '\2192'; } + +.timeline__legend span { + margin: 0 1em; } + .timeline__legend span * { + display: inline-block; } + .timeline__legend span .colour-square { + width: 1em; + height: 1em; + border-radius: 2.5px; + border: 1px solid #020202; } + .timeline__legend span .colour-square--unpaid-current { + background-color: #bbbbb0; } + .timeline__legend span .colour-square--unpaid-past { + background-color: #fffff0; } + .timeline__legend span .colour-square--paid-current { + background-color: #BCBC7E; } + .timeline__legend span .colour-square--paid-past { + background-color: #FCFCA6; } + +.site-content__body--chart #timeline, .site-content__body--chart #map { + width: 100%; + max-width: 100%; + grid-area: section-chart; } + +.site-content__body--list .site-content__sections-list { + grid-area: sections-list; + display: block; + list-style: none; + margin: auto; + padding-left: 0; } + .site-content__body--list .site-content__sections-list li * { + display: inline-block; } + +@media (prefers-color-scheme: dark) { + html, + .site-header { + color: #fffff0; + background-color: #020202; } + .site-header__nav li { + color: #fffff0; + border-color: #fffff0; } + .site-header__nav li:hover { + background-color: #020202; } + .site-header__title a { + color: #fffff0; } + .item-tile--heading, .item-tile__header { + background-color: #fffff0; } + .item-tile--heading, .item-tile__header, .item-tile__title, .item-tile__subtitle { + color: #020202; } } diff --git a/js/leaflet-heat.js b/js/leaflet-heat.js new file mode 100644 index 0000000..aa8031a --- /dev/null +++ b/js/leaflet-heat.js @@ -0,0 +1,11 @@ +/* + (c) 2014, Vladimir Agafonkin + simpleheat, a tiny JavaScript library for drawing heatmaps with Canvas + https://github.com/mourner/simpleheat +*/ +!function(){"use strict";function t(i){return this instanceof t?(this._canvas=i="string"==typeof i?document.getElementById(i):i,this._ctx=i.getContext("2d"),this._width=i.width,this._height=i.height,this._max=1,void this.clear()):new t(i)}t.prototype={defaultRadius:25,defaultGradient:{.4:"blue",.6:"cyan",.7:"lime",.8:"yellow",1:"red"},data:function(t,i){return this._data=t,this},max:function(t){return this._max=t,this},add:function(t){return this._data.push(t),this},clear:function(){return this._data=[],this},radius:function(t,i){i=i||15;var a=this._circle=document.createElement("canvas"),s=a.getContext("2d"),e=this._r=t+i;return a.width=a.height=2*e,s.shadowOffsetX=s.shadowOffsetY=200,s.shadowBlur=i,s.shadowColor="black",s.beginPath(),s.arc(e-200,e-200,t,0,2*Math.PI,!0),s.closePath(),s.fill(),this},gradient:function(t){var i=document.createElement("canvas"),a=i.getContext("2d"),s=a.createLinearGradient(0,0,0,256);i.width=1,i.height=256;for(var e in t)s.addColorStop(e,t[e]);return a.fillStyle=s,a.fillRect(0,0,1,256),this._grad=a.getImageData(0,0,1,256).data,this},draw:function(t){this._circle||this.radius(this.defaultRadius),this._grad||this.gradient(this.defaultGradient);var i=this._ctx;i.clearRect(0,0,this._width,this._height);for(var a,s=0,e=this._data.length;e>s;s++)a=this._data[s],i.globalAlpha=Math.max(a[2]/this._max,t||.05),i.drawImage(this._circle,a[0]-this._r,a[1]-this._r);var n=i.getImageData(0,0,this._width,this._height);return this._colorize(n.data,this._grad),i.putImageData(n,0,0),this},_colorize:function(t,i){for(var a,s=3,e=t.length;e>s;s+=4)a=4*t[s],a&&(t[s-3]=i[a],t[s-2]=i[a+1],t[s-1]=i[a+2])}},window.simpleheat=t}(),/* + (c) 2014, Vladimir Agafonkin + Leaflet.heat, a tiny and fast heatmap plugin for Leaflet. + https://github.com/Leaflet/Leaflet.heat +*/ +L.HeatLayer=(L.Layer?L.Layer:L.Class).extend({initialize:function(t,i){this._latlngs=t,L.setOptions(this,i)},setLatLngs:function(t){return this._latlngs=t,this.redraw()},addLatLng:function(t){return this._latlngs.push(t),this.redraw()},setOptions:function(t){return L.setOptions(this,t),this._heat&&this._updateOptions(),this.redraw()},redraw:function(){return!this._heat||this._frame||this._map._animating||(this._frame=L.Util.requestAnimFrame(this._redraw,this)),this},onAdd:function(t){this._map=t,this._canvas||this._initCanvas(),t._panes.overlayPane.appendChild(this._canvas),t.on("moveend",this._reset,this),t.options.zoomAnimation&&L.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._canvas),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},_initCanvas:function(){var t=this._canvas=L.DomUtil.create("canvas","leaflet-heatmap-layer leaflet-layer"),i=L.DomUtil.testProp(["transformOrigin","WebkitTransformOrigin","msTransformOrigin"]);t.style[i]="50% 50%";var a=this._map.getSize();t.width=a.x,t.height=a.y;var s=this._map.options.zoomAnimation&&L.Browser.any3d;L.DomUtil.addClass(t,"leaflet-zoom-"+(s?"animated":"hide")),this._heat=simpleheat(t),this._updateOptions()},_updateOptions:function(){this._heat.radius(this.options.radius||this._heat.defaultRadius,this.options.blur),this.options.gradient&&this._heat.gradient(this.options.gradient),this.options.max&&this._heat.max(this.options.max)},_reset:function(){var t=this._map.containerPointToLayerPoint([0,0]);L.DomUtil.setPosition(this._canvas,t);var i=this._map.getSize();this._heat._width!==i.x&&(this._canvas.width=this._heat._width=i.x),this._heat._height!==i.y&&(this._canvas.height=this._heat._height=i.y),this._redraw()},_redraw:function(){var t,i,a,s,e,n,h,o,r,d=[],_=this._heat._r,l=this._map.getSize(),m=new L.Bounds(L.point([-_,-_]),l.add([_,_])),c=void 0===this.options.max?1:this.options.max,u=void 0===this.options.maxZoom?this._map.getMaxZoom():this.options.maxZoom,f=1/Math.pow(2,Math.max(0,Math.min(u-this._map.getZoom(),12))),g=_/2,p=[],v=this._map._getMapPanePos(),w=v.x%g,y=v.y%g;for(t=0,i=this._latlngs.length;i>t;t++)if(a=this._map.latLngToContainerPoint(this._latlngs[t]),m.contains(a)){e=Math.floor((a.x-w)/g)+2,n=Math.floor((a.y-y)/g)+2;var x=void 0!==this._latlngs[t].alt?this._latlngs[t].alt:void 0!==this._latlngs[t][2]?+this._latlngs[t][2]:1;r=x*f,p[n]=p[n]||[],s=p[n][e],s?(s[0]=(s[0]*s[2]+a.x*r)/(s[2]+r),s[1]=(s[1]*s[2]+a.y*r)/(s[2]+r),s[2]+=r):p[n][e]=[a.x,a.y,r]}for(t=0,i=p.length;i>t;t++)if(p[t])for(h=0,o=p[t].length;o>h;h++)s=p[t][h],s&&d.push([Math.round(s[0]),Math.round(s[1]),Math.min(s[2],c)]);this._heat.data(d).draw(this.options.minOpacity),this._frame=null},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),a=this._map._getCenterOffset(t.center)._multiplyBy(-i).subtract(this._map._getMapPanePos());L.DomUtil.setTransform?L.DomUtil.setTransform(this._canvas,a,i):this._canvas.style[L.DomUtil.TRANSFORM]=L.DomUtil.getTranslateString(a)+" scale("+i+")"}}),L.heatLayer=function(t,i){return new L.HeatLayer(t,i)}; \ No newline at end of file diff --git a/js/render-roles-timeline.js b/js/render-roles-timeline.js index cc3e003..56aa20f 100644 --- a/js/render-roles-timeline.js +++ b/js/render-roles-timeline.js @@ -12,11 +12,25 @@ function drawChart() { dataTable.addRows([ [ - "Workaway, Hospedaje Wounaan", + "Workaway, Volcano Day", "Workawayer", "#BBBBB0", + new Date("2023-03-26"), + new Date("2023-04-08") + ], + [ + "Cuba Solidarity Campaign", + "Member", + "#BBBBB0", + new Date("2023-03-03"), + new Date("2023-04-08") + ], + [ + "Workaway, Hospedaje Wounaan", + "Workawayer", + "#FFFFF0", new Date("2023-02-24"), - new Date("2023-03-05") + new Date("2023-03-12") ], [ "Workaway, Finca DeLaRey", @@ -37,7 +51,7 @@ function drawChart() { "Developer", "#BBBBB0", new Date("2023-01-19"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Workaway, Finca DeLaRey", @@ -72,14 +86,14 @@ function drawChart() { "Web Developer", "#BCBC7E", new Date("2022-10-26"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Chartered Institute for Information Security", "Associate Member", "#BBBBB0", new Date("2022-08-09"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "West Lancs Scouts Active Support", @@ -93,112 +107,112 @@ function drawChart() { "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Computer Arts Society", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Computer Conservation Society", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Consultancy Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Enterprise Architecture Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Green IT Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Health & Care Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Internet Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Information Risk Management and Assurance Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Information Security Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "IT Ethics Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Law Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "BCS Nottingham & Derby Branch", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Open Source Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Sociotechnical Specialist Group", "Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "BCS, the Chartered Institute for IT", "Professional Member", "#BBBBB0", new Date("2022-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Chartered Institute for Information Security", @@ -219,7 +233,7 @@ function drawChart() { "Student Member", "#BBBBB0", new Date("2022-05-26"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "MORS Cyber CoP", @@ -261,7 +275,7 @@ function drawChart() { "Supporter", "#BBBBB0", new Date("2022-01-14"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Actica Consulting", @@ -317,14 +331,14 @@ function drawChart() { "Member", "#BBBBB0", new Date("2021-09-24"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Mountain Training Association", "Trainee Member", "#BBBBB0", new Date("2021-08-24"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "North West Area Meeting", @@ -338,7 +352,7 @@ function drawChart() { "Member", "#BBBBB0", new Date("2021-07-26"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Lancaster Quaker Meeting", @@ -394,7 +408,7 @@ function drawChart() { "Participant", "#BBBBB0", new Date("2021-01-23"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "footnotes", @@ -429,7 +443,7 @@ function drawChart() { "Member", "#BBBBB0", new Date("2020-09-29"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Executive Committee", @@ -450,7 +464,7 @@ function drawChart() { "Website Content Manager", "#BBBBB0", new Date("2020-08-31"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Unity2020", @@ -604,14 +618,14 @@ function drawChart() { "Associate Member", "#BBBBB0", new Date("2019-04-01"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Youth Hostel Association", "Company Member", "#BBBBB0", new Date("2019-02-20"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Friends of Lancaster Library", @@ -793,14 +807,14 @@ function drawChart() { "Member", "#BBBBB0", new Date("2018-06-20"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "UK England Chapter", "Member", "#BBBBB0", new Date("2018-06-13"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Community Networks SIG", @@ -814,14 +828,14 @@ function drawChart() { "Member", "#BBBBB0", new Date("2018-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Internet Society", "Member", "#BBBBB0", new Date("2018-06-04"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Mitigate Cyber", @@ -1010,7 +1024,7 @@ function drawChart() { "Member", "#BBBBB0", new Date("2017-06-06"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Lonsdale District Scout Network, Scout Network", @@ -1073,7 +1087,7 @@ function drawChart() { "Member", "#BBBBB0", new Date("2016-12-19"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Pendle College, Lancaster University Students' Union", @@ -1444,7 +1458,7 @@ function drawChart() { "Librarian", "#BBBBB0", new Date("2013-05-01"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Patient Participation Group", @@ -1500,7 +1514,7 @@ function drawChart() { "Minister", "#BBBBB0", new Date("2012-01-01"), - new Date("2023-03-05") + new Date("2023-04-08") ], [ "Salvation Army", diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1e1ed48..f467d55 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,7 +2,7 @@ {{ partialCached "copying.html" . }} - + @@ -23,6 +23,7 @@ {{- $sass := resources.Get "css/main.scss" }} {{- $style := $sass | resources.ToCSS | resources.Fingerprint }} + {{- block "header-styles" . -}}{{- end -}} {{- block "header-scripts" . -}}{{- end -}} diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 5f06f7d..4571127 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -4,6 +4,12 @@ {{ define "main-class" }}--single{{ end }} +{{ define "header-styles" }} + {{ with .Params.styles }} + + {{ end }} +{{ end }} + {{ define "footer-scripts" }} {{ with .Params.locations }} @@ -126,7 +132,9 @@ {{ if fileExists ( path.Join $.Page.File.Dir "appendices.md" ) }}

Appendices

- {{ readFile ( path.Join $.Page.File.Dir "appendices.md" ) | markdownify }} + {{ warnf "Getting appendix for '%v'" $.File.Dir }} + {{ $file := path.Join $.Page.File.Dir "appendices.md" }} + {{ $file | markdownify }}
{{ end }} diff --git a/layouts/cv/locations.html b/layouts/cv/locations.html index e041c51..0c2c3f0 100644 --- a/layouts/cv/locations.html +++ b/layouts/cv/locations.html @@ -4,16 +4,100 @@ {{ define "main-class" }}--section location-map{{ end }} +{{ define "header-scripts" }} + +{{ end }} + {{ define "footer-scripts" }} - + + + + {{ end }} diff --git a/layouts/partials/item-tile.html b/layouts/partials/item-tile.html index ea70f07..843b400 100644 --- a/layouts/partials/item-tile.html +++ b/layouts/partials/item-tile.html @@ -1,8 +1,14 @@
+ {{- if ( eq .Params.mode "shortTitle" ) }} + {{ .shortTitle }} + {{ else if ( eq .Params.mode "shortTitlePl" ) }} + {{ if .shortTitlePl }}{{ .shortTitlePl }}{{ else }}{{ .shortTitle }}s{{ end }} + {{ end -}} + + {{ else if ( or ( eq .Params.mode "longtitle" ) ( eq .Params.mode "longTitlePl" ) ) }} + {{- if ( eq .Params.mode "longTitle" ) }} + {{ .longTitle }} + {{ else if ( eq .Params.mode "longTitlePl" ) }} + {{ if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end }} + {{ end -}} + {{ else if ( or ( eq .Params.mode "fullTitle" ) ( eq .Params.mode "fullTitlePl" ) ) }} + {{ if ( eq .Params.mode "fullTitle" ) }} + {{ .longTitle }} ({{ .short }}) + {{ else if ( eq .Params.mode "fullTitlePl" ) }} + {{- if .longTitlePl }}{{ .longTitlePl }}{{ else }}{{ .longTitle }}s{{ end -}} +  ({{ if .shortPl }}{{ .shortPl }}{{ else }}{{ .short }}s{{ end }}) + {{ end }} + {{ end }} +{{ else }} + {{ errorf "No definition found for abbreviation '%q'" .Params.abbr }} +{{ end }} diff --git a/layouts/shortcodes/cite.html b/layouts/shortcodes/cite.html new file mode 100644 index 0000000..06c88c8 --- /dev/null +++ b/layouts/shortcodes/cite.html @@ -0,0 +1,16 @@ +{{ if .Params.href }} + + + {{- .Params.title -}} + + +{{ end }} diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 02b6ec6..ad3261d 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -3,6 +3,9 @@ {{- end -}} {{ $src := $.Page.Resources.GetMatch (.Get "src") }} +{{ if ( not $src ) }} + {{- errorf "No Page Resource found for src '%v' for post '%v'" ( .Get "src" ) $.Page.Title -}} +{{ end }} {{ $linkedResource := $.Page.Resources.GetMatch (.Get "link") }}
@@ -34,15 +37,19 @@ {{- if eq $src.ResourceType "image" -}} {{ with $src.Params.alt }}{{ . }}{{ else }}{{ .Get {{- else if eq $src.ResourceType "video" -}}