diff options
author | 10mohi6 <10.mohi.6.y@gmail.com> | 2020-06-16 08:22:12 +0300 |
---|---|---|
committer | 10mohi6 <10.mohi.6.y@gmail.com> | 2020-06-16 08:22:12 +0300 |
commit | 86b4f6f6d73401628db976b6259d85309d672597 (patch) | |
tree | c81f682b4fb92c79b238eaa9a705cb6e6bfd1138 | |
parent | f7dfdeff15f309e335d10a96eb5085a73cf921cd (diff) |
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | images/screenshot.png | bin | 114818 -> 182156 bytes | |||
-rw-r--r-- | images/tn.png | bin | 82043 -> 95429 bytes | |||
-rw-r--r-- | layouts/404.html | 24 | ||||
-rw-r--r-- | layouts/_default/list.html | 90 | ||||
-rw-r--r-- | layouts/_default/single.html | 75 | ||||
-rw-r--r-- | layouts/partials/footer.html | 35 | ||||
-rw-r--r-- | layouts/partials/header.html | 11 | ||||
-rw-r--r-- | static/css/bootstrap.css | 33 | ||||
-rw-r--r-- | static/css/custom.css | 61 |
10 files changed, 213 insertions, 119 deletions
@@ -49,6 +49,9 @@ footnoteReturnLinkContents = "^" [taxonomies] category = "categories" tag = "tags" + +[params] +description = "<your site description>" ``` ## Contributing diff --git a/images/screenshot.png b/images/screenshot.png Binary files differindex 9fd57d7..89a27f3 100644 --- a/images/screenshot.png +++ b/images/screenshot.png diff --git a/images/tn.png b/images/tn.png Binary files differindex 5f5ab40..ef8d8c5 100644 --- a/images/tn.png +++ b/images/tn.png diff --git a/layouts/404.html b/layouts/404.html index 133ac8c..aea87ac 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,13 +1,15 @@ {{ partial "header.html" . }} -<header class="text-center bg-dark pt-5 pb-5 col-12"> - <h1 class="text-white pt-5 pb-3"><a href="{{ .Site.BaseURL }}" class="text-reset">{{ .Site.Title }}</a></h1> - <p class="pb-5"></p> -</header> -<div class="container pt-3"> - <div class="row pt-3 pb-3"> - <div class="col-12"> - <p>404 page not found</p> - </div> - </div> -</div> + <main id="main"> + <div class="d-flex flex-column justify-content-center bg-skew bg-skew-light overflow-hidden"> + <div class="container"> + <div class="row justify-content-lg-center text-center"> + <div class="col-lg-8"> + <h1 class="display-4 mb-5 mt-5">Page not found</h1> + <p class="lead mb-5">The page you are looking for does not exist.</p> + <a href="{{ .Site.BaseURL }}" class="btn btn-primary rounded-pill">Go to home page</a> + </div> + </div> + </div> + </div> + </main> {{ partial "footer.html" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 86eb1e3..540bedf 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,49 +3,49 @@ {{ if eq .Kind "taxonomy" }} {{ $paginator = .Data }} {{ end }} -<header class="text-center bg-dark pt-5 pb-5 col-12"> - {{ if not .IsHome }} - <h1 class="text-white pt-5 pb-3">{{ .Title }}</h1> - <p class="text-white pb-4 text-muted"> - <a href="{{ .Site.BaseURL }}" class="text-reset pr-4">Back to Home</a>{{ len .Data.Pages }} Articles to read - </p> - {{ else }} - <h1 class="text-white pt-5 pb-3"><a href="{{ .Site.BaseURL }}" class="text-reset">{{ .Site.Title }}</a></h1> - <p class="pb-5"></p> - {{ end }} -</header> -<div class="container pt-3"> - {{ range $paginator.Pages }} - <div class="row pt-3 pb-3"> - <div class="col-12"> - {{ range .Params.categories }} - <a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}/" class="text-success">{{ . }}</a> - {{ end }} - <h2 class="pt-1"> - <a href="{{ .Permalink }}" class="text-dark">{{ .Title }}</a> - </h2> - <p class="text-secondary">{{.Date.Format "January 2, 2006"}}</p> - <div class="pb-1"> - {{ .Summary | plainify | htmlUnescape }} - </div> - {{ range .Params.tags }} - <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}/" class="text-info">#{{ . }}</a> - {{ end }} - </div> - </div> - {{ end }} - <div class="row pt-3 pb-3"> - <div class="col-12"> - <nav> - <ul class="pagination"> - {{ range $paginator.Pagers }} - <li class="page-item {{ if eq $paginator.PageNumber .PageNumber }}active{{ end }}"> - <a class="page-link" href="{{ .URL }}">{{.PageNumber}}</a> - </li> - {{ end }} - </ul> - </nav> - </div> - </div> -</div> + <main id="main"> + <div class="container"> + <div class="row justify-content-center"> + <div class="col-lg-8 col-xl-7"> + <h1 class="display-4 my-5 my-lg-6 pb-lg-4 text-center">{{ if not .IsHome }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}</h1> + </div> + </div> + </div> + <div class="bg-skew bg-skew-light"> + <div class="container py-4"> + <div class="row"> + {{ range $paginator.Pages }} + <div class="col-lg-6"> + <div class="card card-hover mb-5 mx-lg-2"> + <div class="card-body pt-5 px-5 pb-4 text-center"> + {{ range .Params.categories }} + <a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}/" class="d-inline-block link-cta mb-4 text-uppercase">{{ . }}</a> + {{ end }} + <h2 class="card-title mb-4"> + <a class="stretched-link" href="{{ .Permalink }}">{{ .Title }}</a> + </h2> + <p class="small"><span class="text-uppercase">{{.Date.Format "January 2, 2006"}}</span></p> + <p class="card-text">{{ .Summary | plainify | htmlUnescape }}</p> + <p> + {{ range .Params.tags }} + <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}/" class="link-tag text-dark">#{{ . }}</a> + {{ end }} + </p> + </div> + </div> + </div> + {{ end }} + </div> + <nav aria-label="Page navigation"> + <ul class="pagination justify-content-center"> + {{ range $paginator.Pagers }} + <li class="page-item {{ if eq $paginator.PageNumber .PageNumber }}active{{ end }}"> + <a class="page-link" href="{{ .URL }}">{{.PageNumber}}</a> + </li> + {{ end }} + </ul> + </nav> + </div> + </div> + </main> {{ partial "footer.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6555d51..f1e56cb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,31 +1,46 @@ {{ partial "header.html" . }} -<header class="text-center bg-dark pt-5 pb-5 col-12"> - {{ range .Params.categories }} - <a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}/" class="text-success">{{ . }}</a> - {{ end }} - <h1 class="text-white pt-4 pb-3">{{ .Title }}</h1> - <p class="text-secondary">{{.Date.Format "January 2, 2006"}}</p> - {{ range .Params.tags }} - <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}/" class="text-info">#{{ . }}</a> - {{ end }} -</header> -<div class="container"> - <div class="row pt-5"> - <div class="col-12"> - {{ .Content }} - </div> - </div> - <div class="row pt-5 pb-5"> - <div class="col-6 text-left"> - {{ with .PrevInSection }} - <a class="text-reset" href="{{ .Permalink }}">< {{ .Title }}</a> - {{ end }} - </div> - <div class="col-6 text-right"> - {{ with .NextInSection }} - <a class="text-reset" href="{{ .Permalink }}">{{ .Title }} ></a> - {{ end }} - </div> - </div> -</div> -{{ partial "footer.html" . }}
\ No newline at end of file + <main id="main"> + <div class="container"> + <div class="row justify-content-center text-center my-5"> + <div class="col-lg-10"> + {{ range .Params.categories }} + <a href="{{ $.Site.BaseURL }}categories/{{ . | urlize }}/" class="d-inline-block link-cta mb-4 text-uppercase">{{ . }}</a> + {{ end }} + <h1 class="mb-4 text-center">{{ .Title }}</h1> + <p class="small mb-5 text-center"><span class="text-uppercase">{{.Date.Format "January 2, 2006"}}</span></p> + </div> + </div> + </div> + <div class="bg-skew bg-skew-light"> + <div class="container"> + <div class="row justify-content-center"> + <div class="col-lg-8"> + <article class="pb-2"> + {{ .Content }} + <p class="mt-5 text-center"> + {{ with .Params.tags }} + <span class="text-secondary">Tagged: </span> + {{ end }} + {{ range .Params.tags }} + <a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}/" class="link-tag text-dark">#{{ . }}</a> + {{ end }} + </p> + </article> + <div class="row pt-5 pb-5"> + <div class="col-6 text-left"> + {{ with .PrevInSection }} + <a class="text-reset" href="{{ .Permalink }}">← {{ .Title }}</a> + {{ end }} + </div> + <div class="col-6 text-right"> + {{ with .NextInSection }} + <a class="text-reset" href="{{ .Permalink }}">{{ .Title }} →</a> + {{ end }} + </div> + </div> + </div> + </div> + </div> + </div> + </main> +{{ partial "footer.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 5651794..cb58bb0 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,9 +1,30 @@ -<footer class="text-center bg-dark pt-5 col-12"> - <a href="{{ .Site.BaseURL }}" class="text-muted">Home</a> - {{ range .Site.Menus.main }} - <a href="{{ .URL }}" class="text-muted pl-4">{{ .Name }}</a> - {{ end }} - <p class="pb-4 pt-4 mb-0">{{ .Site.Copyright }} <a href="https://gohugo.io/" class="text-reset">hugo</a> <a href="https://10mohi6.tk" class="text-reset">10mohi6</a> <a href="https://github.com/10mohi6/hugo-theme-simple-blog" class="text-reset">simple-blog</a></p> +<footer class="site-footer mt-5"> + <div class="container"> + <div class="row justify-content-md-between"> + <div class="col-sm-12 col-md-4 mb-4"> + <h2 class="h5 mb-3">{{ .Site.Title }}</h2> + <p>{{.Site.Params.Description}}</p> + </div> + <div class="col-4 col-md-2 mb-4"> + <h2 class="h5 mb-3">Menu</h2> + <ul class="nav flex-column"> + <li class="mb-1"><a href="{{ .Site.BaseURL }}" class="text-secondary">Home</a></li> + {{ range .Site.Menus.main }} + <li class="mb-1"><a href="{{ .URL }}" class="text-secondary">{{ .Name }}</a></li> + {{ end }} + </ul> + </div> + </div> + + <hr/> + + <div class="d-flex flex-column flex-sm-row justify-content-sm-between align-items-center"> + <div class="text-muted mb-3"> + {{ .Site.Copyright }} + <a href="https://10mohi6.tk" class="text-reset">design</a> <a href="https://github.com/10mohi6/hugo-theme-simple-blog" class="text-reset">theme</a></p> + </div> + </div> + </div> </footer> </body> -</html> +</html>
\ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index d6eb843..2666f13 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,10 +1,11 @@ <!doctype html> <html lang="{{ .Site.LanguageCode }}"> - <head> +<head> + <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title> - <link href="{{ .Site.BaseURL }}css/bootstrap.css" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet"> - </head> - <body> + <link rel="stylesheet" href="{{ $.Site.BaseURL }}css/bootstrap.css"> + <link rel="stylesheet" href="{{ $.Site.BaseURL }}css/custom.css"> +</head> +<body> diff --git a/static/css/bootstrap.css b/static/css/bootstrap.css index c356be8..cade50e 100644 --- a/static/css/bootstrap.css +++ b/static/css/bootstrap.css @@ -4,7 +4,7 @@ * Copyright 2011-2020 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ -:root { + :root { --blue: #007bff; --indigo: #6610f2; --purple: #6f42c1; @@ -31,10 +31,8 @@ --breakpoint-md: 768px; --breakpoint-lg: 992px; --breakpoint-xl: 1200px; - /* --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; - --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; */ - --font-family-sans-serif: Montserrat, sans-serif; - --font-family-monospace: Montserrat, sans-serif; + --font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; } *, @@ -56,8 +54,7 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section { body { margin: 0; - /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; */ - font-family: Montserrat, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-size: 1rem; font-weight: 400; line-height: 1.5; @@ -180,8 +177,7 @@ pre, code, kbd, samp { - /* font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; */ - font-family: Montserrat, sans-serif; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 1em; } @@ -5036,8 +5032,7 @@ input[type="button"].btn-block { padding: 0.5rem 0.75rem; margin-left: -1px; line-height: 1.25; - /* color: #007bff; */ - color: #6c757d; + color: #007bff; background-color: #fff; border: 1px solid #dee2e6; } @@ -5070,10 +5065,8 @@ input[type="button"].btn-block { .page-item.active .page-link { z-index: 3; color: #fff; - /* background-color: #007bff; - border-color: #007bff; */ - background-color: #6c757d; - border-color: #6c757d; + background-color: #007bff; + border-color: #007bff; } .page-item.disabled .page-link { @@ -6168,8 +6161,7 @@ a.close.disabled { z-index: 1070; display: block; margin: 0; - /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; */ - font-family: Montserrat, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-style: normal; font-weight: 400; line-height: 1.5; @@ -6282,8 +6274,7 @@ a.close.disabled { z-index: 1060; display: block; max-width: 276px; - /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; */ - font-family: Montserrat, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-style: normal; font-weight: 400; line-height: 1.5; @@ -9977,8 +9968,7 @@ button.bg-dark:focus { } .text-monospace { - /* font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; */ - font-family: Montserrat, sans-serif !important; + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; } .text-justify { @@ -10285,3 +10275,4 @@ a.text-dark:hover, a.text-dark:focus { border-color: #dee2e6; } } +/*# sourceMappingURL=bootstrap.css.map */
\ No newline at end of file diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..9c0ae4e --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,61 @@ +.my-lg-6 { + margin-top: 5rem!important; + margin-bottom: 5rem!important + } + + .bg-skew { + position: relative + } + + .bg-skew:before { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + transform: skewY(-5deg); + transform-origin: top left; + z-index: -1 + } + + .bg-skew-light:before { + background-color: #f8f9fa + } + + .card-hover:hover { + box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15); + transform: translateY(-3px) + } + + .link-cta { + border-bottom: 2px solid #006aff; + color: #343a40; + font-size: .875rem; + letter-spacing: 1px; + padding-bottom: 2px; + text-transform: uppercase + } + + .link-cta:hover { + color: #006aff; + text-decoration: none + } + + .link-tag { + text-decoration: underline + } + + .link-tag:hover{ + text-decoration: none + } + + .card-title a { + color: #212529 + } + + .card-title a:focus, .card-title a:hover { + color: #006aff; + text-decoration: none + } +
\ No newline at end of file |