mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-14 00:59:43 +00:00
Use headless bundle for home page
This commit is contained in:
parent
2ed572bea8
commit
0f2d3808ee
43 changed files with 128 additions and 59 deletions
|
@ -7,12 +7,11 @@ theme = "introduction"
|
||||||
[params]
|
[params]
|
||||||
introHeight = "large" # Input either 'medium' or 'large' or 'fullheight'
|
introHeight = "large" # Input either 'medium' or 'large' or 'fullheight'
|
||||||
themeStyle = "light" # Choose 'light' or 'dark'
|
themeStyle = "light" # Choose 'light' or 'dark'
|
||||||
avatar = "img/profile.jpg" # Path to image in static folder eg. img/avatar.png, or comment out to remove
|
faviconFile = "img/fav.ico"
|
||||||
email = "youremail@email.com" # Shows in contact section, or leave blank to omit
|
email = "youremail@email.com" # Shows in contact section, or leave blank to omit
|
||||||
localTime = true # Show your current local time in contact section
|
localTime = true # Show your current local time in contact section
|
||||||
timeZone = "America/Los_Angeles" # Your timezone as in the TZ* column of this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
timeZone = "America/Los_Angeles" # Your timezone as in the TZ* column of this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
dateForm = "Jan 2, 2006"
|
dateForm = "Jan 2, 2006"
|
||||||
faviconFile = "img/fav.ico"
|
|
||||||
fadeIn = true # Turn on/off the fade-in effect
|
fadeIn = true # Turn on/off the fade-in effect
|
||||||
showRSSButton = true # Show rss button in navigation
|
showRSSButton = true # Show rss button in navigation
|
||||||
customCSS = [] # Include custom css files e.g. ["css/foo.css", "css/bar.css"]
|
customCSS = [] # Include custom css files e.g. ["css/foo.css", "css/bar.css"]
|
||||||
|
@ -55,30 +54,27 @@ theme = "introduction"
|
||||||
languageName = "English"
|
languageName = "English"
|
||||||
languageCode = "en-us"
|
languageCode = "en-us"
|
||||||
contentDir = "content/en"
|
contentDir = "content/en"
|
||||||
weigth = 2
|
weight = 0
|
||||||
title = "Introduction"
|
title = "Introduction"
|
||||||
firstName = "Hi, I'm Introduction" # First name shows in introduction on main page
|
[languages.en.params]
|
||||||
tagLine = "I'm a theme for Hugo." # Appears after the introduction
|
description = "Website Description" # Max 160 characters show in search results
|
||||||
description = "Website Description" # Max 160 characters show in search results
|
footerText = "" # Text to override default footer text (markdown allowed)
|
||||||
footerText = "" # Text to override default footer text (markdown allowed)
|
|
||||||
[languages.es]
|
[languages.es]
|
||||||
languageName = "Español"
|
languageName = "Español"
|
||||||
languageCode = "es"
|
languageCode = "es"
|
||||||
contentDir = "content/es"
|
contentDir = "content/es"
|
||||||
weigth = 1
|
weight = 1
|
||||||
title = "Introducción"
|
title = "Introducción"
|
||||||
firstName = "Hola, Soy Introducción"
|
[languages.es.params]
|
||||||
tagLine = "Soy un tema para Hugo."
|
description = "Descripcion del sitio web"
|
||||||
description = "Descripcion del sitio web"
|
footerText = ""
|
||||||
footerText = ""
|
|
||||||
[languages.de]
|
[languages.de]
|
||||||
languageName = "Deutsch"
|
languageName = "Deutsch"
|
||||||
languageCode = "de"
|
languageCode = "de"
|
||||||
contentDir = "content/de"
|
contentDir = "content/de"
|
||||||
weigth = 0
|
weight = 2
|
||||||
title = "Vorstellung"
|
title = "Vorstellung"
|
||||||
firstName = "Hallo, ich bin Vorstellung"
|
[languages.de.params]
|
||||||
tagLine = "Ich bin ein Hugo Theme"
|
description = "Beschreibung der Webseite"
|
||||||
description = "Beschreibung der Webseite"
|
footerText = ""
|
||||||
footerText = ""
|
dateForm = "2. January 2006"
|
||||||
dateForm = "2. January 2006"
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "Über mich"
|
title: "Über mich"
|
||||||
|
image: "profile.jpg"
|
||||||
|
weight: 0
|
||||||
---
|
---
|
||||||
|
|
||||||
Dies ist **Vorstellung**, ein minimales Webseiten Theme für [Hugo](https://gohugo.io)
|
Dies ist **Vorstellung**, ein minimales Webseiten Theme für [Hugo](https://gohugo.io)
|
6
exampleSite/content/de/home/index.md
Normal file
6
exampleSite/content/de/home/index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Hallo, ich bin Vorstellung"
|
||||||
|
headless: true
|
||||||
|
---
|
||||||
|
|
||||||
|
Ich bin ein Hugo Theme
|
6
exampleSite/content/de/home/lorem.md
Normal file
6
exampleSite/content/de/home/lorem.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Lorem Ipsum"
|
||||||
|
weight: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
Weitere Abschnitte für die Hauptseiten können hinzugefügt werden, indem Datein unter `content/home/` erstellt werden.
|
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "About"
|
title: "About"
|
||||||
|
image: "profile.jpg"
|
||||||
|
weight: 0
|
||||||
---
|
---
|
||||||
|
|
||||||
This is **Introduction**, a minimal scrolling website theme made for [Hugo](https://gohugo.io)
|
This is **Introduction**, a minimal scrolling website theme made for [Hugo](https://gohugo.io)
|
6
exampleSite/content/en/home/index.md
Normal file
6
exampleSite/content/en/home/index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Hi, I'm Introduction"
|
||||||
|
headless: true
|
||||||
|
---
|
||||||
|
|
||||||
|
I'm a theme for Hugo
|
6
exampleSite/content/en/home/lorem.md
Normal file
6
exampleSite/content/en/home/lorem.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Lorem Ipsum"
|
||||||
|
weight: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
You can add more sections to the home page by adding file to `content/home/`
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
title: "Sobre"
|
title: "Sobre"
|
||||||
|
image: "profile.jpg"
|
||||||
|
weight: 0
|
||||||
---
|
---
|
||||||
|
|
||||||
Esto es **Introducción**, un tema mínimo con desplazamiento para sitios web hechos con [Hugo](https://gohugo.io).
|
Esto es **Introducción**, un tema mínimo con desplazamiento para sitios web hechos con [Hugo](https://gohugo.io).
|
6
exampleSite/content/es/home/index.md
Normal file
6
exampleSite/content/es/home/index.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Hola, Soy Introducción"
|
||||||
|
headless: true
|
||||||
|
---
|
||||||
|
|
||||||
|
Soy un tema para Hugo
|
6
exampleSite/content/es/home/lorem.md
Normal file
6
exampleSite/content/es/home/lorem.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "Lorem Ipsum"
|
||||||
|
weight: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
You can add more sections to the home page by adding file to `content/home/`
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"Target":"js/bundleMoment.c0c2eddd62b0f9719cad4bf88dc2cf9a1b24cb979da336a28e71733aec00a9b2.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-wMLt3WKw+XGcrUv4jcLPmhsky5edozaijnFzOuwAqbI="}}
|
{"Target":"js/bundleMoment.6d57a5711d10d4a2fa0d6c1ce0c0ce16ed263a85b195485a43b490f1badcaca4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-bVelcR0Q1KL6DWwc4MDOFu0mOoWxlUhaQ7SQ8brcrKQ="}}
|
|
@ -1 +0,0 @@
|
||||||
{"Target":"js/index.tmp.min.css","MediaType":"application/javascript","Data":{}}
|
|
|
@ -0,0 +1 @@
|
||||||
|
{"Target":"js/index.min.js","MediaType":"application/javascript","Data":{}}
|
|
@ -0,0 +1,4 @@
|
||||||
|
$(document).ready(function() {
|
||||||
|
var time = moment().tz("America/Los_Angeles").format("h:mm A");
|
||||||
|
$('#time').html(time);
|
||||||
|
})
|
|
@ -0,0 +1 @@
|
||||||
|
{"Target":"js/initMoment.tmp.js","MediaType":"application/javascript","Data":{}}
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"Target":"js/bundleMoment.c0c2eddd62b0f9719cad4bf88dc2cf9a1b24cb979da336a28e71733aec00a9b2.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-wMLt3WKw+XGcrUv4jcLPmhsky5edozaijnFzOuwAqbI="}}
|
{"Target":"js/bundleMoment.6d57a5711d10d4a2fa0d6c1ce0c0ce16ed263a85b195485a43b490f1badcaca4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-bVelcR0Q1KL6DWwc4MDOFu0mOoWxlUhaQ7SQ8brcrKQ="}}
|
|
@ -1 +0,0 @@
|
||||||
{"Target":"js/index.tmp.min.css","MediaType":"application/javascript","Data":{}}
|
|
|
@ -0,0 +1 @@
|
||||||
|
{"Target":"js/index.min.js","MediaType":"application/javascript","Data":{}}
|
|
@ -0,0 +1,4 @@
|
||||||
|
$(document).ready(function() {
|
||||||
|
var time = moment().tz("America/Los_Angeles").format("h:mm A");
|
||||||
|
$('#time').html(time);
|
||||||
|
})
|
|
@ -0,0 +1 @@
|
||||||
|
{"Target":"js/initMoment.tmp.js","MediaType":"application/javascript","Data":{}}
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
{"Target":"js/bundleMoment.c0c2eddd62b0f9719cad4bf88dc2cf9a1b24cb979da336a28e71733aec00a9b2.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-wMLt3WKw+XGcrUv4jcLPmhsky5edozaijnFzOuwAqbI="}}
|
{"Target":"js/bundleMoment.6d57a5711d10d4a2fa0d6c1ce0c0ce16ed263a85b195485a43b490f1badcaca4.js","MediaType":"application/javascript","Data":{"Integrity":"sha256-bVelcR0Q1KL6DWwc4MDOFu0mOoWxlUhaQ7SQ8brcrKQ="}}
|
|
@ -1 +0,0 @@
|
||||||
{"Target":"js/index.tmp.min.css","MediaType":"application/javascript","Data":{}}
|
|
|
@ -0,0 +1 @@
|
||||||
|
{"Target":"js/index.min.js","MediaType":"application/javascript","Data":{}}
|
|
@ -0,0 +1,4 @@
|
||||||
|
$(document).ready(function() {
|
||||||
|
var time = moment().tz("America/Los_Angeles").format("h:mm A");
|
||||||
|
$('#time').html(time);
|
||||||
|
})
|
|
@ -0,0 +1 @@
|
||||||
|
{"Target":"js/initMoment.tmp.js","MediaType":"application/javascript","Data":{}}
|
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
|
@ -2,8 +2,6 @@
|
||||||
other = "404"
|
other = "404"
|
||||||
[404_description]
|
[404_description]
|
||||||
other = "Oop! Endweder hast du einen Fehler gefunden ([dann kontaktiere mich bitte](mailto:{{ .Site.Params.email }})) oder du versucht etwas zu finden, was es nicht gibt. Diese Seite exisiert nicht!"
|
other = "Oop! Endweder hast du einen Fehler gefunden ([dann kontaktiere mich bitte](mailto:{{ .Site.Params.email }})) oder du versucht etwas zu finden, was es nicht gibt. Diese Seite exisiert nicht!"
|
||||||
[index_avatarAlt]
|
|
||||||
other = "Mein Profil Bild"
|
|
||||||
[index_projects_allProjects]
|
[index_projects_allProjects]
|
||||||
other = "Alle Projekte"
|
other = "Alle Projekte"
|
||||||
[index_blog_latestPosts]
|
[index_blog_latestPosts]
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
other = "404"
|
other = "404"
|
||||||
[404_description]
|
[404_description]
|
||||||
other = "Oops! Either you've found a bug (in which case, [please tell me](mailto:{{ .Site.Params.email }})) or you're just making things up. This page doesn't exist!"
|
other = "Oops! Either you've found a bug (in which case, [please tell me](mailto:{{ .Site.Params.email }})) or you're just making things up. This page doesn't exist!"
|
||||||
[index_avatarAlt]
|
|
||||||
other = "My profile picture"
|
|
||||||
[index_projects_allProjects]
|
[index_projects_allProjects]
|
||||||
other = "All Projects"
|
other = "All Projects"
|
||||||
[index_blog_latestPosts]
|
[index_blog_latestPosts]
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
other = "404"
|
other = "404"
|
||||||
[404_description]
|
[404_description]
|
||||||
other = "Oops! O bien encontraste un bug (en cuyo caso, [por favor avisame](mailto:{{ .Site.Params.email }})) o simplemente estas inventando cosas. Esta página no existe!"
|
other = "Oops! O bien encontraste un bug (en cuyo caso, [por favor avisame](mailto:{{ .Site.Params.email }})) o simplemente estas inventando cosas. Esta página no existe!"
|
||||||
[index_avatarAlt]
|
|
||||||
other = "Mi foto de perfil"
|
|
||||||
[index_blog_latestPosts]
|
[index_blog_latestPosts]
|
||||||
other = "Últimas Entradas"
|
other = "Últimas Entradas"
|
||||||
[index_blog_allPosts]
|
[index_blog_allPosts]
|
||||||
|
|
|
@ -8,17 +8,18 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="top">
|
<div id="top">
|
||||||
|
{{ with .Site.GetPage "page" "home" }}
|
||||||
<div class="hero is-{{ .Site.Params.introHeight | default "fullheight" }}">
|
<div class="hero is-{{ .Site.Params.introHeight | default "fullheight" }}">
|
||||||
<!-- Super sweet Hero body title -->
|
<!-- Super sweet Hero body title -->
|
||||||
<div class="hero-body">
|
<div class="hero-body">
|
||||||
<div class="container has-text-centered">
|
<div class="container has-text-centered">
|
||||||
<!-- Title and tagline -->
|
<!-- Title and tagline -->
|
||||||
<h1 class="bold-title {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}">
|
<h1 class="bold-title {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}">
|
||||||
{{ .Site.Params.firstName | default "Introduction" }}.
|
{{ .Title }}
|
||||||
</h1>
|
</h1>
|
||||||
<h3 class="subtitle is-3 {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
|
<div class="subtitle is-3 {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
|
||||||
{{ .Site.Params.tagLine }}
|
{{ .Content }}
|
||||||
</h3>
|
</div>
|
||||||
<!-- End title and tagline -->
|
<!-- End title and tagline -->
|
||||||
<!-- Some social icons -->
|
<!-- Some social icons -->
|
||||||
<div class=" {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
|
<div class=" {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
|
||||||
|
@ -29,43 +30,58 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- Hero body title end -->
|
<!-- Hero body title end -->
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<!-- Done with Hero -->
|
<!-- Done with Hero -->
|
||||||
<!-- Everything below fades in three! -->
|
|
||||||
<div class="section no-padding-top {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
|
<div class="section no-padding-top {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
|
||||||
<!-- Tell them all about it! -->
|
<!-- Tell them all about it! -->
|
||||||
{{ partial "nav.html" . }}
|
{{ partial "nav.html" . }}
|
||||||
{{ with .Site.GetPage "page" "about" }}
|
|
||||||
|
{{ with .Site.GetPage "page" "home" }}
|
||||||
|
{{ $home := . }}
|
||||||
|
{{ range sort (.Resources.ByType "page") "Params.weight" }}
|
||||||
|
|
||||||
|
{{ if ne .Name "contact.md" }}
|
||||||
|
<!-- Range through all sections in /home execept contact.md -->
|
||||||
<div class="section" id="{{ .File.TranslationBaseName }}">
|
<div class="section" id="{{ .File.TranslationBaseName }}">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 class="title is-2 has-text-centered">{{ .Title }}</h2>
|
<h2 class="title is-2 has-text-centered">{{ .Title }}</h2>
|
||||||
<div class="columns"><!-- Avatar and about.md side by side except mobile -->
|
{{ if .Params.Image }}
|
||||||
{{ if .Site.Params.avatar }}
|
<div class="columns">
|
||||||
<div class="column is-one-third has-text-centered">
|
<div class="column is-one-third has-text-centered">
|
||||||
<img class="img-responsive avatar" src="{{ .Site.Params.avatar | relURL }}" alt="{{ i18n "index_avatarAlt" . }}">
|
{{ with $home.Resources.GetMatch .Params.Image }}
|
||||||
|
{{ with .Resize "320x" }}
|
||||||
|
<img class="img-responsive avatar" src="{{ .RelPermalink }}" alt="{{ .Name }}">
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
<div class="markdown column">
|
||||||
<div class="column markdown">
|
{{ .Content }}
|
||||||
{{.Content}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<div class="markdown has-text-centered">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<!-- End About container-->
|
<!-- End About container-->
|
||||||
{{ partial "top-icon.html" . }}
|
{{ partial "top-icon.html" . }}
|
||||||
</div>
|
</div>
|
||||||
<div class="container"><hr></div>
|
<div class="container"><hr></div>
|
||||||
<!-- End About section -->
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<!-- Now for some cool projects -->
|
<!-- Now for some cool projects -->
|
||||||
{{ partial "home/projects.html" . }}
|
{{ partial "home/projects.html" . }}
|
||||||
<!-- Let's show some blog posts -->
|
<!-- Let's show some blog posts -->
|
||||||
{{ partial "home/blog.html" . }}
|
{{ partial "home/blog.html" . }}
|
||||||
<!-- Let's chat, shall we? -->
|
<!-- Let's chat, shall we? -->
|
||||||
{{ with .Site.GetPage "page" "contact" }}
|
{{ with .Resources.GetMatch "contact.md" }}
|
||||||
<div class="section" id="{{ .File.TranslationBaseName }}">
|
<div class="section" id="{{ .File.TranslationBaseName }}">
|
||||||
<div class="container has-text-centered">
|
<div class="container has-text-centered">
|
||||||
<h2 class="title is-2">{{ .Title }}</h2>
|
<h2 class="title is-2">{{ .Title }}</h2>
|
||||||
<div class="markdown">
|
<div class="markdown">
|
||||||
{{.Content}}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
{{ if .Site.Params.localTime }}
|
{{ if .Site.Params.localTime }}
|
||||||
<p>{{ i18n "index_currentTime" . }} <span id='time'></span>.</p>
|
<p>{{ i18n "index_currentTime" . }} <span id='time'></span>.</p>
|
||||||
|
@ -83,6 +99,8 @@
|
||||||
<div class="container"><hr></div>
|
<div class="container"><hr></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<!-- End Contact section -->
|
<!-- End Contact section -->
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "footer/text.html" . }}
|
{{ partial "footer/text.html" . }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,8 +6,12 @@
|
||||||
|
|
||||||
{{ with .Resources.ByType "image" }}
|
{{ with .Resources.ByType "image" }}
|
||||||
{{ range first 5 (sort . "Params.weight") }}
|
{{ range first 5 (sort . "Params.weight") }}
|
||||||
<meta property="og:image" content="{{ .Permalink }}"/>
|
<meta property="og:image" content="{{ .RelPermalink }}"/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<meta property="og:image" content="{{ .Site.Params.avatar | absURL }}"/>
|
{{ with .Site.GetPage "page" "home" }}
|
||||||
|
{{ range first 5 (.Resources.ByType "image") }}
|
||||||
|
<meta property="og:image" content="{{ .RelPermalink }}"/>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue