all repos — archie @ a75faae0d7444d5af94e5bbec3446514f7beb607

A minimal Hugo Theme

Merge pull request #15 from francisbarton/patch-2

Add custom CSS option - fixes issue #14
Athul Cyriac Ajay athul8720@gmail.com
Mon, 05 Oct 2020 00:04:59 +0530
commit

a75faae0d7444d5af94e5bbec3446514f7beb607

parent

acd619ee67515f9b7bc52f250f02fe93fc955583

1 files changed, 7 insertions(+), 1 deletions(-)

jump to
M layouts/partials/header.htmllayouts/partials/header.html

@@ -43,6 +43,12 @@ <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">

<link rel="stylesheet" type="text/css" media="screen" href="{{ .Site.BaseURL }}css/main.css" /> {{- if or (eq .Site.Params.mode "auto") (eq .Site.Params.mode "dark") -}} <link rel="stylesheet" type="text/css" href="{{ .Site.BaseURL }}css/dark.css" {{ if eq .Site.Params.mode "auto" }}media="(prefers-color-scheme: dark)"{{ end }} /> + {{ end }} + <!-- Custom CSS style get applied last --> + {{- if isset .Site.Params "customcss" }} + {{ range .Site.Params.customCSS }} + <link rel="stylesheet" type="text/css" ref="{{ . | relURL }}"> + {{ end }} {{- end -}} {{- range .Site.Params.customJS }} {{- if or (hasPrefix . "http://") (hasPrefix . "https://") }}

@@ -51,4 +57,4 @@ {{- else }}

<script src="{{ $.Site.BaseURL }}{{ . }}"></script> {{- end }} {{- end }} -</head>+</head>