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

Alexander Bilz
14.03.2022 09c09d87f814f778e23dd5ba0aef7fdddfea64d2
refactor: added back templating ability

3 files modified
23 ■■■■ changed files
assets/scss/main.scss 3 ●●●●● patch | view | raw | blame | history
assets/scss/modules/_variables.scss 2 ●●● patch | view | raw | blame | history
layouts/partials/head.html 18 ●●●●● patch | view | raw | blame | history
assets/scss/main.scss
@@ -1,3 +1,6 @@
$layout-direction: {{ .Site.Language.LanguageDirection | default "ltr" }};
$content-ratio: {{ .Site.Params.contentratio | default 0.6 }};
@import './modules/variables';
@import './modules/config';
@import './modules/color_theme';
assets/scss/modules/_variables.scss
@@ -35,7 +35,7 @@
$thumbnail-height: 15em;
$scroll-padding-top: 100px;
$body-max-width: 1920px;
$content-ratio: 0.6;
$sidebar-ratio: calc(1 - #{$content-ratio});
$content-max-width: calc(#{$body-max-width} * #{$content-ratio});
$sidebar-max-width: calc(#{$body-max-width} - #{$content-max-width});
layouts/partials/head.html
@@ -48,7 +48,7 @@
  <!-- CSS -->
  {{ $sassTemplate := resources.Get "scss/main.scss" }}
  {{ $style := $sassTemplate | resources.ToCSS | resources.Minify | resources.Fingerprint }}
  {{ $style := $sassTemplate | resources.ExecuteAsTemplate "scss/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint }}
  <link
@@ -58,23 +58,7 @@
    crossorigin="anonymous"
    type="text/css"
  />
  {{ if eq .Site.Language.LanguageDirection "rtl" }}
    <!-- Arabic font -->
    <link
      rel="stylesheet"
      href="https://fonts.googleapis.com/css?family=Tajawal:300,500,700&display=swap&subset=arabic"
    />
    {{ $templateStyle := resources.Get "css/style.rtl.css" }}
    {{ $style := $templateStyle  | resources.ExecuteAsTemplate "css/main.rtl.css" . | resources.Minify | resources.Fingerprint }}
    <link
      rel="stylesheet"
      href="{{ $style.RelPermalink }}"
      integrity="{{ $style.Data.Integrity }}"
      crossorigin="anonymous"
      type="text/css"
    />
  {{ end }}
  {{ $markupHighlightStyle := resources.Get "css/markupHighlight.css" | resources.Minify | resources.Fingerprint }}
  <link
    rel="stylesheet"