Skip to content

Commit

Permalink
Favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Manning committed Dec 1, 2021
1 parent 9eb7b48 commit c055dd0
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 21 deletions.
38 changes: 22 additions & 16 deletions assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ suffixes = ['php']
mediaType = "application/x-php"
isPlainText = true
permalinkable = true
noUgly = true

[params]
scssOutputStyle = "compressed"
scssEnableSourceMap = true
10 changes: 6 additions & 4 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

{{ $cssoptions := (dict "outputStyle" .Site.Params.scssOutputStyle "enableSourceMap" .Site.Params.scssEnableSourceMap) }}

<!-- Main combined stylesheet -->
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS | resources.Minify | resources.Fingerprint "sha512" }}
{{ $style := resources.Get "sass/main.scss" | resources.ToCSS $cssoptions | resources.Fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}">

<!-- Scout font. -->
{{ $font := resources.Get "sass/nunitosans.scss" | resources.ExecuteAsTemplate "sass/nunitosans.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint "sha512" }}
{{ $font := resources.Get "sass/nunitosans.scss" | resources.ExecuteAsTemplate "sass/nunitosans.scss" . | resources.ToCSS $cssoptions | resources.Fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $font.RelPermalink }}" integrity="{{ $font.Data.Integrity }}">

<!-- Favicons -->
{{ $logo := resources.Get "images/logo.svg" | resources.ExecuteAsTemplate "images/logo.svg" . | resources.Minify}}
<link rel="icon" href="{{ $logo.RelPermalink }}" type="image/svg+xml">
{{ $favicon := resources.Get "images/logo.svg" | resources.ExecuteAsTemplate "images/favicon.svg" (dict "ctx" . "type" "favicon") | resources.Minify}}
<link rel="icon" href="{{ $favicon.RelPermalink }}" type="image/svg+xml">


<title>{{ if .Title }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/nav.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">
{{ $logo := resources.Get "images/logo.svg" | resources.ExecuteAsTemplate "images/logo.svg" . | resources.Minify}}
{{ $logo := resources.Get "images/logo.svg" | resources.ExecuteAsTemplate "images/logo.svg" (dict "ctx" . "type" "main") | resources.Minify}}
<img src="{{ $logo.RelPermalink }}" alt="{{ .Site.Params.group }}" height=100px>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarMain" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
Expand Down

0 comments on commit c055dd0

Please sign in to comment.