Add grid-side theme
This commit is contained in:
17
themes/grid-side/layouts/partials/core/css.html
Normal file
17
themes/grid-side/layouts/partials/core/css.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!-- Load materialize used to provide parts of theme visuals -->
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/materialize.min.css">
|
||||
|
||||
<!-- Load font awesome used for various icons -->
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/font-awesome.min.css">
|
||||
|
||||
{{ with .Site.Params.Highlight }}
|
||||
<!-- Load highlight theme used for client-side syntax highlighting -->
|
||||
<link rel="stylesheet" href="{{ $.Site.BaseURL }}css/styles/{{ .style }}.css">
|
||||
{{ end }}
|
||||
|
||||
<!-- Load lightbox stylings -->
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/lightbox.css">
|
||||
|
||||
<!-- Load main theme stylings -->
|
||||
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/main.css">
|
||||
|
37
themes/grid-side/layouts/partials/core/head.html
Normal file
37
themes/grid-side/layouts/partials/core/head.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="author" content="{{ with .Site.Params.name }}{{ . }}{{ end }}">
|
||||
<meta name="description" content="{{ with .Site.Params.description }}{{ . }}{{ end }}">
|
||||
{{ 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 }}
|
||||
{{ .Hugo.Generator }}
|
||||
<meta name="generation-date" content="{{ .Now }}">
|
||||
<title>{{ .Title }} · {{ .Site.Title }}</title>
|
||||
<link rel="shortcut icon" href="{{ .Site.BaseURL }}img/favicon.ico">
|
||||
<link rel="icon" href="{{ .Site.BaseURL }}img/favicon.ico">
|
||||
{{ partial "core/css.html" . }}
|
||||
<script src="{{ .Site.BaseURL }}js/modernizr-latest.js"></script>
|
||||
<script src="{{ .Site.BaseURL }}js/lazysizes.min.js"></script>
|
||||
<script src="{{ .Site.BaseURL }}js/ls.noscript.min.js"></script>
|
||||
|
||||
<script>
|
||||
window.lazySizesConfig = window.lazySizesConfig || {};
|
||||
lazySizesConfig.addClasses = true;
|
||||
lazySizesConfig.loadMode = 2;
|
||||
</script>
|
||||
|
||||
{{ with .Params.redirect }}
|
||||
<!-- Attempt redirect through refresh -->
|
||||
<meta http-equiv="refresh" content="1; url={{ . }}">
|
||||
|
||||
<script>
|
||||
// Meta-refresh failed, so attempt Javascript
|
||||
window.location.href = "{{ . }}"
|
||||
</script>
|
||||
{{ end }}
|
||||
</head>
|
||||
|
2
themes/grid-side/layouts/partials/core/html-end.html
Normal file
2
themes/grid-side/layouts/partials/core/html-end.html
Normal file
@@ -0,0 +1,2 @@
|
||||
</html>
|
||||
|
6
themes/grid-side/layouts/partials/core/html-start.html
Normal file
6
themes/grid-side/layouts/partials/core/html-start.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}"
|
||||
class="no-js"
|
||||
>
|
||||
|
26
themes/grid-side/layouts/partials/core/js.html
Normal file
26
themes/grid-side/layouts/partials/core/js.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<!-- Load jquery used for various plugins -->
|
||||
<script src="{{ .Site.BaseURL }}js/jquery-2.1.4.min.js"></script>
|
||||
|
||||
<!-- Load materialize used to provide parts of theme visuals -->
|
||||
<script src="{{ .Site.BaseURL }}js/materialize.min.js"></script>
|
||||
|
||||
<!-- Load imagesloaded needed by masonry to handle adding images -->
|
||||
<script src="{{ .Site.BaseURL }}js/imagesloaded.pkgd.min.js"></script>
|
||||
|
||||
<!-- Load masonry used for layout on list pages -->
|
||||
<script src="{{ .Site.BaseURL }}js/masonry.pkgd.min.js"></script>
|
||||
|
||||
{{ if .Site.Params.Highlight }}
|
||||
<!-- Load highlight used for client-side syntax highlighting -->
|
||||
<script src="{{ .Site.BaseURL }}js/highlight.pack.js"></script>
|
||||
{{ end }}
|
||||
|
||||
<!-- Load lightbox used for gallery viewing -->
|
||||
<script src="{{ .Site.BaseURL }}js/lightbox.min.js"></script>
|
||||
|
||||
<!-- Load infinite scroll used to link together paginated content -->
|
||||
<script src="{{ .Site.BaseURL }}js/jquery.infinitescroll.min.js"></script>
|
||||
|
||||
<!-- Load theme-specific Javascript -->
|
||||
<script src="{{ .Site.BaseURL }}js/main.js"></script>
|
||||
|
59
themes/grid-side/layouts/partials/core/main-menu.html
Normal file
59
themes/grid-side/layouts/partials/core/main-menu.html
Normal file
@@ -0,0 +1,59 @@
|
||||
|
||||
{{ $baseUrl := .Site.BaseURL }}
|
||||
<nav class="main-menu menu-colors">
|
||||
<ul class="menu menu-colors no-list-float">
|
||||
<li><a href="{{ $baseUrl }}"><i class="fa fa-home fa-2x"></i></a></li>
|
||||
<li>
|
||||
<a href="#!"><i class="fa fa-bars fa-2x"></i></a>
|
||||
|
||||
<!-- NOTE: Only support two levels of menus at the moment! -->
|
||||
<ul class="menu flexible-width menu-colors no-list-float">
|
||||
{{ $currentNode := . }}
|
||||
{{ range .Site.Menus.Main }}
|
||||
<li {{ if or ($currentNode.IsMenuCurrent "Main" .) ($currentNode.HasMenuCurrent "Main" .) }}class="active"{{ end }}>
|
||||
{{ if .HasChildren }}
|
||||
<a href="#!">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
<span class="drop-right"></span>
|
||||
<!-- <i class="fa fa-caret-right"></i> -->
|
||||
</a>
|
||||
<ul class="menu flexible-width menu-colors no-list-float">
|
||||
{{ range .Children }}
|
||||
<li {{ if $currentNode.IsMenuCurrent "Main" . }} class="active" {{ end }}>
|
||||
<a href="{{ $baseUrl }}{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ else }}
|
||||
<a href="{{ $baseUrl }}{{ .URL }}">
|
||||
{{ .Pre }}
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#!" data-lightbox-id="searchbox"><i class="fa fa-search fa-2x"></i></a></li>
|
||||
{{ with .Site.Params.Footer }}
|
||||
<li class="blue-grey-text" style="border-top: 1px solid;"><!-- Separator --></li>
|
||||
{{ range .List }}
|
||||
<li>
|
||||
<a href="{{ .icon_link }}">
|
||||
<i class="fa fa-{{ .icon_class }} fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<li class="blue-grey-text" style="border-top: 1px solid;"><!-- Separator --></li>
|
||||
<li>
|
||||
<a href="{{ .RSSLink }}" type="application/rss+xml" target="_blank">
|
||||
<i class="fa fa-rss fa-2x"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{{ partial "core/search-lightbox.html" . }}
|
||||
|
@@ -0,0 +1,8 @@
|
||||
<div id="searchbox" class="no-display">
|
||||
<div class="valign-wrapper fill-container">
|
||||
<div class="valign large-form horizontal-center-hack">
|
||||
{{ partial "core/search.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
12
themes/grid-side/layouts/partials/core/search.html
Normal file
12
themes/grid-side/layouts/partials/core/search.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<form method="get" id="search" action="http://duckduckgo.com/">
|
||||
<input type="hidden" name="sites"value="{{ .Site.BaseURL }}"/>
|
||||
<input type="hidden" name="ka" value="h"/>
|
||||
<input type="hidden" name="k7" value="#fafafa"/>
|
||||
<input type="hidden" name="kj" value="#3f3f3f"/>
|
||||
<input type="hidden" name="ky" value="#fafafa"/>
|
||||
<input type="hidden" name="kx" value="b"/>
|
||||
<input type="hidden" name="kt" value="Helvetica"/>
|
||||
<input type="text" name="q" maxlength="255" placeholder="Search"/>
|
||||
<input type="submit" value="DuckDuckGo Search" style="visibility: hidden;" />
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user