A load of work done.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Bulma customization
|
||||
|
||||
$primary = #0b2a37;
|
||||
$primary: #0b2a37;
|
||||
|
||||
// /Bulma customization
|
||||
|
||||
@@ -11,5 +11,50 @@ $primary = #0b2a37;
|
||||
// Custom styles
|
||||
|
||||
|
||||
.big-logo {
|
||||
font-size: 80px;
|
||||
color: $primary-invert;
|
||||
&:hover {
|
||||
color: darken($primary-invert, 10);
|
||||
}
|
||||
}
|
||||
|
||||
#home-navbar {
|
||||
&:not(.is-fixed-top) {
|
||||
patek-logo {
|
||||
font-size: 0;
|
||||
}
|
||||
}
|
||||
&.is-fixed-top {
|
||||
patek-logo {
|
||||
font-size: unset;
|
||||
}
|
||||
}
|
||||
patek-logo {
|
||||
transition: font-size 0.2s;
|
||||
}
|
||||
}
|
||||
.is-fixed-top .navbar {
|
||||
left: 0;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
z-index: 30;
|
||||
top: 0;
|
||||
}
|
||||
.is-fixed-top .menu-placeholder {
|
||||
height: 52px;
|
||||
visibility: hidden;
|
||||
}
|
||||
.home-content, .home-content h1 {
|
||||
background-color: $primary;
|
||||
color: $primary-invert !important;
|
||||
font-family: 'Fira Code';
|
||||
}
|
||||
.footer {
|
||||
background-color: $primary;
|
||||
color: $primary-invert;
|
||||
text-align: center;
|
||||
font-family: 'Fira Code';
|
||||
font-size: smaller;
|
||||
}
|
||||
// /Custom styles
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.addEventListener("scroll", () => {
|
||||
if (window.scrollY > document.querySelector("#home-navbar .menu-placeholder").offsetTop) {
|
||||
document.getElementById("home-navbar").classList.add("is-fixed-top");
|
||||
} else {
|
||||
document.getElementById("home-navbar").classList.remove("is-fixed-top");
|
||||
}
|
||||
});
|
||||
});
|
||||
+1
Submodule themes/patek/assets/js/patek-logo-custom-element added at d3ba819e7d
@@ -2,10 +2,16 @@
|
||||
<html>
|
||||
{{- partial "head.html" . -}}
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{ block "body" . }}
|
||||
{{- partial "header.html" . -}}
|
||||
<div id="content">
|
||||
<div class="section">
|
||||
<div class="container">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{ define "main" }}
|
||||
<h2 class="title">{{ .Title }}</h2>
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{ define "body" }}
|
||||
|
||||
<div class="hero is-primary">
|
||||
<div class="hero-body">
|
||||
<div class="container">
|
||||
<a href="{{ .Site.Home.Permalink }}">
|
||||
<patek-logo class="big-logo"></patek-logo>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="home-navbar">
|
||||
{{ partial "menu.html" . }}
|
||||
</div>
|
||||
<div id="content" class="home-content">
|
||||
<div class="section">
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "footer.html" . }}
|
||||
{{ partial "js.html" "js/home.js"}}
|
||||
|
||||
{{ end }}
|
||||
@@ -0,0 +1,5 @@
|
||||
<footer class="footer">
|
||||
<div class="content">
|
||||
{{ partial "footerContent.html" . }}
|
||||
</div>
|
||||
</footer>
|
||||
@@ -1,8 +1,11 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ block "title" . }}{{ .Title }} » {{ .Site.Title }}{{ end }}</title>
|
||||
<title>{{ block "title" . }}{{ .Title }} | {{ .Site.Title }}{{ end }}</title>
|
||||
{{ block "css" . -}}
|
||||
<link rel="stylesheet" href="https://unpkg.com/firacode@1.206.0/distr/fira_code.css">
|
||||
{{ partial "sass.html" "css/main.scss" }}
|
||||
<meta name="theme-color" content="#0b2a37">
|
||||
{{- end }}
|
||||
|
||||
{{ block "js" . -}}
|
||||
{{ partial "js.html" "js/patek-logo-custom-element/patekLogo.js" }}
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<div class="is-fixed-top">
|
||||
{{ partial "menu.html" . }}
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
{{ $asset := resources.Get . | minify | fingerprint -}}
|
||||
<script type="text/javascript" src="{{ $asset.Permalink }}" integrity="{{ $asset.Data.Integrity }}"></script>
|
||||
@@ -0,0 +1,51 @@
|
||||
<div class="menu-placeholder"></div>
|
||||
<nav id="main-menu-bar" class="navbar is-primary">
|
||||
<div class="container">
|
||||
<div class="navbar-brand">
|
||||
<a href="{{ .Site.Home.Permalink }}" class="navbar-item"><patek-logo></patek-logo></a>
|
||||
<div class="navbar-burger" id="main-menu-burger" onclick="document.querySelectorAll('#main-menu, #main-menu-burger').forEach(function (value) { value.classList.toggle('is-active') })">
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
<span aria-hidden="true"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navbar-menu is-marginless" id="main-menu">
|
||||
<div class="navbar-start">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
{{ if .HasChildren }}
|
||||
<div class="navbar-item has-dropdown is-hoverable {{ if $currentPage.HasMenuCurrent "main" . }}is-hovered{{ end }}">
|
||||
{{- $url := urls.Parse .URL -}}
|
||||
{{ if ne .URL "" }}<a class="navbar-link" href="{{- .URL -}}"{{ if $url.Host }} target="_blank"{{ end }}>{{ else }}<span class="navbar-link">{{ end }}
|
||||
{{- .Name -}}
|
||||
{{ if eq .URL ""}}</span>{{ else }}</a>{{ end }}
|
||||
<div class="navbar-dropdown">
|
||||
{{ range .Children }}
|
||||
{{- $url := urls.Parse .URL -}}
|
||||
{{ if ne .URL "" }}<a href="{{ .URL }}" class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }}is-hovered{{ end }}"{{ if $url.Host }} target="_blank"{{ end }}>{{ else }}<span class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }}is-hovered{{ end }}">{{ end }}
|
||||
{{- .Name -}}
|
||||
{{ if eq .URL "" }}</span>{{ else }}</a>{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
{{- $url := urls.Parse .URL -}}
|
||||
{{ if ne .URL "" }}<a href="{{ .URL }}" class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }}is-hovered{{ end }}"{{ if $url.Host }} target="_blank"{{ end }}>{{ else }}<span class="navbar-item {{ if $currentPage.IsMenuCurrent "main" . }}is-hovered{{ end }}">{{ end }}
|
||||
{{- .Name -}}
|
||||
{{ if eq .URL "" }}</span>{{ else }}</a>{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="navbar-end">
|
||||
<div class="navbar-item has-dropdown is-hoverable">
|
||||
<span class="navbar-link">{{ .Site.Language.LanguageName }}</span>
|
||||
<div class="navbar-dropdown">
|
||||
{{ range .Translations }}
|
||||
<a href="{{ .Permalink }}" class="navbar-item"> {{ .Language.LanguageName }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
Reference in New Issue
Block a user