mirror of https://github.com/lxndrblz/anatole.git

lxndrblz
18.08.2022 800b13d687b8df22e9050874366e5ce79e7b80bf
style: prettier format all files
23 files modified
226 ■■■■■ changed files
assets/js/anatole-theme-switcher.js 3 ●●●● patch | view | raw | blame | history
layouts/404.html 1 ●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 22 ●●●● patch | view | raw | blame | history
layouts/_default/list.html 15 ●●●●● patch | view | raw | blame | history
layouts/_default/single.html 34 ●●●●● patch | view | raw | blame | history
layouts/index.html 27 ●●●●● patch | view | raw | blame | history
layouts/partials/analytics/simpleanalytics.html 2 ●●●●● patch | view | raw | blame | history
layouts/partials/comments/utterances.html 1 ●●●● patch | view | raw | blame | history
layouts/partials/expirationnote.html 6 ●●●●● patch | view | raw | blame | history
layouts/partials/footer.html 11 ●●●●● patch | view | raw | blame | history
layouts/partials/head.html 33 ●●●●● patch | view | raw | blame | history
layouts/partials/math.html 6 ●●●●● patch | view | raw | blame | history
layouts/partials/medium-zoom.html 1 ●●●● patch | view | raw | blame | history
layouts/partials/mermaid.html 1 ●●●● patch | view | raw | blame | history
layouts/partials/navbar.html 16 ●●●●● patch | view | raw | blame | history
layouts/partials/pagination.html 9 ●●●●● patch | view | raw | blame | history
layouts/partials/related.html 2 ●●●●● patch | view | raw | blame | history
layouts/partials/schema.html 2 ●●●●● patch | view | raw | blame | history
layouts/partials/series.html 1 ●●●● patch | view | raw | blame | history
layouts/partials/sidebar.html 5 ●●●●● patch | view | raw | blame | history
layouts/partials/taxonomy/template.html 1 ●●●● patch | view | raw | blame | history
layouts/portfolio/list.html 23 ●●●●● patch | view | raw | blame | history
layouts/shortcodes/notice.html 4 ●●●● patch | view | raw | blame | history
assets/js/anatole-theme-switcher.js
@@ -28,7 +28,6 @@
  }
};
document.addEventListener(
  'DOMContentLoaded',
  () => {
@@ -48,4 +47,4 @@
  if (userPrefersDark) {
    setThemeStyle('dark');
  }
}
}
layouts/404.html
@@ -5,5 +5,4 @@
    <p>{{ i18n "page_does_not_exist" }}</p>
    <p>{{ i18n "head_back" .Site.BaseURL | safeHTML }}</p>
  </div>
{{ end }}
layouts/_default/baseof.html
@@ -3,26 +3,20 @@
  dir="{{ .Site.Language.LanguageDirection | default "ltr" }}"
  lang="{{- site.Language.Lang -}}"
  data-theme="{{- .Site.Params.displayMode -}}"
    {{ if eq .Site.Params.displayMode "dark" }}
      class="html theme--dark"
    {{ else }}
      class="html theme--light"
    {{ end }}
  {{ if eq .Site.Params.displayMode "dark" }}
    class="html theme--dark"
  {{ else }}
    class="html theme--light"
  {{ end }}
>
  {{- partial "head.html" . -}}
  <body
      class="body"
  >
  <body class="body">
    <div class="wrapper">
      <aside
        {{ if and (not .IsHome) (eq .Site.Params.hidesidebar true) }}
          class="wrapper__sidebar wrapper__sidebar--hidden"
        {{ else }}
          class="wrapper__sidebar"
        {{ end }}
      >
        {{- partial "sidebar.html" . -}}
@@ -30,10 +24,8 @@
      <main
        {{ if and (not .IsHome) (eq .Site.Params.hidesidebar true) }}
          class="wrapper__main wrapper__main--fullscreen"
        {{ else }}
          class="wrapper__main"
        {{ end }}
      >
        <header class="header">{{ partial "navbar.html" . }}</header>
@@ -45,8 +37,6 @@
    {{- if (eq .Site.Params.simpleAnalytics.enable true) -}}
      {{- partial "analytics/simpleanalytics.html" . -}}
    {{- end -}}
  </body>
</html>
layouts/_default/list.html
@@ -2,10 +2,8 @@
  <div
    class="archive {{ with .Site.Params.doNotLoadAnimations }}
      .
    {{ else }}
      animated fadeInDown
    {{ end }}"
  >
    {{ range .Data.Pages.GroupByDate "2006" }}
@@ -18,36 +16,23 @@
              {{ if isset .Site.Params "listdateformat" }}
                {{ if .Site.Params.localizedDates }}
                  {{ time.Format .Site.Params.listDateFormat .Date }}
                {{ else }}
                  {{ .Date.Format .Site.Params.listDateFormat }}
                {{ end }}
              {{ else }}
                {{ if .Site.Params.localizedDates }}
                  {{ time.Format "Jan 2" .Date }}
                {{ else }}
                  {{ .Date.Format "Jan 2" }}
                {{ end }}
              {{ end }}
            </div>
          </li>
        </ul>
      {{ end }}
    {{ end }}
  </div>
{{ end }}
layouts/_default/single.html
@@ -2,17 +2,14 @@
  <div
    class="post {{ with .Site.Params.doNotLoadAnimations }}
      .
    {{ else }}
      animated fadeInDown
    {{ end }}"
  >
    {{ if .Params.thumbnail }}
      <div class="post__thumbnail-wrapper">
        <img class="post__thumbnail" src="{{ .Params.thumbnail | relURL }}" alt="Thumbnail image" />
      </div>
    {{ end }}
    <div class="post__content">
      <h1>{{ title .Title }}</h1>
@@ -24,27 +21,17 @@
              >{{ if isset .Site.Params "singledateformat" }}
                {{ if .Site.Params.localizedDates }}
                  {{ time.Format .Site.Params.singleDateFormat .Date }}
                {{ else }}
                  {{ .Date.Format .Site.Params.singleDateFormat }}
                {{ end }}
              {{ else }}
                {{ if .Site.Params.localizedDates }}
                  {{ time.Format "Mon, Jan 2, 2006" .Date }}
                {{ else }}
                  {{ .Date.Format "Mon, Jan 2, 2006" }}
                {{ end }}
              {{ end }}
            </span>
          </li>
@@ -53,7 +40,6 @@
            <span class="post__meta-text">{{ i18n "reading_time" .ReadingTime }}</span>
          </li>
        </ul>
      {{ end }}
      {{- partial "expirationnote.html" . -}}
@@ -61,47 +47,33 @@
      {{- if (eq .Params.toc true) -}}
        <h3>Table of Contents</h3>
        {{ .TableOfContents }}
      {{- end -}}
      {{ .Content }}
      {{- if isset .Params "series" -}}
        {{- partial "series.html" . -}}
      {{- end -}}
      {{- if (eq .Site.Params.relatedPosts true) -}}
        {{- partial "related.html" . -}}
      {{- end -}}
      {{- if (eq .Params.contact true) -}}
        {{- partial "contact.html" . -}}
      {{- end -}}
      {{- if (eq .Site.Params.mermaid.enable true) -}}
        {{- partial "mermaid.html" . -}}
      {{- end -}}
    </div>
    <div class="post__footer">
      {{ with .Page.Params.Categories }}
        {{ partial "taxonomy/categories.html" . }}
      {{ end }}
      {{ with .Page.Params.Tags }}
        {{ partial "taxonomy/tags.html" . }}
      {{ end }}
    </div>
@@ -111,32 +83,26 @@
          <h2>{{ i18n "comments" }}</h2>
          {{ template "_internal/disqus.html" . }}
        </div>
      {{- end -}}
      {{- if .Site.Params.utterances.repo -}}
        <div id="comment">
          <h2>{{ i18n "comments" }}</h2>
          {{ partial "comments/utterances.html" . }}
        </div>
      {{- end -}}
      {{- if .Site.Params.CommentoURL -}}
        <div id="comment">
          <h2>{{ i18n "comments" }}</h2>
          {{ partial "comments/commento.html" . }}
        </div>
      {{- end -}}
      {{- if .Site.Params.gitalk.repo -}}
        <div id="comment">
          <h2>{{ i18n "comments" }}</h2>
          {{ partial "comments/gitalk.html" . }}
        </div>
      {{- end -}}
    {{ end }}
  </div>
{{ end }}
layouts/index.html
@@ -2,10 +2,8 @@
  <div
    class="post {{ with .Site.Params.doNotLoadAnimations }}
      .
    {{ else }}
      animated fadeInDown
    {{ end }}"
  >
    <div class="post__content">
@@ -24,17 +22,14 @@
    <div
      class="post {{ with .Site.Params.doNotLoadAnimations }}
        .
      {{ else }}
        animated fadeInDown
      {{ end }}"
    >
      <div class="post__content">
        <h2>{{ .Params.mainSectionsTitle }}</h2>
      </div>
    </div>
  {{ end }}
  {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
@@ -42,10 +37,8 @@
    <div
      class="post {{ with .Site.Params.doNotLoadAnimations }}
        .
      {{ else }}
        animated fadeInDown
      {{ end }}"
    >
      {{ if .Params.thumbnail }}
@@ -54,21 +47,17 @@
            <img class="post__thumbnail" src="{{ .Params.thumbnail | relURL }}" alt="Thumbnail image" loading="lazy" />
          </a>
        </div>
      {{ end }}
      <div class="post__content">
        <h3><a href="{{ .RelPermalink }}">{{ upper .Title }}</a></h3>
        {{ if .Site.Params.fullPostContent }}
          <p>{{ .Content | markdownify }}</p>
        {{ else }}
          <p>{{ .Summary | markdownify }}</p>
        {{ end }}
        <!-- add read more -->
        {{- if and (.Truncated) (.Site.Params.readMore) -}}
          <a href="{{ .RelPermalink }}">{{ i18n "read_more" }}</a>
        {{- end -}}
      </div>
@@ -79,46 +68,30 @@
          >{{ if isset .Site.Params "indexdateformat" }}
            {{ if .Site.Params.localizedDates }}
              {{ time.Format .Site.Params.indexDateFormat .Date }}
            {{ else }}
              {{ .Date.Format .Site.Params.indexDateFormat }}
            {{ end }}
          {{ else }}
            {{ if .Site.Params.localizedDates }}
              {{ time.Format "Mon, Jan 2, 2006" .Date }}
            {{ else }}
              {{ .Date.Format "Mon, Jan 2, 2006" }}
            {{ end }}
          {{ end }}</span
        >
        {{ with .Page.Params.Categories }}
          {{ partial "taxonomy/categories.html" . }}
        {{ end }}
        {{ with .Page.Params.Tags }}
          {{ partial "taxonomy/tags.html" . }}
        {{ end }}
      </div>
    </div>
  {{ end }}
  <div class="pagination">
    {{ template "partials/pagination.html" . }}
  </div>
{{ end }}
layouts/partials/analytics/simpleanalytics.html
@@ -1,9 +1,7 @@
{{ with .Site.Params.simpleAnalytics.customUrl }}
  <script async defer src="{{ . | relURL }}/latest.js"></script>
  <noscript><img src="{{ . | relURL }}/noscript.gif" alt="" /></noscript>
{{ else }}
  <script async defer src=" https://scripts.simpleanalyticscdn.com/latest.js"></script>
  <noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" /></noscript>
{{ end }}
layouts/partials/comments/utterances.html
@@ -5,7 +5,6 @@
  theme="{{ .Site.Params.utterances.theme }}"
  {{ with .Site.Params.utterances.label }}
    label="{{ . }}"
  {{ end }}
  crossorigin="anonymous"
  async
layouts/partials/expirationnote.html
@@ -4,14 +4,10 @@
  {{- if and (ne .Type "post") (ne .Type .Site.Params.postSectionName) -}}
    {{- $duration = 0 -}}
  {{- end -}}
  {{- if (isset .Params "old_content_duration") -}}
    {{- $duration = .Params.old_content_duration -}}
  {{- end -}}
  {{- if and (gt $ageDays $duration) (ne $duration 0) -}}
@@ -19,8 +15,6 @@
      <div class="alert__indicator">!</div>
      {{ i18n "old_content_warning" (dict "Count" $duration) }}
    </div>
  {{- end -}}
{{- end -}}
layouts/partials/footer.html
@@ -4,12 +4,9 @@
      &copy;
      {{ if isset .context.Site.Params "copyright" }}
        {{ replace .context.Site.Params.copyright "{{ YEAR }}" (now.Format "2006") | markdownify }}
      {{ else }}
        {{ .context.Site.Params.author }}
        {{ now.Format "2006" }}
      {{ end }}
    </li>
    {{ range .context.Site.Menus.footer }}
@@ -19,14 +16,12 @@
          href="{{ .URL }}"
          {{ if strings.HasPrefix .URL "http" }}
            target="_blank" rel="noopener noreferrer"
          {{ end }}
          title="{{ .Title }}"
        >
          {{ .Name }}
        </a>
      </li>
    {{ end }}
  </ul>
</footer>
@@ -34,15 +29,9 @@
{{- partial "math.html" .context -}}
{{- if (hasPrefix .context.Site.GoogleAnalytics "G-") -}}
  {{- template "_internal/google_analytics.html" .context -}}
{{- else -}}
  {{- template "_internal/google_analytics_async.html" .context -}}
{{- end -}}
{{- if and (hugo.IsProduction) (.context.Site.Params.gtagId) -}}
  {{ partial "google-analytics-gtag-async.html" .context }}
{{- end -}}
layouts/partials/head.html
@@ -3,20 +3,14 @@
    {{ if (eq .Site.Params.reversepagetitle true) }}
      {{ with .Title }}
        {{ . }} |
      {{ end }}
      {{- .Site.Params.author -}}
    {{ else }}
      {{- .Site.Params.author -}}{{ with .Title }}
        |
        {{ . }}
      {{ end }}
    {{ end }}
  </title>
@@ -30,21 +24,15 @@
    name="description"
    content="{{ if .Params.description }}
      {{- .Params.description -}}
    {{ else }}
      {{- .Site.Params.description -}}
    {{ end }}"
  />
  {{ if .Params.redirectUrl }}
    <meta http-equiv="refresh" content="1; url={{ .Params.redirectUrl }}" />
  {{ end }}
  {{- if .Site.Params.googleSiteVerify }}
    <meta name="google-site-verification" content="{{ .Site.Params.googleSiteVerify }}" />
  {{- end -}}
@@ -59,7 +47,6 @@
      crossorigin="anonymous"
      type="text/css"
    />
  {{ else }}
    {{ $sassTemplate := resources.Get "scss/anatole.scss" }}
    {{ $style := $sassTemplate | resources.ExecuteAsTemplate "scss/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
@@ -70,7 +57,6 @@
      crossorigin="anonymous"
      type="text/css"
    />
  {{ end }}
  {{ $markupHighlightStyle := resources.Get "css/markupHighlight.css" | resources.Minify | resources.Fingerprint }}
@@ -91,7 +77,6 @@
      crossorigin="anonymous"
      media="screen"
    />
  {{ end }}
  {{ $style := resources.Get "fontawesome/css/fontawesome.min.css" | resources.Fingerprint }}
  <link
@@ -134,7 +119,6 @@
      crossorigin="anonymous"
      type="text/css"
    />
  {{- end -}}
  {{ if .Site.Params.googleFonts }}
    {{ $baseUrl := "https://fonts.googleapis.com/css2?family=" }}
@@ -143,7 +127,6 @@
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link href="{{ $url }}" rel="stylesheet" />
  {{- end -}}
@@ -158,8 +141,6 @@
  <!-- RSS -->
  {{ with .OutputFormats.Get "rss" -}}
    {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
  {{ end -}}
@@ -182,34 +163,25 @@
      integrity="{{ $secureThemeSwitcherJS.Data.Integrity }}"
      crossorigin="anonymous"
    ></script>
  {{ end }}
  {{- $js := "" -}}
  {{- range .Site.Params.customJs -}}
    {{- if or (in . "http://") (in . "https://") -}}
      <script src="{{ . | relURL }}"></script>
    {{- else -}}
      {{- $customJS := resources.Get . -}}
      {{- if $customJS -}}
        {{- if eq $js "" -}}
          {{- $js = $customJS -}}
        {{- else -}}
          {{- $js = slice $js $customJS | resources.Concat "js/custom.js" -}}
        {{- end -}}
      {{- end -}}
    {{- end -}}
  {{- end -}}
  {{- if ne $js "" -}}
@@ -220,19 +192,14 @@
      integrity="{{ $secureJS.Data.Integrity }}"
      crossorigin="anonymous"
    ></script>
  {{- end -}}
  {{ if and hugo.IsProduction .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }}
    {{- partial "analytics/plausible" . -}}
  {{ end }}
  {{ if and hugo.IsProduction .Site.Params.umami.serverURL .Site.Params.umami.id }}
    {{- partial "analytics/umami" . -}}
  {{ end }}
layouts/partials/math.html
@@ -4,11 +4,8 @@
  {{- with site.Params.math -}}
    {{- if and (isset . "use") (eq (.use | lower) "mathjax") -}}
      {{- $use = "mathjax" -}}
    {{- end -}}
  {{- end -}}
  {{- if eq $use "mathjax" -}}
@@ -18,7 +15,6 @@
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });
    </script>
  {{- else -}}
    {{- $url := "https://cdn.jsdelivr.net/npm/katex@0.13.0/dist/katex.min.css" -}}
    {{- $hash := "sha384-t5CR+zwDAROtph0PXGte6ia8heboACF9R5l/DiY+WZ3P2lxNgvJkQk5n7GPvLMYw" -}}
@@ -37,8 +33,6 @@
      crossorigin="anonymous"
      onload="renderMathInElement(document.body);"
    ></script>
  {{- end -}}
{{- end -}}
layouts/partials/medium-zoom.html
@@ -8,5 +8,4 @@
    integrity="{{ $secureJS.Data.Integrity }}"
    crossorigin="anonymous"
  ></script>
{{- end -}}
layouts/partials/mermaid.html
@@ -3,5 +3,4 @@
  <script>
    mermaid.initialize({ startOnLoad: true });
  </script>
{{ end }}
layouts/partials/navbar.html
@@ -1,10 +1,8 @@
<div
  class="{{ with .Site.Params.doNotLoadAnimations }}
    .
  {{ else }}
    animated fadeInDown
  {{ end }}"
>
  <a role="button" class="navbar-burger" data-target="navMenu" aria-label="menu" aria-expanded="false">
@@ -27,11 +25,8 @@
              {{ range $menuItem.Children }}
                {{ if eq $url .URL }}
                  {{ $labelClass = "optionswitch__label nav__link--active" }}
                {{ end }}
              {{ end }}
@@ -47,38 +42,31 @@
                      href="{{ .URL }}"
                      {{ if strings.HasPrefix .URL "http" }}
                        target="_blank" rel="noopener noreferrer"
                      {{ end }}
                      title="{{ .Title }}"
                      >{{ .Name }}</a
                    >
                  </li>
                {{ end }}
              </ul>
            </div>
          </li>
        {{ else }}
          <li class="nav__list-item">
            <a
              {{ if $active }}
                class="nav__link--active"
              {{ end }}
              href="{{ .URL }}"
              {{ if strings.HasPrefix .URL "http" }}
                target="_blank" rel="noopener noreferrer"
              {{ end }}
              title="{{ .Title }}"
              >{{ $menuItem.Name }}</a
            >
          </li>
        {{ end }}
      {{ end }}
    </ul>
    <ul class="nav__list nav__list--end">
@@ -97,19 +85,16 @@
                    ><span
                      {{ if eq . $.Site.Language }}
                        class="active"
                      {{ end }}
                      aria-label="{{ i18n "ariaLanguage" }}{{ .Language.LanguageName }}"
                      >{{ .Language.LanguageName }}</span
                    >
                  </a>
                </li>
              {{ end }}
            </ul>
          </div>
        </li>
      {{ end }}
      {{ if not .Site.Params.disableThemeSwitcher }}
        <li class="nav__list-item">
@@ -119,7 +104,6 @@
            </a>
          </div>
        </li>
      {{ end }}
    </ul>
  </nav>
layouts/partials/pagination.html
@@ -8,7 +8,6 @@
          <i class="fa fa-angle-left" aria-label="Previous"></i>
        </a>
      </li>
    {{ end }}
    {{ range .Paginator.Pagers }}
      {{ if eq . $.Paginator }}
@@ -17,29 +16,23 @@
            {{- .PageNumber -}}
          </span>
        </li>
      {{ else if or (or (eq . $.Paginator.First) (eq . $.Paginator.Prev)) (or  (eq . $.Paginator.Next) (eq . $.Paginator.Last )) }}
        <li class="pagination__list-item">
          <a class="page-link" href="{{ .URL }}">
            {{- .PageNumber -}}
          </a>
        </li>
      {{ else }}
        {{ if and (not ($.Scratch.Get "hasPrevDots")) (lt .PageNumber $.Paginator.PageNumber) }}
          {{ $.Scratch.Set "hasPrevDots" true }}
          <span class="page-link dots">&hellip;</span>
        {{ else if and (not ($.Scratch.Get "hasNextDots")) (gt .PageNumber $.Paginator.PageNumber) }}
          {{ $.Scratch.Set "hasNextDots" true }}
          <span class="page-link dots">&hellip;</span>
        {{ end }}
      {{ end }}
    {{ end }}
    {{ if .Paginator.HasNext }}
      <li class="pagination__list-item">
@@ -47,8 +40,6 @@
          <i class="fa fa-angle-right" aria-label="Next"></i>
        </a>
      </li>
    {{ end }}
  </ul>
{{ end }}
layouts/partials/related.html
@@ -4,8 +4,6 @@
  <ul>
    {{ range . }}
      <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
    {{ end }}
  </ul>
{{ end }}
layouts/partials/schema.html
@@ -10,7 +10,6 @@
      "license": "{{ .Site.Params.Copyright }}"
    }
  </script>
{{ else if .IsPage }}
  {{ $author :=  or (.Params.author) (.Site.Params.author) }}
  {{ $favicon := .Site.Params.favicon | absURL }}
@@ -117,5 +116,4 @@
    {{ end }}]
    }
  </script>
{{ end }}
layouts/partials/series.html
@@ -5,6 +5,5 @@
<ul>
  {{ range $related }}
    <li><a href="{{ .Page.RelPermalink }}">{{ title .Page.Title }}</a></li>
  {{ end }}
</ul>
layouts/partials/sidebar.html
@@ -1,10 +1,8 @@
<div
  class="sidebar{{ with .Site.Params.doNotLoadAnimations }}
    .
  {{ else }}
    animated fadeInDown
  {{ end }}"
>
  <div class="sidebar__content">
@@ -18,12 +16,10 @@
        <h1 class="sidebar__introduction-title">
          <a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Params.Title }}</a>
        </h1>
      {{ else }}
        <div class="sidebar__introduction-title">
          <a href="{{ .Site.BaseURL | relLangURL }}">{{ .Site.Params.Title }}</a>
        </div>
      {{ end }}
      <div class="sidebar__introduction-description">
        <p>{{ replace .Site.Params.description "\n" "<br />" | safeHTML }}</p>
@@ -42,7 +38,6 @@
            <i class="{{ $item.icon }} fa-2x" aria-hidden="true"></i>
          </a>
        </li>
      {{ end }}
    </ul>
  </div>
layouts/partials/taxonomy/template.html
@@ -9,6 +9,5 @@
    {{- $item = replace $item "." "%2e" -}}
    {{- $link := ( printf "%s/%s/" $linkBase ( $item | urlize ) ) | relLangURL -}}
    <a class="{{ $linkClass }}" href="{{ $link }}">{{- . -}}</a>
  {{- end -}}
</span>
layouts/portfolio/list.html
@@ -3,10 +3,8 @@
    <div
      class="post {{ with .Site.Params.doNotLoadAnimations }}
        .
      {{ else }}
        animated fadeInDown
      {{ end }}"
    >
      {{ $anchorTitle := delimit (split .title " ") "" }}
@@ -17,31 +15,24 @@
            <div
              class="portfolio__image-wrapper {{ if (modBool $i 2) }}
                portfolio__image-wrapper--right
              {{ else }}
                portfolio__image-wrapper--left
              {{ end }}"
            >
              {{ if .link }}
                <a href="{{ .link | safeURL }}" target="_blank" rel="noopener">
                  <img class="portfolio__image" src="{{ .image | relURL }}" alt="{{ .name | markdownify }}" />
                </a>
              {{ else }}
                <img class="portfolio__image" src="{{ .image | relURL }}" alt="{{ .name | markdownify }}" />
              {{ end }}
            </div>
          {{ end }}
          <div
            class="portfolio__description {{ if (modBool $i 2) }}
              portfolio__description--left
            {{ else }}
              portfolio__description--right
            {{ end }}"
          >
            <h2>{{ .name | markdownify }}</h2>
@@ -51,28 +42,24 @@
                  <em class="fas fa-flag-checkered"></em>
                  <span>{{ .status }}</span>
                </li>
              {{ end }}
              {{ if .venue }}
                <li class="portfolio__meta-item">
                  <em class="fas fa-map-marker-alt"></em>
                  <span>{{ .venue }}</span>
                </li>
              {{ end }}
              {{ if .start }}
                <li class="portfolio__meta-item">
                  <em class="fas fa-arrow-up"></em>
                  <span>{{ .start }}</span>
                </li>
              {{ end }}
              {{ if .end }}
                <li class="portfolio__meta-item">
                  <em class="fas fa-arrow-down"></em>
                  <span>{{ .end }}</span>
                </li>
              {{ end }}
              {{ if .authors }}
                {{ range .authors }}
@@ -80,10 +67,8 @@
                    <em class="fas fa-at"></em>
                    <span>{{ . }}</span>
                  </li>
                {{ end }}
              {{ end }}
            </ul>
            <p>{{ .description | markdownify }}</p>
@@ -92,29 +77,21 @@
                <a class="portfolio__button" href="{{ .link | safeURL }}" target="_blank" rel="noopener">
                  {{- if .linktext -}}
                    {{ .linktext | markdownify }}
                  {{- else -}}
                    Visit Site
                  {{- end -}}
                </a>
              </div>
            {{ end }}
            <div class="seperator">
              {{ range .tags }}
                <p class="tag">{{ . }}</p>
              {{ end }}
            </div>
          </div>
        </div>
      {{ end }}
    </div>
  {{ end }}
{{ end }}
layouts/shortcodes/notice.html
@@ -3,19 +3,15 @@
<div
  class="notice{{ if eq $noticeType "warning" }}
    notice--warning
  {{ else if eq $noticeType "update" }}
    notice--update
  {{ end }}"
>
  <span
    class="notice__title{{ if eq $noticeType "warning" }}
      notice__title--warning
    {{ else if eq $noticeType "update" }}
      notice__title--update
    {{ end }}"
  >
    {{- i18n $noticeType -}}