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

github.com/miguelsimoni/hugo-initio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel.Simoni <miguel.simoni@gmail.com>2021-01-12 05:31:28 +0300
committerMiguel.Simoni <miguel.simoni@gmail.com>2021-01-12 05:31:28 +0300
commit874a2dff7071daa66f65ab0cdb196ea6bc0bb2bd (patch)
tree10320a3dcaa03733015cfa498ad28b2e4bc60ca3
parente3d69457f17ba1ca745168d26ce4877459ddbd01 (diff)
Fix several issues respecting the original template.dev
-rw-r--r--assets/css/styles.css (renamed from static/css/styles.css)8
-rw-r--r--assets/js/html5shiv.js (renamed from static/js/html5shiv.js)0
-rw-r--r--assets/js/template.js38
-rw-r--r--exampleSite/config.toml12
-rw-r--r--exampleSite/content/home/downloads/download1.md3
-rw-r--r--exampleSite/content/home/downloads/download2.md3
-rw-r--r--exampleSite/content/home/subheader.md6
-rw-r--r--i18n/en.toml15
-rw-r--r--layouts/_default/baseof.html6
-rw-r--r--layouts/_default/single.html16
-rw-r--r--layouts/partials/footer/footer.html32
-rw-r--r--layouts/partials/head/head.html18
-rw-r--r--layouts/partials/head/header.html25
-rw-r--r--layouts/partials/head/menu.html10
-rw-r--r--layouts/partials/home/download.html24
-rw-r--r--layouts/partials/home/subheader.html6
-rw-r--r--static/js/template.js42
-rw-r--r--theme.toml2
18 files changed, 144 insertions, 122 deletions
diff --git a/static/css/styles.css b/assets/css/styles.css
index ba74ecf..6b91b9a 100644
--- a/static/css/styles.css
+++ b/assets/css/styles.css
@@ -220,8 +220,9 @@ a:hover {
**********************************************************************/
-#head .banner {
- background-position: center center;
+#head {
+ background-color: #f4f4f4;
+ background-position: top center;
background-size: cover;
color: #7C7C7C;
padding: 30px 0 35px 0;
@@ -232,8 +233,8 @@ a:hover {
width: 140px;
height: 140px;
overflow: hidden;
- margin: 0 auto;
border: 9px solid rgba(0, 0, 0, 0.05);
+ margin: 0 auto;
}
#head img.img-circle {
@@ -248,7 +249,6 @@ a:hover {
border-radius: none;
}
-
#head .title {
font-family: Alice, Georgia, serif;
font-size: 49px;
diff --git a/static/js/html5shiv.js b/assets/js/html5shiv.js
index 448cebd..448cebd 100644
--- a/static/js/html5shiv.js
+++ b/assets/js/html5shiv.js
diff --git a/assets/js/template.js b/assets/js/template.js
new file mode 100644
index 0000000..c000467
--- /dev/null
+++ b/assets/js/template.js
@@ -0,0 +1,38 @@
+jQuery(document).ready(function ($) {
+
+ var my_nav = $('.navbar-sticky');
+ // grab the initial top offset of the navigation
+ var sticky_navigation_offset_top = my_nav.offset().top;
+
+ // our function that decides weather the navigation bar should have "fixed" css position or not.
+ var sticky_navigation = function () {
+ var scroll_top = $(window).scrollTop(); // our current vertical position from the top
+
+ // if we've scrolled more than the navigation, change its position to fixed to stick to top, otherwise change it back to relative
+ if (scroll_top > sticky_navigation_offset_top) {
+ my_nav.addClass('stick');
+ } else {
+ my_nav.removeClass('stick');
+ }
+ };
+
+ var initio_parallax_animation = function () {
+ $('.parallax').each(function (i, obj) {
+ var speed = $(this).data('parallax-speed');
+ if (speed) {
+ var background_pos = '-' + (window.pageYOffset / speed) + "px";
+ $(this).css('background-position', 'center ' + background_pos);
+ }
+ });
+ }
+
+ // run our function on load
+ sticky_navigation();
+
+ // and run it again every time you scroll
+ $(window).scroll(function () {
+ sticky_navigation();
+ initio_parallax_animation();
+ });
+
+});
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 9e003bb..5429505 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,11 +1,12 @@
-baseURL = "https://miguelsimoni.github.io/hugo-initio-site/"
-languageCode = "en-us"
+baseURL = "http://localhost:1313/"
+languageCode = "en"
title = "Initio - Free, multipurpose html5 template by GetTemplate"
theme = "hugo-initio"
publishDir = "docs"
[params]
name = "Anthony Russel"
+ description = "A mystery person"
email = "anthony.russel42@example.com"
phone = "+234 23 9873237"
address = "234 Hidden Pond Road, Ashland City, TN 37015"
@@ -16,12 +17,13 @@ publishDir = "docs"
banner = "images/bg_head.jpg"
favicon = "images/gt_favicon.png"
DateForm = "January 2, 2006"
+ author = "Sergey Pozhilov (GetTemplate.com)"
showSubheader = true
showServices = true
- showRecentWorks = true
- showDownload = true
- showClients = true
+ showRecentWorks = false
+ showDownloads = false
+ showClients = false
footerEnableContact = true
footerEnableFollowme = true
diff --git a/exampleSite/content/home/downloads/download1.md b/exampleSite/content/home/downloads/download1.md
index 74ec634..30c6843 100644
--- a/exampleSite/content/home/downloads/download1.md
+++ b/exampleSite/content/home/downloads/download1.md
@@ -1,6 +1,7 @@
+++
title = "Download original template"
file = "http://www.gettemplate.com/downloads/initio.zip"
+weight = 1
+++
-A simple, nice-looking **call to action box</b>. Boxing** is about respect. getting it for yourself, and taking it away from the other guy. no, this is mount everest. \ No newline at end of file
+A simple, nice-looking **call to action box**. Boxing is about respect. getting it for yourself, and taking it away from the other guy. no, this is mount everest.
diff --git a/exampleSite/content/home/downloads/download2.md b/exampleSite/content/home/downloads/download2.md
index 12fc1ef..0f5f2b3 100644
--- a/exampleSite/content/home/downloads/download2.md
+++ b/exampleSite/content/home/downloads/download2.md
@@ -1,6 +1,7 @@
+++
title = "Download HUGO template"
file = "https://github.com/miguelsimoni/hugo-initio/archive/master.zip"
+weigth = 2
+++
-Another simple, nice-looking **call to action box</b>. Boxing** is about respect. getting it for yourself, and taking it away from the other guy. no, this is mount everest. \ No newline at end of file
+Another simple, nice-looking **call to action box**. Boxing is about respect. getting it for yourself, and taking it away from the other guy. no, this is mount everest.
diff --git a/exampleSite/content/home/subheader.md b/exampleSite/content/home/subheader.md
new file mode 100644
index 0000000..478164c
--- /dev/null
+++ b/exampleSite/content/home/subheader.md
@@ -0,0 +1,6 @@
++++
+type = "subheader"
+title = ""
++++
+
+Let me tell you something my friend. hope is a dangerous thing. hope can drive a man insane. you [measure](/about) yourself by the people who measure themselves by you. it only took me [six days](/sidebar-right).
diff --git a/i18n/en.toml b/i18n/en.toml
index d946b84..cb2c3ed 100644
--- a/i18n/en.toml
+++ b/i18n/en.toml
@@ -1,7 +1,18 @@
+[home_services]
+ other = "Services"
+
+[home_recentworks]
+ other = "Recent works"
+
+[home_clients]
+ other = "Clients"
+
[404_title]
other = "404"
[404_description]
other = "Oops! This page doesn't exist!"
-[footer_text]
- other = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \\<br\\> Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." \ No newline at end of file
+[footer_text1]
+ other = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque, nihil natus explicabo ipsum quia iste aliquid repellat eveniet velit ipsa sunt libero sed aperiam id soluta officia asperiores adipisci maxime!"
+[footer_text2]
+ other = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque, nihil natus explicabo ipsum quia iste aliquid repellat eveniet velit ipsa sunt libero sed aperiam id soluta officia asperiores adipisci maxime!"
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 6568988..240442f 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,15 +1,15 @@
<!DOCTYPE html>
-<html>
+<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en{{ end }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
- <meta name="author" content="Sergey Pozhilov (GetTemplate.com)">
+ <meta name="author" content="{{ .Site.Author }}">
{{ partial "head/head.html" . }}
</head>
- <body>
+ <body class="home">
{{ block "header" . }}
{{ partial "head/header.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b729c00..4376d1c 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -11,7 +11,7 @@
<div class="entry-meta">
<span class="posted-on">
<time class="entry-date published" datetime="{{ .Date.Format .Site.Params.DateForm }}">
- {{- .Date.Format "January 2, 2006" -}}
+ {{- .Date.Format "January 2, 2006" -}}
</time>
</span>
</div>
@@ -25,13 +25,13 @@
</div>
</div> <!-- /row post -->
- <div class="row">
+ <div class="row">
<div class="col-sm-8 col-sm-offset-2">
<div id="share">
- {{ if .Params.Share }}
- {{ partial "sharethis.html" . }}
- {{ end }}
+ {{ if .Params.Share }}
+ {{ partial "sharethis.html" . }}
+ {{ end }}
</div>
</div>
</div> <!-- /row share -->
@@ -41,9 +41,9 @@
<div class="col-sm-8 col-sm-offset-2">
<div id="comments">
- {{ if .Params.Comments }}
- {{ partial "disqus.html" . }}
- {{ end }}
+ {{ if .Params.Comments }}
+ {{ partial "disqus.html" . }}
+ {{ end }}
</div>
</div>
</div> <!-- /row comments -->
diff --git a/layouts/partials/footer/footer.html b/layouts/partials/footer/footer.html
index 9a9c62c..d868d3d 100644
--- a/layouts/partials/footer/footer.html
+++ b/layouts/partials/footer/footer.html
@@ -7,8 +7,8 @@
<div class="widget-body">
<p>{{ if .Site.Params.phone }}{{ .Site.Params.phone }}<br>{{ end }}
{{ if .Site.Params.email }}<a href="mailto:{{ .Site.Params.email }}">{{ .Site.Params.email }}</a><br>{{ end }}
- <br>
- {{ if .Site.Params.address }}{{ .Site.Params.address }}{{ end }}
+ <br>
+ {{ if .Site.Params.address }}{{ .Site.Params.address }}{{ end }}
</p>
</div>
</div>
@@ -20,9 +20,9 @@
<div class="widget-body">
<p class="follow-me-icons">
{{ range .Site.Params.social }}
- {{ if .footer }}
- <a href="{{ .url }}" target="_blank"><i class="{{ .icon }} fa-1x"></i></a>
- {{ end }}
+ {{ if .footer }}
+ <a href="{{ .url }}" target="_blank"><i class="{{ .icon }} fa-1x"></i></a>
+ {{ end }}
{{ end }}
</p>
</div>
@@ -33,7 +33,12 @@
<div class="col-md-3 widget">
<h3 class="widget-title">Text widget</h3>
<div class="widget-body">
- {{ i18n "footer_text" . | markdownify }}
+ <p>
+ {{ i18n "footer_text1" . | markdownify }}
+ </p>
+ <p>
+ {{ i18n "footer_text2" . | markdownify }}
+ </p>
</div>
</div>
{{ end }}
@@ -44,8 +49,8 @@
<div class="widget-body">
<p>{{ if .Site.Params.phone }}{{ .Site.Params.phone }}<br>{{ end }}
{{ if .Site.Params.email }}<a href="mailto:{{ .Site.Params.email }}">{{ .Site.Params.email }}</a><br>{{ end }}
- <br>
- {{ if .Site.Params.address }}{{ .Site.Params.address }}{{ end }}
+ <br>
+ {{ if .Site.Params.address }}{{ .Site.Params.address }}{{ end }}
</p>
</div>
</div>
@@ -70,8 +75,8 @@
<p class="text-right">
Copyright &copy; {{ .Site.Params.year }}, {{ .Site.Params.name }}<br>
Design: <a href="http://www.gettemplate.com" rel="designer">Initio by GetTemplate</a> -
- Powered by: <a href="https://gohugo.io/" rel="poweredby">Hugo</a>
- </p>
+ Powered by: <a href="https://gohugo.io/" rel="poweredby">Hugo</a>
+ </p>
</div>
</div>
@@ -84,7 +89,12 @@
<!-- JavaScript libs are placed at the end of the document so the pages load faster -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
-<script src="{{ .Site.BaseURL }}js/template.js"></script>
+
+{{ $template := resources.Get "js/template.js" }}
+{{ $html5shiv := resources.Get "js/html5shiv.js" }}
+{{ $js := (slice $template $html5shiv | resources.Concat "js/bundle.js") | resources.Minify | resources.Fingerprint "sha512" }}
+<script src="{{ $js.Permalink }}" integrity="{{ $js.Data.Integrity }}"></script>
+
{{ if .Site.Params.disqus -}}
<script id="dsq-count-scr" src="//{{ .Site.Params.disqus.site }}/count.js" async></script>
{{ end -}}
diff --git a/layouts/partials/head/head.html b/layouts/partials/head/head.html
index 7fa4613..1b98793 100644
--- a/layouts/partials/head/head.html
+++ b/layouts/partials/head/head.html
@@ -1,4 +1,3 @@
-
<title>{{ .Title }}</title>
<link rel="shortcut icon" href="{{ .Site.BaseURL }}{{ .Site.Params.favicon }}">
@@ -11,18 +10,11 @@
<!-- Fonts -->
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Alice|Open+Sans:400,300,700">
- <!-- Custom styles -->
- <link rel="stylesheet" href="{{ .Site.BaseURL }}css/styles.css">
-
- {{ range .Site.Params.customCSS -}}
- {{ $style := resources.Get . }}
- <link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" media="screen">
- {{- end }}
+ {{ $styles := resources.Get "css/styles.css" }}
+ {{ $css := $styles | resources.Minify | resources.Fingerprint "sha512" }}
+ <link rel="stylesheet" href="{{ $css.Permalink }}" integrity="{{ $css.Data.Integrity }}">
<!-- Share this -->
{{ if .Site.Params.customsharethis }}
- <script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property={{ .Site.Params.sharethis.property }}&product=custom-share-buttons"></script>
- {{ end }}
-
-</head>
-
+ <script type="text/javascript" src="//platform-api.sharethis.com/js/sharethis.js#property={{ .Site.Params.sharethis.property }}&product=custom-share-buttons"></script>
+ {{ end }}
diff --git a/layouts/partials/head/header.html b/layouts/partials/head/header.html
index f8ecb6f..f24c34e 100644
--- a/layouts/partials/head/header.html
+++ b/layouts/partials/head/header.html
@@ -1,14 +1,13 @@
-<header id="header" style="padding: 0; height: 100%">
- <div id="head" class="parallax" parallax-speed="2">
- <div class="banner" style="background-image:url({{ .Site.BaseURL }}{{ .Site.Params.banner }});" >
- <h1 id="logo" class="text-center">
- <img class="img-{{.Site.Params.avatarclass | default "circle"}}" src="{{ .Site.BaseURL }}{{ .Site.Params.avatar }}" alt="">
- <span class="title">{{ .Site.Params.name }}</span>
- <span class="tagline">{{ .Site.Params.description }}<br>
- <a href="mailto:{{ .Site.Params.email }}">{{ .Site.Params.email }}</a>
- </span>
- </h1>
- </div>
+<header id="header">
+ <div id="head" class="parallax" data-parallax-speed="2" style="background-image:url('{{ .Site.BaseURL }}{{ .Site.Params.banner }}');">
+ <h1 id="logo" class="text-center">
+ <img class='img-{{ .Site.Params.avatarclass | default "circle"}}' src="{{ .Site.BaseURL }}{{ .Site.Params.avatar }}" alt="">
+ <span class="title">{{ .Site.Params.name }}</span>
+ <span class="tagline">{{ .Site.Params.description }}<br>
+ <a href="mailto:{{ .Site.Params.email }}">{{ .Site.Params.email }}</a>
+ </span>
+ </h1>
+</div>
- {{ partial "head/menu.html" . }}
-</header>
+{{ partial "head/menu.html" . }}
+</header> \ No newline at end of file
diff --git a/layouts/partials/head/menu.html b/layouts/partials/head/menu.html
index c718a4a..c005173 100644
--- a/layouts/partials/head/menu.html
+++ b/layouts/partials/head/menu.html
@@ -13,7 +13,8 @@
<div class="navbar-collapse collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
- {{ range .Site.Menus.main }} {{ if .HasChildren }}
+ {{ range .Site.Menus.main }}
+ {{ if .HasChildren }}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
{{ .Name }}<b class="caret"></b>
@@ -22,7 +23,7 @@
{{ range .Children }}
<li>
<a href="{{ .URL | relLangURL }}" {{ if $.IsHome }} data-target="{{ .URL }}" {{ end }}>
- {{ .Name }}
+ {{ .Name }}
</a>
</li>
{{end}}
@@ -32,12 +33,11 @@
<li>
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
- {{ end }} {{end}}
-
+ {{ end }}
+ {{ end}}
</ul>
</div>
<!--/.nav-collapse -->
</div>
</nav>
-<nav class="navbar navbar-fake"></nav> \ No newline at end of file
diff --git a/layouts/partials/home/download.html b/layouts/partials/home/download.html
index c1e24dd..07f9847 100644
--- a/layouts/partials/home/download.html
+++ b/layouts/partials/home/download.html
@@ -1,14 +1,14 @@
-{{ range where .Data.Pages "Section" .Section }}
- <div class="row section topspace">
- <div class="panel panel-cta">
- <div class="panel-body">
- <div class="col-lg-8">
- {{ .Content }}
- </div>
- <div class="col-lg-4 text-right">
- <a href={{ .Params.file }} class="btn btn-primary btn-lg">{{ .Title }}</a>
- </div>
+<div class="row section topspace">
+ {{ range where .Data.Pages "Section" .Section }}
+ <div class="panel panel-cta">
+ <div class="panel-body">
+ <div class="col-lg-8">
+ {{ .Content }}
+ </div>
+ <div class="col-lg-4 text-right">
+ <a href={{ .Params.file }} class="btn btn-primary btn-lg">{{ .Title }}</a>
</div>
</div>
- </div> <!-- /section -->
-{{ end }}
+ </div>
+ {{ end }}
+</div> <!-- /section -->
diff --git a/layouts/partials/home/subheader.html b/layouts/partials/home/subheader.html
index d691fc9..eee99b0 100644
--- a/layouts/partials/home/subheader.html
+++ b/layouts/partials/home/subheader.html
@@ -1,5 +1,9 @@
+{{ range where .Site.Pages "Type" "subheader" }}
<div class="row section topspace">
<div class="col-md-12">
- <p class="lead text-center text-muted">{{ .Site.Params.subheader }}</p>
+ <div class="lead text-center text-muted">
+ {{ .Content }}
+ </div>
</div>
</div> <!-- / section -->
+{{ end }}
diff --git a/static/js/template.js b/static/js/template.js
deleted file mode 100644
index 2267958..0000000
--- a/static/js/template.js
+++ /dev/null
@@ -1,42 +0,0 @@
-jQuery(document).ready(function($) {
-
- var my_nav = $('.navbar-sticky');
- var fake_nav = $('.navbar-fake');
- // grab the initial top offset of the navigation
- var sticky_navigation_offset_top = my_nav.offset().top;
-
- // our function that decides weather the navigation bar should have "fixed" css position or not.
- var sticky_navigation = function(){
- var scroll_top = $(window).scrollTop(); // our current vertical position from the top
-
- // if we've scrolled more than the navigation, change its position to fixed to stick to top, otherwise change it back to relative
- if (scroll_top > sticky_navigation_offset_top) {
- fake_nav.height(my_nav.outerHeight());
- fake_nav.show();
- my_nav.addClass( 'stick' );
- } else {
- my_nav.removeClass( 'stick' );
- fake_nav.hide();
- }
- };
-
- var initio_parallax_animation = function() {
- $('.parallax').each( function(i, obj) {
- var speed = $(this).attr('parallax-speed');
- if( speed ) {
- var background_pos = '-' + (window.pageYOffset / speed) + "px";
- $(this).css( 'background-position', 'center ' + background_pos );
- }
- });
- }
-
- // run our function on load
- sticky_navigation();
-
- // and run it again every time you scroll
- $(window).scroll(function() {
- sticky_navigation();
- initio_parallax_animation();
- });
-
-});
diff --git a/theme.toml b/theme.toml
index b6aaed9..ff44abb 100644
--- a/theme.toml
+++ b/theme.toml
@@ -5,7 +5,7 @@ description = ""
homepage = "https://miguelsimoni.github.io/hugo-initio-site/"
tags = ["blog","responsive","personal","google analytics","portfolio","disqus","bootstrap","font awesome","projects","creative","landing page","product","white","share this"]
features = ["blog","responsive","personal","google analytics","portfolio","disqus","bootstrap","font awesome","projects","creative","landing page","product","white","share this"]
-min_version = "0.1"
+min_version = "0.68.3"
[author]
name = "Miguel Simoni"