Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/aerohub/hugo-identity-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Grosser <development@stp-ip.net>2016-11-13 21:57:47 +0300
committerMichael Grosser <development@stp-ip.net>2016-11-13 21:57:47 +0300
commit5468212ba955112ffaa69af59c6ba55327f95e0d (patch)
treed976dbccc9540996eab37fbd3487e445c36b4742
parent80f417c82789a1481429f7e1f7e62a4aaac1a847 (diff)
Cleanup indentation and separate into partials
-rw-r--r--layouts/index.html119
-rw-r--r--layouts/partials/contact.html34
-rw-r--r--layouts/partials/footer.html22
-rw-r--r--layouts/partials/footer_scripts.html9
-rw-r--r--layouts/partials/header.html42
5 files changed, 133 insertions, 93 deletions
diff --git a/layouts/index.html b/layouts/index.html
index a52fbe7..d31a679 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,86 +1,53 @@
<!DOCTYPE HTML>
<!--
- Identity by HTML5 UP
- html5up.net | @n33co
- Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
- Hugo Identity by Pavel Kanyshev
- github.com/aerohub
- Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+ Identity by HTML5 UP
+ html5up.net | @ajlkn
+ Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
+
+ Identity port to hugo
+ stp-ip.net/p/hugo-identity | @stp_ip
+ Free for personal and commercial use under the CCA 3.0 license (https://creativecommons.org/licenses/by/3.0/legalcode)
-->
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en-US{{ end }}">
<html>
- <head>
- <title>{{ .Site.Title }}</title>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="icon" href="{{ .Site.BaseURL }}/images/icons/{{ .Site.Params.favicon }}" type="image/x-icon" />
- <link rel="apple-touch-icon-precomposed" href="{{ .Site.BaseURL }}/images/icons/{{ .Site.Params.appletouchicon }}" />
- <!--[if lte IE 8]><script src="{{ .Site.BaseURL }}/assets/js/html5shiv.js"></script><![endif]-->
- <link rel="stylesheet" href="{{ .Site.BaseURL }}/assets/css/main.css" />
- <!--[if lte IE 9]><link rel="stylesheet" href="{{ .Site.BaseURL }}/assets/css/ie9.css" /><![endif]-->
- <!--[if lte IE 8]><link rel="stylesheet" href="{{ .Site.BaseURL }}/assets/css/ie8.css" /><![endif]-->
- <noscript><link rel="stylesheet" href="{{ .Site.BaseURL }}/assets/css/noscript.css" /></noscript>
- <style>
- body {
- height: 100%;
- background-color: #ffffff;
- background-image: url("images/overlay.png"), -moz-linear-gradient(60deg, rgba(255, 165, 150, 0.5) 5%, rgba(0, 228, 255, 0.35)), url("images/backgrounds/{{ .Site.Params.background }}");
- background-image: url("images/overlay.png"), -webkit-linear-gradient(60deg, rgba(255, 165, 150, 0.5) 5%, rgba(0, 228, 255, 0.35)), url("images/backgrounds/{{ .Site.Params.background }}");
- background-image: url("images/overlay.png"), -ms-linear-gradient(60deg, rgba(255, 165, 150, 0.5) 5%, rgba(0, 228, 255, 0.35)), url("images/backgrounds/{{ .Site.Params.background }}");
- background-image: url("images/overlay.png"), linear-gradient(60deg, rgba(255, 165, 150, 0.5) 5%, rgba(0, 228, 255, 0.35)), url("images/backgrounds/{{ .Site.Params.background }}");
- background-repeat: repeat, no-repeat, no-repeat;
- background-size: 100px 100px, cover, cover;
- background-position: top left, center center, bottom center;
- background-attachment: fixed, fixed, fixed;
- }
- </style>
- {{ range .Site.Params.custom_css }}
- <link rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
- {{ end }}
- {{ .Hugo.Generator }}
- </head>
- <body class="is-loading">
-
- <!-- Wrapper -->
- <div id="wrapper">
+ {{ partial "header.html" . }}
+ <body class="is-loading">
- <!-- Main -->
- <section id="main">
- <header>
- <span class="avatar"><img src="{{ .Site.BaseURL }}/images/avatars/{{ .Site.Params.avatar }}" alt="" /></span>
- <h1>{{ .Site.Params.name }}</h1>
- <p>{{ .Site.Params.position }}</p>
- </header>
- {{ if .Site.Params.contact.enable }}
- {{ partial "contact.html" . }}
- {{ end }}
- <footer>
- <ul class="icons">
- {{ range .Site.Params.social }}
- <li><a href="{{ .link }}" class="{{ .icon }}">{{ .title }}</a></li>
- {{ end }}
- </ul>
- </footer>
- </section>
+ <!-- Wrapper -->
+ <div id="wrapper">
- <!-- Footer -->
- <footer id="footer">
- <ul class="copyright">
- <li>&copy; {{ .Site.Params.footer.copyright }}</li>
- <li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
- </ul>
- </footer>
+ <!-- Main -->
+ <section id="main">
+ <header>
+ <span class="avatar"><img src="/images/{{ .Site.Params.personal.avatar }}" alt="avatar" height="160" width="160" ></span>
+ <h1>
+ {{ with .Site.Params.personal.name }}
+ {{ . }}
+ {{ else }}
+ {{ .Site.Params.author }}
+ {{ end }}
+ </h1>
+ {{ with .Site.Params.personal.position }}
+ <h3 class="position">{{ . }}</h3>
+ {{ end }}
+ {{ with .Site.Params.personal.biography }}
+ <hr>
+ <span class="biography">{{ . }}</span>
+ {{ end }}
+ </header>
+ <footer>
+ <ul class="icons">
+ {{ range .Site.Params.social }}
+ <li><a href="{{ .link }}" class="{{ .icon }}">{{ .title }}</a></li>
+ {{ end }}
+ </ul>
+ </footer>
+ </section>
- </div>
+ <!-- Footer -->
+ {{ partial "footer.html" . }}
- <!-- Scripts -->
- <!--[if lte IE 8]><script src="{{ .Site.BaseURL }}/assets/js/respond.min.js"></script><![endif]-->
- <script>
- if ('addEventListener' in window) {
- window.addEventListener('load', function() { document.body.className = document.body.className.replace(/\bis-loading\b/, ''); });
- document.body.className += (navigator.userAgent.match(/(MSIE|rv:11\.0)/) ? ' is-ie' : '');
- }
- </script>
- {{ template "_internal/google_analytics.html" . }}
- </body>
+ </div>
+ {{ partial "footer_scripts.html" . }}
+ </body>
</html>
diff --git a/layouts/partials/contact.html b/layouts/partials/contact.html
index cb30e32..55268b1 100644
--- a/layouts/partials/contact.html
+++ b/layouts/partials/contact.html
@@ -1,17 +1,17 @@
- <hr />
- <h2>{{ .Site.Params.contact.formTitle }}</h2>
- <form method="post" action="//formspree.io/{{ with .Site.Params.email }}{{.}}{{ end }}">
- <div class="field">
- <input type="text" name="name" id="name" placeholder="{{ .Site.Params.contact.namePlaceholder }}" />
- </div>
- <div class="field">
- <input type="email" name="email" id="email" placeholder="{{ .Site.Params.contact.emailPlaceholder }}" />
- </div>
- <div class="field">
- <textarea name="message" id="message" placeholder="{{ .Site.Params.contact.messagePlaceholder }}" rows="4"></textarea>
- </div>
- <ul class="actions">
- <li><button type="submit">{{ .Site.Params.contact.buttonText }}</button></li>
- </ul>
- </form>
- <hr /> \ No newline at end of file
+<hr />
+<h2>{{ .Site.Params.contact.formTitle }}</h2>
+<form method="post" action="//formspree.io/{{ with .Site.Params.email }}{{.}}{{ end }}">
+ <div class="field">
+ <input type="text" name="name" id="name" placeholder="{{ .Site.Params.contact.namePlaceholder }}" />
+ </div>
+ <div class="field">
+ <input type="email" name="email" id="email" placeholder="{{ .Site.Params.contact.emailPlaceholder }}" />
+ </div>
+ <div class="field">
+ <textarea name="message" id="message" placeholder="{{ .Site.Params.contact.messagePlaceholder }}" rows="4"></textarea>
+ </div>
+ <ul class="actions">
+ <li><button type="submit">{{ .Site.Params.contact.buttonText }}</button></li>
+ </ul>
+</form>
+<hr />
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..53325d8
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,22 @@
+<footer id="footer">
+ <ul class="copyright">
+ <li>&copy;
+ {{ with .Site.Params.footer.copyright }}
+ {{ . }}
+ {{ else }}
+ {{ .Site.Params.author }}
+ {{ end }}</li>
+ <li>
+ {{ with .Site.Params.license }}
+ <a href="{{ .link }}">{{ .name }}</a>
+ {{ end }}</li>
+ </ul>
+ {{ with .Site.Params.credits }}
+ <ul class="credit copyright">
+ {{ range . }}
+ <li>{{ .text }} <a href="{{ .link }}">{{ .title }}</a></li>
+ {{ end }}
+ </ul>
+ {{ end }}
+
+</footer>
diff --git a/layouts/partials/footer_scripts.html b/layouts/partials/footer_scripts.html
new file mode 100644
index 0000000..0554a5b
--- /dev/null
+++ b/layouts/partials/footer_scripts.html
@@ -0,0 +1,9 @@
+<!-- Scripts -->
+ <!--[if lte IE 8]><script src="/js/respond.min.js"></script><![endif]-->
+ <script>
+ if ('addEventListener' in window) {
+ window.addEventListener('load', function() { document.body.className = document.body.className.replace(/\bis-loading\b/, ''); });
+ document.body.className += (navigator.userAgent.match(/(MSIE|rv:11\.0)/) ? ' is-ie' : '');
+ }
+ </script>
+ {{ template "_internal/google_analytics.html" . }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..6b72b12
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,42 @@
+<head>
+ <title>{{ .Site.Title }}</title>
+ <meta charset="utf-8" />
+ {{ if .Site.Params.resource_hints }}
+ <!-- preconnect, preload -->
+ {{ if .Site.GoogleAnalytics }}
+ <link rel="preconnect" href="https://www.google-analytics.com" crossorigin>
+ {{ end }}
+ <link rel="preload" as="style" href="/css/main.css" >
+ <link rel="preload" as="style" href="/css/source-sans-pro-300-family.css" >
+ {{ if not .Site.Params.custom_fa }}
+ <link rel="preload" as="style" href="/css/font-awesome.min.css" >
+ {{ else }}
+ <link rel="preload" as="style" href="/css/{{ .Site.Params.custom_fa }}" >
+ {{ end }}
+ <link rel="preload" as="font" type="font/woff2" href="/fonts/toadOcfmlt9b38dHJxOBGOode0-EuMkY--TSyExeINg.woff2" crossorigin>
+ <link rel="preload" as="image" href="/css/images/overlay.png" >
+ <link rel="preload" as="image" href="/images/bg.jpg" >
+ {{ if .Site.Params.analytics.piwik }}
+ <link rel="preload" href="{{ .Site.Params.analytics.piwik.URL }}"/piwik.js crossorigin>
+ {{ end }}
+ {{ end }}
+
+ {{ if .Site.Params.favicon_ico }}
+ <link rel="icon" href="/icons/{{ .Site.Params.favicon_ico }}" type="image/x-icon" {{ if .Site.Params.favicon_ico_sizes }}sizes="{{ .Site.Params.favicon_ico_sizes }}"{{ end }} />
+ {{ end }}
+ {{ if .Site.Params.favicon_png }}
+ <link rel="icon" href="/icons/{{ .Site.Params.favicon_png }}" type="image/png" {{ if .Site.Params.favicon_png_sizes }}sizes="{{ .Site.Params.favicon_png_sizes }}"{{ end }} />
+ {{ end }}
+ {{ if .Site.Params.favicon_svg }}
+ <link rel="icon" href="/icons/{{ .Site.Params.favicon_svg }}" type="image/svg+xml" sizes="any" />
+ {{ end }}
+ <link rel="apple-touch-icon-precomposed" href="/icons/{{ .Site.Params.appleicon }}" />
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <!--[if lte IE 8]><script src="/js/html5shiv.js"></script><![endif]-->
+ <link rel="stylesheet" href="/css/main.css" />
+ <link rel="stylesheet" href={{ if .Site.Params.custom_fa }}"/css/{{ .Site.Params.custom_fa }}" {{ else }}"/css/font-awesome.min.css"{{ end }} />
+ <!--[if lte IE 9]><link rel="stylesheet" href="/css/ie9.css" /><![endif]-->
+ <!--[if lte IE 8]><link rel="stylesheet" href="/css/ie8.css" /><![endif]-->
+ <noscript><link rel="stylesheet" href="/css/noscript.css" /></noscript>
+ {{ .Hugo.Generator }}
+</head>