~dricottone/blog

ref: 802e6f4ba742dd2e8930bf810759c5665a3cd19f blog/layouts/partials/head.html -rw-r--r-- 1.5 KiB
802e6f4bDominic Ricottone Redesign of header/navigation 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<head>
  <meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">

  <!-- Page titles
        + Use "MyFileTitle | Dominic Ricottone"
        + Exceptions for...
           + site homepage
           + if "site_title = true" is set in the file
          ... in which case use just "Dominic Ricottone"
    -->
  {{ $title := print .Title " | " .Site.Title }}
  {{ if or (.IsHome) (.Params.site_title) }}{{ $title = .Site.Title }}{{ end }}
  <title>{{ $title }}</title>

  <!--Stylesheets-->
  <link rel="stylesheet" type="text/css" href="/css/common.css" />
  <link rel="stylesheet" type="text/css" href="/css/blog.css" />
  {{ if .Params.cgit }}     <link rel="stylesheet" type="text/css" href="/css/cgit.css" /> {{ end }}
  {{ if .Params.lightbox }} <link rel="stylesheet" type="text/css" href="/css/gallery.css" /> {{ end }}
  {{ if .Params.lightbox }} <link rel="stylesheet" type="text/css" href="/css/lightbox-2.11.3.min.css" /> {{ end }}

  <!--JavaScript-->
  <script src="/js/jquery-3.6.0.min.js"></script>
  {{ if .Params.chat }}     <script src="/js/chat.js"></script> {{ end }}
  {{ if .Params.lightbox }} <script src="/js/lightbox-2.11.3.min.js"></script> {{ end }}
  <script>
$(document).ready(function() {
  $("nav button#navi").on("click", function(event) {
    $("nav ul#naviList").toggleClass("hide");
  });
  $("nav button#navi p").on("keypress", function(event) {
    if (event.which !== 13) {
      return;
    }
    $("nav ul#naviList").toggleClass("hide");
  });
});
  </script>
</head>