navbar update

This commit is contained in:
gurusabarish
2020-08-29 23:05:52 +05:30
parent 20888a56e0
commit 2ee892e5d3
17 changed files with 1865 additions and 55 deletions
-17
View File
@@ -5,25 +5,8 @@ title = "Hugo-blog"
# Navbar Menus
[[menu.main]]
name = "About"
url = "about"
weight = 2
[[menu.main]]
name = "Service"
url = "service"
weight = 3
[[menu.main]]
name = "Gallery"
url = "gallery"
weight = 4
[[menu.main]]
name = "Blog"
url = "blog"
weight = 5
[[menu.main]]
name = "Contact"
url = "contact"
weight = 6
[Author]
+1 -1
View File
@@ -9,7 +9,7 @@ tags:
- blog
- theme
- javascript
bg_image: "../images/bg-image-5.jpg"
bg_image: "/images/bg-image-5.jpg"
---
Have you ever wondered if you can make your own physics engine in JavaScript? If so, you have come to the right place. We are going to build a Physics engine from scratch in JavaScript.
+1 -1
View File
@@ -9,7 +9,7 @@ tags:
- markdown
- css
- blog
bg_image: "../images/bg-image-4.jpg"
bg_image: "/images/bg-image-4.jpg"
---
Have you ever wondered if you can make your own physics engine in JavaScript? If so, you have come to the right place. We are going to build a Physics engine from scratch in JavaScript.
+1 -1
View File
@@ -3,7 +3,7 @@ title: "Markdown syntax"
date: 2020-08-11T23:03:58+05:30
draft: false
subtitle: "Javascript"
bg_image: "../images/bg-image.jpg"
bg_image: "/images/bg-image.jpg"
author: "Gurusabarish"
github_link: "https://github.com/gurusabarish/Hugo-blog"
tags:
+1 -1
View File
@@ -8,7 +8,7 @@ github_link: "https://github.com/gurusabarish/Hugo-blog"
tags:
- hugo
- blog
bg_image: "../images/bg-image-2.jpg"
bg_image: "/images/bg-image-2.jpg"
---
## Introduction
+1 -1
View File
@@ -9,7 +9,7 @@ tags:
- markdown
- css
- blog
bg_image: "../images/bg-image-4.jpg"
bg_image: "/images/bg-image-4.jpg"
---
Have you ever wondered if you can make your own physics engine in JavaScript? If so, you have come to the right place. We are going to build a Physics engine from scratch in JavaScript.
+6
View File
@@ -0,0 +1,6 @@
---
title: "Contact"
date: 2020-08-26T22:19:31+05:30
draft: true
---
+3 -1
View File
@@ -3,12 +3,14 @@
<head>
{{- partial "head.html" . -}}
</head>
<body>
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{- block "main" . -}}{{- end }}
{{- partial "footer.html" . -}}
{{- partial "scripts.html" . -}}
</body>
</html>
+72
View File
@@ -0,0 +1,72 @@
{{ define "main" }}
<section>
{{ range .Pages }}
<br>
<div class="container">
<div class="row justify-content-md-center">
<div class="col-md-8">
<div class="img-pre">
<a class="text-decoration-none" href="{{ .Permalink }}">
<img class="img-fluid" alt="{{ .Title }}" src="{{ .Params.bg_image }}">
</div>
<div>
<h2 class="item-title">
{{ .Title }}
</h2>
<!--{{ if .Params.subtitle }}
<h4 class="item-subtitle text-muted">
{{ .Params.subtitle }}
</h4>
{{ end }}-->
</a>
</div>
<div class="text-muted">
<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 }}
{{ 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 }}
</div>
<div>
{{truncate 200 .Summary}}
<a class="text-decoration-none" href="{{ .Permalink }}">
<button type="button" class="float-right btn btn-outline-primary read-more">Read more</button>
</a>
</div>
{{ if .Params.tags }}
<div class="blog-tags">
<strong class="text-muted">Tags: </strong>
{{ range .Params.tags }}
#<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
</div>
{{ end }}
<div style="color:grey; font-size:16px;">{{ if .Params.categories }}<strong>Categories:</strong>
{{range .Params.categories}}<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{end}}{{end}}
</div>
<div style="color:grey; font-size:16px;">{{ if .Params.moods }}<strong>Moods:</strong>
{{range .Params.moods}}<a href="{{ "/moods/" | relLangURL }}{{ . | urlize }}">{{ . }}</a> {{end}}{{end}}
</div>
</div>
</div>
</div>
<br>
{{ end }}
</section>
{{ end }}
+79
View File
@@ -0,0 +1,79 @@
{{ define "main" }}
<section>
<div class="container">
<div class="row justify-content-md-center">
<div class="col-md-8">
<!-- title and date -->
<div>
<br>
<h1>{{.Title}}</h1>
<div class="text-muted">
<!-- 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 }}
<!-- 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>
<!-- 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 }}
+17 -1
View File
@@ -1,4 +1,20 @@
{{ define "main" }}
{{ end }}
{{ end }}
<!DOCTYPE html>
<html lang="en">
<head>
{{- partial "head.html" . -}}
</head>
<body>
{{- partial "header.html" . -}}
{{- partial "sections/home.html" . -}}
{{- partial "footer.html" . -}}
{{- partial "scripts.html" . -}}
</body>
</html>
+2 -2
View File
@@ -1,6 +1,6 @@
<footer class="footer py-5 text-muted text-center">
<footer class="footer py-3 text-muted text-center">
<p>
&copy; {{ .Site.LastChange.Format "2006" }}<br>
&copy; {{ .Site.LastChange.Format "2006" }} All Rights Reserved<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"
+22 -24
View File
@@ -1,27 +1,25 @@
<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>
<nav class="navbar navbar-expand-lg sticky-top navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" 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 class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="{{ .Site.BaseURL }}#home">Home <span class="sr-only">(current)</span></a>
</li>
{{ range .Site.Menus.main }}
<li class="nav-item">
<a class="nav-link" href="{{ .URL | absURL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
</nav>
+3
View File
@@ -0,0 +1,3 @@
<!-- javascripts -->
<script src="/js/jquery.slim.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
+3
View File
@@ -0,0 +1,3 @@
<div class="home container-fluid" id="home">
</div>
+1643 -5
View File
File diff suppressed because one or more lines are too long
+10
View File
@@ -1,3 +1,4 @@
/*blog*/
.item-title {
font-family: 'Alata', sans-serif;
color: rgba(0, 0, 0, 0.541);
@@ -28,6 +29,15 @@
}
}
/*footer*/
.footer {
background: #f2f2f2;
}
/*home*/
.home {
height: 100vh;
padding: 0;
margin: 0;
overflow: hidden;
}