Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
anhchungite committed Jun 23, 2018
1 parent 78211b2 commit 1aba89a
Showing 1 changed file with 106 additions and 0 deletions.
106 changes: 106 additions & 0 deletions layouts/_default/baseof.html
@@ -0,0 +1,106 @@
{{- if not .Params.gallery -}}
{{- if not .Params.featuredImage -}}
{{ .Scratch.Set "image" (printf "https://www.gravatar.com/avatar/%s?size=200" (md5 .Site.Params.gravatarEMail)) }}
{{- else -}}
{{ .Scratch.Set "image" (.Params.featuredImage) }}
{{- end -}}
{{- else -}}
{{ .Scratch.Set "image" (index (.Params.gallery) 0 | relURL | absURL) }}
{{- end -}}
{{- if ne .Description "" -}}
{{ .Scratch.Set "description" (.Description) }}
{{- else -}}
{{- if eq .Title .Site.Title -}}
{{ .Scratch.Set "description" (.Site.Params.description) }}
{{- else -}}
{{ .Scratch.Set "description" (printf "%s - %s" (.Title) (.Site.Params.description)) }}
{{- end -}}
{{- end -}}
{{- if eq .Site.Title .Title -}}
{{ .Scratch.Set "title" (.Site.Params.subtitle) }}
{{- else -}}
{{ .Scratch.Set "title" (.Title) }}
{{- end -}}

<!doctype html>
<html class="no-js" lang="{{ .Site.Language.Lang }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="{{ .Site.Params.author }}">
<meta name="description" content="{{ .Site.Params.description }}">
<meta name="keywords" content="{{ .Site.Params.keywords }}">
{{ .Hugo.Generator }}
<title>{{ block "title" . }} {{ .Scratch.Get "title" }} | {{ .Site.Title }}{{ end }}</title>
<meta name="description" content="{{ .Scratch.Get "description" }}">
<meta itemprop="name" content="{{ .Scratch.Get "title" }}">
<meta itemprop="description" content="{{ .Scratch.Get "description" }}">
<meta property="og:title" content="{{ .Scratch.Get "title" }}">
<meta property="og:description" content="{{ .Scratch.Get "description" }}">
<meta property="og:image" content="{{ .Scratch.Get "image" }}">
<meta property="og:url" content="{{ .URL | absURL }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
{{- if .IsPage }}
<meta property="og:type" content="article">
{{- else -}}
<meta property="og:type" content="website">
{{- end }}
<link rel="icon" type="image/png" href="{{ "favicon-32x32.png" | absURL }}" sizes="32x32">
<link rel="icon" type="image/png" href="{{ "favicon-16x16.png" | absURL }}" sizes="16x16">

<link rel="stylesheet" href="{{ "dist/theme.css" | absURL }}">

{{ partial "twitter-card" . }}

{{ if isset .Site.Params "css_modules" }}
{{ range .Site.Params.css_modules }}
<link rel="stylesheet" href="{{ . | absURL }}">
{{ end }}
{{ end }}
</head>
<body class="bilberry-hugo-theme">
{{ partial "topnav" . }}

{{ partial "header" . }}

<div class="main container">
{{ block "main" . }}{{ end }}
</div>

{{ partial "footer" . }}

{{ template "_internal/google_analytics_async.html" . }}

{{ if and (isset .Site.Params "enable_mathjax") (eq .Site.Params.enable_mathjax true) }}
{{ partial "mathjax" . }}
{{ end }}

<script src="{{ "dist/theme.js" | absURL }}" type="application/javascript"></script>

{{ if isset .Site.Params "js_modules" }}
{{ range .Site.Params.js_modules }}
<script src="{{ . | absURL }}" type="application/javascript"></script>
{{ end }}
{{ end }}

<script>
$(document).ready(function() {
$(".moment").each(function() {
$(this).text(
moment( $(this).text() )
.locale( {{ .Site.Language.Lang }} )
.format('LL')
);
});

$(".footnote-return sup").html({{ i18n "footnoteReturnText" }})
})
</script>

{{ if and (isset .Site.Params "algolia_search") (eq .Site.Params.algolia_search true) }}
{{ partial "algolia-search" . }}
{{ end }}


</body>
</html>

0 comments on commit 1aba89a

Please sign in to comment.