diff options
author | serg <contact@sergfurtak.com> | 2018-06-01 13:23:12 +0300 |
---|---|---|
committer | serg <contact@sergfurtak.com> | 2018-06-01 13:23:12 +0300 |
commit | 28b09c42daad7855cec2a6421f41897243eeba33 (patch) | |
tree | 8d069fa995a200a6546d0f9bb31c86ecd8f735e5 |
init
-rw-r--r-- | LICENSE.md | 20 | ||||
-rw-r--r-- | archetypes/default.md | 6 | ||||
-rw-r--r-- | layouts/404.html | 68 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 36 | ||||
-rw-r--r-- | layouts/_default/single.html | 12 | ||||
-rw-r--r-- | layouts/index.html | 12 | ||||
-rw-r--r-- | layouts/partials/deferred-load-script.html | 20 | ||||
-rw-r--r-- | layouts/partials/head-includes.html | 323 | ||||
-rw-r--r-- | layouts/partials/header.html | 23 | ||||
-rw-r--r-- | layouts/partials/modules/projects.html | 31 | ||||
-rw-r--r-- | layouts/partials/modules/text-groups.html | 14 | ||||
-rw-r--r-- | layouts/partials/navigation.html | 24 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 4 | ||||
-rw-r--r-- | static/.gitkeep | 0 | ||||
-rw-r--r-- | theme.toml | 12 |
15 files changed, 605 insertions, 0 deletions
diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..272a8e7 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2018 Sergey Furtak <contact@sergfurtak.com> (https://sergfurtak.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..f5a9e45 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..966a371 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,68 @@ +{{- define "page-class" -}}error404{{- end -}} +{{- define "head-includes" -}} + {{- partial "head-includes.html" . -}} + <style> + .error404 { + height: 100%; } + .error404 body, .error404 .main-container, .error404 .header, .error404 .container, .error404 .padder { + height: 100%; } + .error404 .header { + overflow: hidden; } + + .error404 .main-description { + height: 100%; } + .error404 .main-description h1 { + padding-bottom: 0.370em; } + .error404 .main-description p { + display: inline; + font-size: 2em; + font-weight: 600; + color: #989898; } + .error404 .main-description .img-col { + display: none; } + + @media screen and (max-height: 25em) { + .error404 .main-description h1 { + font-size: 4em; + padding-top: 1.3em; } } + + @media screen and (min-width: 56.25em), (min-height: 52.5625em) and (min-width: 56.25em) { + .error404 .main-description p { + display: block; } + .error404 .main-description .img-col { + display: block; + position: absolute; + bottom: 0; + right: 0; + width: 47%; } + .error404 .main-description img { + max-height: 75em; + bottom: 9.1em; + z-index: -1; } } + + @media screen and (max-height: 52.5625em) and (min-width: 56.25em) { + .error404 .main-description img { + bottom: 0; } } + </style> +{{- end -}} +{{- define "main" -}} + <div class="main-container"> + {{- partial "navigation" . -}} + <div class="header"> + <div class="container"> + <div class="padder"> + <div class="main-description animated fadeIn"> + <div class="text-col"> + <h1 class="break-word">Oops! Nothing found.</h1> + <p>Seems like this page doesn't exist,</p> + <p><span>but you can go to the</span> <a class="blue-text" href="/">Home</a> <span>page.</span></p> + </div> + <div class="img-col"> + <picture><img src="img/error404.png" alt="The maneken hand image"></picture> + </div> + </div> + </div> + </div> + </div> + </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..64ec7cd --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,36 @@ +<!doctype html> +<html class="{{block "page-class" . }}{{end}} no-js" lang="{{ .Site.LanguageCode | default "en" }}"> + <head> + <meta charset="utf-8"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{{ block "title" . }}{{ with .Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }}</title> + <meta name="description" content="{{ .Description }}"> + {{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") -}} + <meta name="robots" content="index, follow"> + {{- else -}} + <meta name="robots" content="noindex, nofollow"> + {{- end -}} + <link rel="shortcut icon" href="{{`favicon.ico` | relURL}}"> + {{- block "head-includes" . -}} + {{- partial "head-includes.html" . -}} + {{- end -}} + </head> + <body> + {{- "<!--[if lte IE 9]>" | safeHTML -}} + <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p> + {{- "<![endif]-->" | safeHTML -}} + {{- block "no-scripts" . -}} + <noscript>For full functionality of this site it is necessary to enable JavaScript. Here are the <a href="//www.enable-javascript.com" target="_blank" rel="noreferrer nofollow">instructions how to enable JavaScript in your web browser</a>.</noscript> + {{- end -}} + {{- block "header" . -}}{{- end -}} + {{- block "main" . -}}{{- end -}} + {{- block "footer" . -}}{{- end -}} + {{- block "scripts" . -}} + {{- partial "scripts.html" . -}} + {{- end -}} + {{- if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") | and .Site.GoogleAnalytics -}} + {{- template "_internal/google_analytics_async.html" . -}} + {{- end -}} + </body> +</html>
\ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..2702db8 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,12 @@ +{{- define "main" -}} +<div class="main-container"> + {{- partial "navigation" . -}} + {{- partial "header" . -}} + <div class="container"> + <div class="padder"> + {{- partial "modules/text-groups" . -}} + {{- partial "modules/projects" . -}} + </div> + </div> +</div> +{{- end -}}
\ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..2702db8 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,12 @@ +{{- define "main" -}} +<div class="main-container"> + {{- partial "navigation" . -}} + {{- partial "header" . -}} + <div class="container"> + <div class="padder"> + {{- partial "modules/text-groups" . -}} + {{- partial "modules/projects" . -}} + </div> + </div> +</div> +{{- end -}}
\ No newline at end of file diff --git a/layouts/partials/deferred-load-script.html b/layouts/partials/deferred-load-script.html new file mode 100644 index 0000000..0c03a8f --- /dev/null +++ b/layouts/partials/deferred-load-script.html @@ -0,0 +1,20 @@ +<script> + var addToLoad = function(callback){ + if (window.addEventListener) + window.addEventListener('load', callback); + else if (window.attachEvent) + window.attachEvent('onload', callback); + else window.onload = callback; + }; + + var loadDeferredCss = function() { + var addStylesNode = document.getElementById("deferredCss"); + var replacement = document.createElement("div"); + replacement.innerHTML = addStylesNode.textContent; + document.body.appendChild(replacement) + addStylesNode.parentElement.removeChild(addStylesNode); + }; + var raf = requestAnimationFrame || mozRequestAnimationFrame || webkitRequestAnimationFrame || msRequestAnimationFrame; + if (raf) raf(function() { window.setTimeout(loadDeferredCss, 0); }); + else addToLoad(loadDeferredCss); +</script>
\ No newline at end of file diff --git a/layouts/partials/head-includes.html b/layouts/partials/head-includes.html new file mode 100644 index 0000000..1a6a111 --- /dev/null +++ b/layouts/partials/head-includes.html @@ -0,0 +1,323 @@ +<style> + a, + body, + div, + h1, + html, + img, + li, + span, + ul, + p { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } + + body { + line-height: 1; } + + ul { + list-style: none; } + + @font-face { + font-family: 'Open Sans'; + font-weight: 600; + font-style: normal; + src: url("//fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSnZ2MAKAc2x4R1uOSeegc5U.eot"); + src: url("//fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSnZ2MAKAc2x4R1uOSeegc5U.eot?#iefix") format("embedded-opentype"), url("//fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNShampu5_7CjHW5spxoeN3Vs.woff2") format("woff2"), url("//fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSqRDOzjiPcYnFooOUGCOsRk.woff") format("woff"), url("//fonts.gstatic.com/s/opensans/v13/MTP_ySUJH_bn48VBG8sNSonF5uFdDttMLvmWuJdhhgs.ttf") format("truetype"), url("//fonts.gstatic.com/l/font?kit=MTP_ySUJH_bn48VBG8sNSllIn5tFQcqMuf-jhyJP0ps&skey=a162967ffaa5aa08&v=v13#OpenSans") format("svg"); } + + @font-face { + font-family: 'Open Sans'; + font-weight: 700; + font-style: normal; + src: url("//fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzHZ2MAKAc2x4R1uOSeegc5U.eot"); + src: url("//fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzHZ2MAKAc2x4R1uOSeegc5U.eot?#iefix") format("embedded-opentype"), local("Open Sans Bold"), local("Open-Sans-700"), url("//fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzBampu5_7CjHW5spxoeN3Vs.woff2") format("woff2"), url("//fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzKRDOzjiPcYnFooOUGCOsRk.woff") format("woff"), url("//fonts.gstatic.com/s/opensans/v13/k3k702ZOKiLJc3WVjuplzInF5uFdDttMLvmWuJdhhgs.ttf") format("truetype"), url("//fonts.gstatic.com/l/font?kit=k3k702ZOKiLJc3WVjuplzFlIn5tFQcqMuf-jhyJP0ps&skey=cd9e1a36bb25a3c3&v=v13#OpenSans") format("svg"); } + + body { + font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; + font-size: 50%; + line-height: 1.5; + background: white; + color: #2f2f2f; } + + .main-container { + font-size: 125%; } + .main-container a { + color: #989898; + text-decoration: none; } + .main-container a:hover { + color: #2f2f2f; } + .main-container .blue-text { + color: #224afa; } + .main-container a.blue-text:hover { + color: #1538d1; } + + .padder { + padding-left: 2em; + padding-right: 2em; } + + .nav-container, .header { + background: #f1f1f1; } + + .navbar { + position: relative; + z-index: 5; + height: 7.1em; + max-height: 7.1em; + padding-top: 2em; } + + .logo { + float: left; } + .logo:before { + display: inline-block; + vertical-align: middle; + content: ''; + height: 100%; + width: 0px; } + .logo img { + vertical-align: middle; } + + .links { + visibility: hidden; + opacity: 0; + position: absolute; + top: 100%; + right: -2em; + left: -2em; + padding: 1em 0; + background: #f1f1f1; + text-align: center; + -webkit-box-shadow: 0 5px 7px 0 rgba(1,1,1,.1); + box-shadow: 0 5px 7px 0 rgba(1,1,1,.1); + -webkit-transition: opacity .4s; + -o-transition: opacity .4s; + transition: opacity .4s; } + .links li { + padding: 0.5em 0; } + .links .active a { + color: #2f2f2f; } + .links a { + font-size: 1.8em; + font-weight: 600; + -webkit-transition: all 500ms; + -moz-transition: all 500ms; + -ms-transition: all 500ms; + -o-transition: all 500ms; + transition: all 500ms; } + + .main-description { + position: relative; } + .main-description h1 { + position: relative; + font-size: 4em; + font-weight: bold; + line-height: 1.15; + padding-top: 1.3em; + padding-bottom: 1.3em; + z-index: 1; } + .main-description .break-word { + overflow-wrap: break-word; + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; } + .main-description img { + position: absolute; + bottom: 0; + display: block; + max-width: 100%; + height: auto; } + + .categories .category { + margin-top: 3em; } + + .categories .category.line { + margin: 0; } + + .categories .name { + font-size: 1.6em; + font-weight: bold; + text-transform: uppercase; + margin-bottom: 0.472em; } + + .categories .description { + font-size: 1.8em; + font-weight: 600; + color: #989898; } + + .default-text { + color: #2f2f2f; } + + .bold-text { + font-weight: bold; } + + .transparent { + opacity: 0; } + + .animated { + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; } + + @-webkit-keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } } + + @keyframes slideInDown { + from { + -webkit-transform: translate3d(0, -100%, 0); + transform: translate3d(0, -100%, 0); + visibility: visible; } + to { + -webkit-transform: translate3d(0, 0, 0); + transform: translate3d(0, 0, 0); } } + + .slideInDown { + -webkit-animation-duration: 1.3s; + animation-duration: 1.3s; + -webkit-animation-name: slideInDown; + animation-name: slideInDown; } + + @-webkit-keyframes fadeIn { + 0% { + opacity: 0; } + 40% { + opacity: 0; } + 100% { + opacity: 1; } } + + @keyframes fadeIn { + 0% { + opacity: 0; } + 40% { + opacity: 0; } + 100% { + opacity: 1; } } + + .fadeIn { + -webkit-animation-timing-function: linear; + animation-timing-function: linear; + -webkit-animation-name: fadeIn; + animation-name: fadeIn; } + + @media only screen and (min-width: 22.5625em) { + .main-description h1 { + font-size: 4.6em; + padding-top: 1.923em; + padding-bottom: 1.923em; } + .categories .category { + margin-top: 5em; } + .categories .name { + margin-bottom: 0.625em; } } + + @media only screen and (min-width: 33.5625em) { + .main-description h1 { + font-size: 5.2em; } } + + @media only screen and (min-width: 46.3125em) { + .links { + visibility: visible; + opacity: 1; + position: static; + float: right; + width: auto; + padding: 0; + height: 100%; + -webkit-box-shadow: none; + box-shadow: none; } + .links:before { + display: inline-block; + vertical-align: middle; + content: ''; + height: 100%; + width: 0px; } + .links li { + display: inline-block; + width: auto; + margin-left: 4em; + vertical-align: middle; } + .burger-wrap { + display: none; + } + .showBurger .burger-wrap { + display: block; + } + .showBurger .links { + visibility: hidden; + opacity: 0; + position: absolute; + float: none; + height: auto; + padding: 1em 0; + -webkit-box-shadow: 0 5px 7px 0 rgba(1, 1, 1, .1); + box-shadow: 0 5px 7px 0 rgba(1, 1, 1, .1); + } + .showBurger .links:before { + display: none; + } + .showBurger .links > li { + display: list-item; + margin: 0; + } + .main-description h1 { + font-size: 5.4em; + line-height: 1.1428; + padding-top: 2.3148em; + padding-bottom: 2.3148em; } + .categories .category, .categories .name, .categories .description { + float: left; } + .categories .category { + width: 100%; } + .categories .name { + width: 30%; + margin-bottom: 0; } + .categories .description { + width: 70%; } + .projects { + margin-top: 10em; } + .clearfix:after { + content: ""; + display: block; + clear: both; } } + + @media only screen and (min-width: 58.5em) { + .main-description h1 { + padding-bottom: 3.907em; } + .categories .category { + margin-top: 7.5em; } + .categories .name { + width: 42.47787%; } + .categories .description { + width: 57.52213%; } } + + @media only screen and (min-width: 73.125em) { + .main-container { + overflow-x: hidden; + } + .container { + max-width: 117em; + margin: 0 auto; } + .showBurger .links { + left: -100%; + right: -100%; } + } +</style> +<noscript id="deferredCss"> + <link rel="stylesheet" href="{{`app.css` | relURL}}"> +</noscript> +<script> + document.createElement("picture"); +</script> +<script src="https://cdn.jsdelivr.net/picturefill/3.0.2/picturefill.min.js" async></script> diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..6631073 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,23 @@ +{{$header := .Params.header}} +<div class="header"> + <div class="container"> + <div class="padder"> + <div class="main-description animated fadeIn"> + {{- with $header.description -}} + <h1 class="break-word">{{- . | safeHTML -}}</h1> + {{- end -}} + <picture> + {{$currentPageContext := .}} + {{- with $header.responsive_images -}} + {{range $imageWidth, $imageUrl := .}} + {{ $currentPageContext.Scratch.Add "srcSetArray" (slice (print ($imageUrl | relURL) " " $imageWidth "w")) }} + {{end}} + <source media="(max-width: 46.25em)" srcset="{{delimit ($currentPageContext.Scratch.Get "srcSetArray") ", "}}"> + {{ $currentPageContext.Scratch.Delete "srcSetArray" }} + {{- end -}} + <img src="{{$header.image | relURL}}" alt="{{$header.image_alt}}"> + </picture> + </div> + </div> + </div> +</div>
\ No newline at end of file diff --git a/layouts/partials/modules/projects.html b/layouts/partials/modules/projects.html new file mode 100644 index 0000000..b98d5bf --- /dev/null +++ b/layouts/partials/modules/projects.html @@ -0,0 +1,31 @@ +{{$currentPageContext := .}} +{{with .Params.projects}} +<ul class="projects clearfix"> + {{- range . -}} + <li class="project{{with .class}} {{.}}{{end}}"> + <a href="{{.link}}"> + <picture> + {{- with .responsive_images -}} + {{range $imageWidth, $imageUrl := .}} + {{ $currentPageContext.Scratch.Add "srcSetArray" (slice (print ($imageUrl | relURL) " " $imageWidth "w")) }} + {{end}} + <source media="(max-width: 46.25em)" srcset="{{delimit ($currentPageContext.Scratch.Get "srcSetArray") ", "}}"> + {{ $currentPageContext.Scratch.Delete "srcSetArray" }} + {{- end -}} + <img class="project-image" src="{{.image | relURL}}" alt="{{.image_alt}}"> + </picture> + <div class="project-hover"> + <div class="project-caption"> + {{- with .title -}} + <div class="project-title">{{.}}</div> + {{- end -}} + {{- with .type -}} + <div class="project-type">{{.}}</div> + {{- end -}} + </div> + </div> + </a> + </li> + {{- end -}} +</ul> +{{- end -}}
\ No newline at end of file diff --git a/layouts/partials/modules/text-groups.html b/layouts/partials/modules/text-groups.html new file mode 100644 index 0000000..f978088 --- /dev/null +++ b/layouts/partials/modules/text-groups.html @@ -0,0 +1,14 @@ +{{with .Params.text_groups}} +<div class="categories clearfix bottom-space"> + {{- range . -}} + <div class="category{{with .class}} {{.}}{{end}}"> + {{- with .name -}} + <div class="name">{{- . | safeHTML -}}</div> + {{- end -}} + {{- with .description -}} + <div class="description">{{- . | safeHTML -}}</div> + {{- end -}} + </div> + {{- end -}} +</div> +{{- end -}}
\ No newline at end of file diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html new file mode 100644 index 0000000..17f5baa --- /dev/null +++ b/layouts/partials/navigation.html @@ -0,0 +1,24 @@ +{{$maxMenuLinksToShow := .Site.Params.maxMenuLinksToShow | default 5}} +{{$showBurgerMenu := gt (len .Site.Menus.main) $maxMenuLinksToShow}} +<div class="nav-container{{if $showBurgerMenu}} showBurger{{end}}"> + <div class="container"> + <div class="padder"> + <div class="navbar animated slideInDown"> + <div class="logo"><a href="/"><img src="{{.Site.Params.logoImage | relURL}}" alt="{{.Site.Params.logoImageAlt}}"></a></div> + <div class="burger-wrap"> + <div class="burger"> + <div class="top"></div> + <div class="middle"></div> + <div class="bottom"></div> + </div> + </div> + <ul class="links"> + {{$permalink := .Permalink}} + {{- range .Site.Menus.main -}} + <li {{if in $permalink .URL }}class="active"{{end}}><a href="{{.URL}}">{{.Name}}</a></li> + {{- end -}} + </ul> + </div> + </div> + </div> +</div>
\ No newline at end of file diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..65b1b92 --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,4 @@ +{{- partial "deferred-load-script.html" . -}} +<script src="{{`vendor.js` | relURL}}"></script> +<script src="{{`app.js` | relURL}}"></script> +<script>require('app').init()</script> diff --git a/static/.gitkeep b/static/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/static/.gitkeep diff --git a/theme.toml b/theme.toml new file mode 100644 index 0000000..0fe245d --- /dev/null +++ b/theme.toml @@ -0,0 +1,12 @@ +name = "Yourfolio" +license = "MIT" +licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE.md" +description = "A simple and responsive theme for your personal website" +homepage = "http://example.com/" +tags = [] +features = [] +min_version = "0.30.2" + +[author] + name = "Sergey Furtak" + homepage = "https://sergfurtak.com" |