refactor[layouts]: reorganize head and header according to standards

According to latest HTML standards, head is for metadata, header for
headers/other content
This commit is contained in:
f-dinucci 2022-05-30 22:45:02 +02:00 committed by Giuseppe Masino
parent 9fd5f1420c
commit 73ee4f6f09
2 changed files with 28 additions and 21 deletions

View File

@ -0,0 +1,27 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- CSS - Local -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/index.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/navbar.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/tailwind.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/fontawesome/css/all.min.css" >
<!-- CSS - Remote -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css">
<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- Navbar scrolling script -->
<script type="text/javascript">
window.addEventListener('scroll', ()=>{
const nav = document.querySelector('nav')
nav.classList.toggle('onscroll', window.scrollY > 0)
})
</script>
<!-- Title attribute -->
<title>{{.Title}}</title>
</head>

View File

@ -1,21 +1 @@
<meta charset="UTF-8" /> {{ partial "navbar.html" . }}
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- CSS - Local -->
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/index.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/navbar.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/tailwind.min.css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/fontawesome/css/all.min.css" >
<!-- CSS - Remote -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css">
<!-- Favicon -->
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<script type="text/javascript">
window.addEventListener('scroll', ()=>{
const nav = document.querySelector('nav')
nav.classList.toggle('onscroll', window.scrollY > 0)
})
</script>