This commit is contained in:
gurusabarish
2020-08-26 13:11:57 +05:30
parent 98b3e9eb20
commit 20888a56e0
17 changed files with 337 additions and 492 deletions
+14
View File
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
{{- partial "head.html" . -}}
</head>
<body>
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}}
</body>
</html>
+4 -16
View File
@@ -1,15 +1,5 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ .Title }}</title>
{{- partial "head.html" . -}}
</head>
<body>
{{ define "main" }}
<section>
{{ range .Pages }}
<br>
<div class="container">
@@ -78,7 +68,5 @@
</div>
<br>
{{ end }}
</body>
</html>
</section>
{{ end }}
+74 -20
View File
@@ -1,25 +1,79 @@
<html>
{{ define "main" }}
<section>
<div class="container">
<div class="row justify-content-md-center">
<div class="col-md-8">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ .Title }}</title>
{{- partial "head.html" . -}}
<!-- title and date -->
<div>
<br>
<h1>{{.Title}}</h1>
<div class="text-muted">
</head>
<!-- Date -->
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-calendar" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1zm1-3a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2z" />
<path fill-rule="evenodd"
d="M3.5 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5zm9 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5z" />
</svg>
{{ dateFormat "Jan 2, 2006" .Date }}
<body>
<div class="container">
<div class="row justify-content-md-center">
<div class="col-md-7 col-md-offset-3">
<h1>{{.Title}}</h1>
<div>{{ dateFormat "Monday, Jan 2, 2006" .Date }}</div>
<div>{{if .Params.author}}Author: {{.Params.Author}}{{end}}</div>
<div>{{.Content}}</div>
</div>
<!-- Author -->
{{ if .Params.author }}
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-person-fill" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />
</svg>
{{ .Params.author }}
{{ end }}
<!-- Edit in Github -->
{{ if .Params.github_link }}
<a href="{{ .Params.github_link }}" target="_blank" title="Edit on github">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil float-right" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M11.293 1.293a1 1 0 0 1 1.414 0l2 2a1 1 0 0 1 0 1.414l-9 9a1 1 0 0 1-.39.242l-3 1a1 1 0 0 1-1.266-1.265l1-3a1 1 0 0 1 .242-.391l9-9zM12 2l2 2-9 9-3 1 1-3 9-9z" />
<path fill-rule="evenodd"
d="M12.146 6.354l-2.5-2.5.708-.708 2.5 2.5-.707.708zM3 10v.5a.5.5 0 0 0 .5.5H4v.5a.5.5 0 0 0 .5.5H5v.5a.5.5 0 0 0 .5.5H6v-1.5a.5.5 0 0 0-.5-.5H5v-.5a.5.5 0 0 0-.5-.5H3z" />
</svg>
</a>
{{ end}}
</div>
</div>
</div>
</body>
</html>
<!-- image -->
<br>
<div>
{{ with .Params.bg_image }}
<img class="img-fluid" src="{{ . | absURL }}">
{{ end }}
</div>
<!-- content -->
<br>
<div>{{.Content}}</div>
<!-- Tags -->
<div class="text-center text-muted">
<hr>
<div class="h4">Tags</div>
{{ if .Params.tags }}
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
<button class="btn rounded-pill border border-info">{{ . }}</button>
</a>
{{ end }}
{{ end }}
</div>
<br>
</div>
</div>
</div>
</section>
{{ end }}
+4
View File
@@ -0,0 +1,4 @@
{{ define "main" }}
{{ end }}
+24
View File
@@ -0,0 +1,24 @@
<footer class="footer py-5 text-muted text-center">
<p>
&copy; {{ .Site.LastChange.Format "2006" }}<br>
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> made with
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-heart" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M8 2.748l-.717-.737C5.6.281 2.514.878 1.4 3.053c-.523 1.023-.641 2.5.314 4.385.92 1.815 2.834 3.989 6.286 6.357 3.452-2.368 5.365-4.542 6.286-6.357.955-1.886.838-3.362.314-4.385C13.486.878 10.4.28 8.717 2.01L8 2.748zM8 15C-7.333 4.868 3.279-3.04 7.824 1.143c.06.055.119.112.176.171a3.12 3.12 0 0 1 .176-.17C12.72-3.042 23.333 4.867 8 15z" />
</svg>
and
<a href="https://gohugo.io" target="_blank">Hugo</a>
by
{{- if .Site.Author.name }}
{{- if .Site.Author.website }}
<a href="{{ .Site.Author.website }}" target="_blank">{{ .Site.Author.name }}</a>
{{- else }}
{{ .Site.Author.name }}
{{- end }}
{{- end }}
</p>
</footer>
+8 -1
View File
@@ -1,7 +1,14 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{ .Title }}</title>
{{ if .Params.favicon }}
<link rel="icon" href="{{ .favicon }}" type="image/gif" sizes="16x16">
{{ end }}
<!-- Links and stylesheets -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/fontawesome.min.css">
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Alata&display=swap" rel="stylesheet">
+27
View File
@@ -0,0 +1,27 @@
<div class="container">
<div class="row">
<div class="col-lg-12">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">
<img src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation"
aria-controls="navigation" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navigation">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="{{ .Site.BaseURL }}">{{ .Site.Params.home }}</a>
</li>
{{ range .Site.Menus.main }}
<li class="nav-item">
<a class="nav-link" href="{{ .URL | absURL }}">{{ .Name }}</a>
</li>
{{ end }}
</div>
</nav>
</div>
</div>
</div>