diff options
author | saadnpq <saadnpq@localhost.localdomain> | 2020-04-11 14:28:48 +0300 |
---|---|---|
committer | saadnpq <saadnpq@localhost.localdomain> | 2020-04-11 14:28:48 +0300 |
commit | 1bff7cc487aa424fe69c22376ecb1da72d578f5e (patch) | |
tree | a03f0475074573f5bf3033ceb5df1d878ccbfa64 /layouts |
initial commit
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/404.html | 3 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 15 | ||||
-rw-r--r-- | layouts/_default/list.html | 24 | ||||
-rw-r--r-- | layouts/_default/single.html | 31 | ||||
-rw-r--r-- | layouts/index.html | 45 | ||||
-rw-r--r-- | layouts/partials/aside.html | 23 | ||||
-rw-r--r-- | layouts/partials/footer.html | 13 | ||||
-rw-r--r-- | layouts/partials/head.html | 17 | ||||
-rw-r--r-- | layouts/shortcodes/contact.html | 12 |
9 files changed, 183 insertions, 0 deletions
diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..2d8f3cc --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,3 @@ +{{define "main"}} +<div style="position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);"><iframe src="https://giphy.com/embed/YyKPbc5OOTSQE" width="480" height="480" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div> +{{end}}
\ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..3159b79 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,15 @@ +<!DOCTYPE html> +<html> + {{- partial "head.html" . -}} + <body> + {{- partial "aside.html" . -}} + <main id="main"> + <a href="javascript:void(0)" id="closebtn" onclick="navToggle()"><i class="fas fa-bars fa-lg"></i></a> + <div class="content"> + {{- block "main" . }}{{- end }} + </div> + {{- partial "footer.html" . -}} + </main> + </body> + <script src="/js/navbutton.js"></script> +</html> diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..9797c06 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,24 @@ +{{ define "main" }} + <div class="section"> + <dev class="section-title">{{.Section}}</dev> + {{range .Pages}} + <div class="list-item"> + <a class="entry-title" href="{{ .URL }}">{{ .Title }}</a> + {{$page := .}} + {{with .Description}} + <p>{{.}}</p> + {{end}} + <div class="meta"> + {{with .Date}} + <i class="far fa-calendar-alt"></i> {{.Format "Jan 2 2006"}} + {{end}} + <br> + {{with .Params.tags}} + <i class="fas fa-tags"></i> + Tags: {{ delimit . ", " }} + {{end}} + </div> + </div> + {{end}} + </div> +{{end}}
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..232df3c --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,31 @@ +{{ define "main" }} + {{with .Title}} + <h1 id="title">{{.}}</h1> + {{else}} + <div class="spacer"></div> + {{end}} + {{ with .Params.githubrepo}} + github repository : <a href="{{.}}">{{.}}</a> + {{end}} + {{.TableOfContents}} + {{.Content}} + {{if ne .Section ""}} + <div class="nav-next-prev"> + <div class="nav-prev"> + {{with .PrevInSection}} + <a href="{{.Permalink}}"><i class="fas fa-chevron-left"></i></a> + {{else}} + <a class="grayed-out" href="javascript:void()"><i class="fas fa-chevron-left"></i></a> + {{end}} + </div> + <a class="nav-top" href="#">top</i></a> + <div class="nav-next"> + {{with .NextInSection}} + <a href="{{.Permalink}}"><i class="fas fa-chevron-right"></i></a> + {{else}} + <a class="grayed-out" href="javascript:void()"><i class="fas fa-chevron-right"></i></a> + {{end}} + </div> + </div> + {{end}} +{{end}}
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..1ac5c02 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,45 @@ +{{define "main"}} + {{if .Site.Params.displayRecent }} + <div class="section"> + <div class="section-title">recent</div> + {{range first .Site.Params.recentMax (where .Site.RegularPages "Section" "ne" "posts")}} + <div class="list-item"> + <a class="entry-title" href="{{ .URL }}">{{ .Title }}</a> + {{$page := .}} + {{with .Description}} + <p>{{.}}</p> + {{end}} + <div class="meta"> + {{with .Date}} + <i class="far fa-calendar-alt"></i> {{.Format "Jan 2 2006"}} + {{end}} + <br> + {{with .Params.tags}} + <i class="fas fa-tags"></i> + Tags: {{ delimit . ", " }} + {{end}} + </div> + </div> + {{end}} + </div> + {{end}} + + {{if .Site.Params.displayMicroBlog}} + <div class="section"> + <div class="section-title">μblog</div> + <div class="posts"> + {{ range where site.RegularPages "Type" "in" site.Params.microBlogSection}} + <div class="post"> + {{if ne .Params.pinned nil}} + <div class="meta pinned"> <i class="fas fa-thumbtack"></i> pinned </div> + {{end}} + <div class="post-content"> + {{.Content}} + </div> + <div class="meta post-footer"> <span>{{.Date.Format "Jan 2 2006 03:04 UTC-07"}}</span> <a href="{{.URL}}"><i class="fas fa-link"></i> link</a></div> + </div> + {{ end }} + </div> + </div> + {{end}} +{{end }}
\ No newline at end of file diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html new file mode 100644 index 0000000..8f5d674 --- /dev/null +++ b/layouts/partials/aside.html @@ -0,0 +1,23 @@ +<aside id="sidenav"> + <header> + <a href="{{ .Site.BaseURL }}"><img src="/avatar.png" alt="avatar"></a> + <a id="branding" href="{{ .Site.BaseURL }}">{{ .Site.Params.author | safeHTML }}</a> + </header> + + <nav> + {{ range .Site.Menus.main }} + {{ $url := urls.Parse .URL }} + <a href="{{ $url }}" + {{ if ne $url.Host ""}} + target="_blanck" + {{end}} + > + {{ .Pre }} + <span>{{ .Name }}</span> + </a> + {{end}} + <a href="/contact" > + <i class="far fa-envelope"></i> + <span>contact</span> + </a> +</aside> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..d8a3186 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,13 @@ +<footer> +<div class="contact-info"> + {{with .Site.Params.mail}} + <div class="footer-mail"> + <i class="far fa-envelope"></i> <a href="mailto:{{.}}">{{.}}</a> </div> + {{end}} + {{with .Site.Params.phone}} + <div class="footer-phone"> + <i class="fas fa-phone"></i> {{.}} + </div> + {{end}} +</div> +</footer>
\ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..f2485de --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,17 @@ +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + {{with .Site.Params.description -}} + <meta name="description" content="{{.}}"> + {{ end }} + {{- with .Site.Params.author -}} + <meta name="Author" content="{{.}}"> + {{ end }} + {{- with .Site.Params.keywords -}} + <meta name="keywords" content="{{.}}"> + {{ end -}} + <link rel="stylesheet" href="/css/syntax.css"> + <link rel="stylesheet" href="/css/style.css"> + <script src="https://kit.fontawesome.com/1b7478c139.js" crossorigin="anonymous"></script> + <title>{{ .Site.Title }}</title> + </head>
\ No newline at end of file diff --git a/layouts/shortcodes/contact.html b/layouts/shortcodes/contact.html new file mode 100644 index 0000000..ade324c --- /dev/null +++ b/layouts/shortcodes/contact.html @@ -0,0 +1,12 @@ +{{with .Site.Params.formspreeID}} +<form class="contact-form" +action="https://formspree.io/{{.}}" +method="POST" +> + <input id="name" type="text" name="name" placeholder="Your Name"> + <input id="mail" type="text" name="_replyto" placeholder="Your Mail"> + <textarea id="message" name="message" placeholder="Your message"></textarea> + +<button class="reach-me-send" type="submit">Send</button> +{{end}} +</form>
\ No newline at end of file |