1
Fork 0

Add super basic navbar and index

This commit is contained in:
Jake Howard 2017-10-25 09:35:55 +01:00
parent 360d8bc1a3
commit 31f9dcf274
Signed by: jake
GPG key ID: 57AFB45680EDD477
4 changed files with 79 additions and 38 deletions

View file

@ -0,0 +1,53 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="Content-Language" content="{{ .Site.Language.Lang }}" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width" />
<link rel="alternate" type="application/rss+xml" href="{{ .Site.RSSLink }}" />
<meta name="superfish" content="nofish" />
<meta name="application-name" content="{{ .Site.Title }}" />
<link rel="icon" type="image/png" href="{{ .Site.BaseURL }}/img/favicon.png" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}/css/style.css" />
</head>
<body>
<nav class="navbar navbar-expand-sm navbar-dark bg-black">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">/home/{{ lower .Site.Title }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Pricing</a>
</li>
</ul>
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-github"></i></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-twitter"></i></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#"><i class="fa fa-rss"></i></a>
</li>
</ul>
</div>
</nav>
{{ block "main" . }}{{ end }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
<script src="{{ .Site.BaseURL }}/js/app.js"></script>
</body>
</html>

8
layouts/index.html Normal file
View file

@ -0,0 +1,8 @@
{{ define "main" }}
<header id="index-header" class="d-flex align-items-center" style="height: 75vh">
<div class="text-center m-auto">
<h1 class="display-1">{{ .Title }}</h1>
<p class="lead">{{ .RawContent }}</p>
</div>
</header>
{{ end }}

View file

@ -1,38 +0,0 @@
<meta name="twitter:dnt" content="on" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="{{ .Site.Data.social.accounts.twitter.username }}" />
<meta name="twitter:title" content="{{ .Title | htmlUnescape }}" />
<meta name="twitter:description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
<meta name="twitter:creator" content="{{ .Site.Data.social.accounts.twitter.username }}" />
{{ if .Params.image }}
<meta name="twitter:image" content="{{ absURL .Params.image }}" />
<meta name="twitter:image:alt" content="{{ .Title | htmlUnescape }}" />
{{ end }}
<meta property="og:title" content="{{ .Title | htmlUnescape }}" />
<meta property="og:type" content="{{ .Kind }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .Params.image }}
<meta property="og:image" content="{{ absURL .Params.image }}" />
{{ end }}
<meta property="og:description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
<meta property="og:site_name" content="{{ title .Site.Title | htmlUnescape }}" />
<meta property="og:locale" content="{{ .Site.Language.Lang }}" />
<meta itemprop="name" content="{{ .Title | htmlUnescape }}" />
<meta itemprop="description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
{{ if .Params.image }}
<meta itemprop="image" content="{{ absURL .Params.image }}" />
{{ end }}
<meta name="article:author" content="{{ title .Site.Params.author }}" />
<meta name="article:modified_time" content="{{ .Lastmod }}" />
<meta name="article:published_time" content="{{ .Date }}" />
<meta name="article:section" content="{{ .Type }}" />
<meta name="description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
<meta name="author" content="{{ title .Site.Params.author }}" />
<meta name="canonical" content="{{ .Permalink }}" />
{{ range .AlternativeOutputFormats }}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}">
{{ end }}

View file

@ -78,3 +78,21 @@ code {
table td { table td {
vertical-align: middle; vertical-align: middle;
} }
.navbar {
padding-top: 0;
padding-bottom: 0;
.navbar-brand {
font-size: $font-size-base;
}
.nav-link {
padding-left: $font-size-base !important;
padding-right: $font-size-base !important;
}
}
.bg-black {
background-color: #000;
}