Bootstrap all the things
This commit is contained in:
commit
f4b4108ffc
19 changed files with 487 additions and 0 deletions
2
layouts/partials/body-open.html
Normal file
2
layouts/partials/body-open.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<!-- Intentionally left empty. Override this partial in your website to insert code just after the
|
||||
opening <body> tag. For example, to install Google Analytics. -->
|
31
layouts/partials/css.html
Normal file
31
layouts/partials/css.html
Normal file
|
@ -0,0 +1,31 @@
|
|||
<style>
|
||||
|
||||
html body {
|
||||
font-family: '{{ .Site.Params.font }}', sans-serif;
|
||||
background-color: {{ .Site.Params.backgroundColor | default "white" }};
|
||||
}
|
||||
|
||||
:root {
|
||||
--accent: {{ .Site.Params.accent | default "#2196F3" }};
|
||||
--border-width: {{ if .Site.Params.showBorder | default false }} 5px {{ else }} 0 {{ end }};
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<!-- main -->
|
||||
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}">
|
||||
|
||||
<!-- custom -->
|
||||
{{ range .Site.Params.css }} <link rel="stylesheet" href="{{ . | absURL }}"> {{ end }}
|
||||
|
||||
<!-- google fonts -->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ .Site.Params.font }}">
|
||||
|
||||
<!-- highlight.js -->
|
||||
{{ if .Site.Params.highlight | default false }} <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/{{ .Site.Params.highlightStyle | default "default" }}.min.css"> {{ end }}
|
||||
|
||||
<!-- bootstrap -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
|
||||
<!-- font awesome -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
|
9
layouts/partials/footer.html
Normal file
9
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<footer>
|
||||
|
||||
<p class="copyright text-muted">{{ .Site.Params.copyright | default "© All rights reserved. Powered by [Hugo](https://gohugo.io) and [Minimal](https://github.com/calintat/minimal)" | markdownify }}</p>
|
||||
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
2
layouts/partials/head-open.html
Normal file
2
layouts/partials/head-open.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<!-- Intentionally left empty. Override this partial in your website to insert code just after the
|
||||
opening <head> tag. For example, to install Google Tag Manager. -->
|
77
layouts/partials/header.html
Normal file
77
layouts/partials/header.html
Normal file
|
@ -0,0 +1,77 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
{{ partial "head-open" . }}
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>{{ .Title }}</title>
|
||||
{{ if .Site.Params.favicon }}
|
||||
<link rel="icon" href="{{ .Site.Params.favicon | absURL }}">
|
||||
{{ end }}
|
||||
{{ partial "css" . }} {{ partial "js" . }} {{ .Hugo.Generator }}
|
||||
{{ if .RSSLink }}
|
||||
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.GoogleAnalytics }}
|
||||
<!-- Global Site Tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments)};
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ .Site.GoogleAnalytics }}');
|
||||
</script>
|
||||
{{ end }}
|
||||
</head>
|
||||
|
||||
{{ if .Site.Params.MathJax | default true }}
|
||||
<!-- adds MathJax support -->
|
||||
<script type="text/javascript" async
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
|
||||
</script>
|
||||
{{ end }}
|
||||
|
||||
<body>
|
||||
{{ partial "body-open" . }}
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="navbar-header">
|
||||
|
||||
<a class="navbar-brand visible-xs" href="#">{{ .Title }}</a>
|
||||
|
||||
<button class="navbar-toggle" data-target=".navbar-collapse" data-toggle="collapse">
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse">
|
||||
|
||||
{{ if .Site.Menus.main }}
|
||||
<ul class="nav navbar-nav">
|
||||
{{ range sort .Site.Menus.main }}
|
||||
<li><a href="{{ .URL }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Menus.icon }}
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
{{ range sort .Site.Menus.icon }}
|
||||
<li class="navbar-icon"><a href="{{ .URL }}"><i class="fa fa-{{ .Name }}"></i></a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</nav>
|
22
layouts/partials/js.html
Normal file
22
layouts/partials/js.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<!-- highlight.js -->
|
||||
{{ if .Site.Params.highlight | default false }}
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
|
||||
{{ range .Site.Params.highlightLanguages }} <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/{{ . }}.min.js"></script> {{ end }}
|
||||
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
|
||||
{{ end }}
|
||||
|
||||
<!-- custom -->
|
||||
{{ range .Site.Params.js }} <script src="{{ . | absURL }}"></script> {{ end }}
|
||||
|
||||
<!-- jquery -->
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
|
||||
<!-- bootstrap -->
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- dismiss expanded navigation bar with click -->
|
||||
<script>$(document).on('click', function() { $('.collapse').collapse('hide'); })</script>
|
25
layouts/partials/list-item.html
Normal file
25
layouts/partials/list-item.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<div class="item">
|
||||
|
||||
{{ $.Scratch.Set "link" .RelPermalink }}
|
||||
{{ with .Params.repo }}
|
||||
{{ $repoHost := default "github" $.Params.repoHost }}
|
||||
{{ if eq "github" $repoHost }}
|
||||
{{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "gitlab" $repoHost }}
|
||||
{{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }}
|
||||
{{ else if eq "bitbucket" $repoHost }}
|
||||
{{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }}
|
||||
|
||||
{{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }}
|
||||
{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}
|
||||
|
||||
<h4><a href="{{ .Scratch.Get "link" }}">{{ .Title }}</a></h4>
|
||||
<h5>{{ $.Scratch.Get "subtitle" }}</h5>
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}"><kbd class="item-tag">{{ . }}</kbd></a>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
17
layouts/partials/paginator.html
Normal file
17
layouts/partials/paginator.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{{ if or .Paginator.HasPrev .Paginator.HasNext }}
|
||||
|
||||
<div class="pages">
|
||||
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a class="icon pages-icon" href="{{ .Paginator.Prev.URL }}" rel="prev">
|
||||
<i class="fa fa-arrow-left"></i>
|
||||
</a>
|
||||
{{ end }} {{ if .Paginator.HasNext }}
|
||||
<a class="icon pages-icon" href="{{ .Paginator.Next.URL }}" rel="next">
|
||||
<i class="fa fa-arrow-right"></i>
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
</div>
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue