mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 22:52:54 +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]
|
||||
introHeight = "large" # Input either 'medium' or 'large' or 'fullheight'
|
||||
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
|
||||
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
|
||||
dateForm = "Jan 2, 2006"
|
||||
faviconFile = "img/fav.ico"
|
||||
fadeIn = true # Turn on/off the fade-in effect
|
||||
showRSSButton = true # Show rss button in navigation
|
||||
customCSS = [] # Include custom css files e.g. ["css/foo.css", "css/bar.css"]
|
||||
|
@ -55,30 +54,27 @@ theme = "introduction"
|
|||
languageName = "English"
|
||||
languageCode = "en-us"
|
||||
contentDir = "content/en"
|
||||
weigth = 2
|
||||
weight = 0
|
||||
title = "Introduction"
|
||||
firstName = "Hi, I'm Introduction" # First name shows in introduction on main page
|
||||
tagLine = "I'm a theme for Hugo." # Appears after the introduction
|
||||
[languages.en.params]
|
||||
description = "Website Description" # Max 160 characters show in search results
|
||||
footerText = "" # Text to override default footer text (markdown allowed)
|
||||
[languages.es]
|
||||
languageName = "Español"
|
||||
languageCode = "es"
|
||||
contentDir = "content/es"
|
||||
weigth = 1
|
||||
weight = 1
|
||||
title = "Introducción"
|
||||
firstName = "Hola, Soy Introducción"
|
||||
tagLine = "Soy un tema para Hugo."
|
||||
[languages.es.params]
|
||||
description = "Descripcion del sitio web"
|
||||
footerText = ""
|
||||
[languages.de]
|
||||
languageName = "Deutsch"
|
||||
languageCode = "de"
|
||||
contentDir = "content/de"
|
||||
weigth = 0
|
||||
weight = 2
|
||||
title = "Vorstellung"
|
||||
firstName = "Hallo, ich bin Vorstellung"
|
||||
tagLine = "Ich bin ein Hugo Theme"
|
||||
[languages.de.params]
|
||||
description = "Beschreibung der Webseite"
|
||||
footerText = ""
|
||||
dateForm = "2. January 2006"
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
title: "Über mich"
|
||||
image: "profile.jpg"
|
||||
weight: 0
|
||||
---
|
||||
|
||||
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"
|
||||
image: "profile.jpg"
|
||||
weight: 0
|
||||
---
|
||||
|
||||
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"
|
||||
image: "profile.jpg"
|
||||
weight: 0
|
||||
---
|
||||
|
||||
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"
|
||||
[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!"
|
||||
[index_avatarAlt]
|
||||
other = "Mein Profil Bild"
|
||||
[index_projects_allProjects]
|
||||
other = "Alle Projekte"
|
||||
[index_blog_latestPosts]
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
other = "404"
|
||||
[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!"
|
||||
[index_avatarAlt]
|
||||
other = "My profile picture"
|
||||
[index_projects_allProjects]
|
||||
other = "All Projects"
|
||||
[index_blog_latestPosts]
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
other = "404"
|
||||
[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!"
|
||||
[index_avatarAlt]
|
||||
other = "Mi foto de perfil"
|
||||
[index_blog_latestPosts]
|
||||
other = "Últimas Entradas"
|
||||
[index_blog_allPosts]
|
||||
|
|
|
@ -8,17 +8,18 @@
|
|||
</head>
|
||||
<body>
|
||||
<div id="top">
|
||||
{{ with .Site.GetPage "page" "home" }}
|
||||
<div class="hero is-{{ .Site.Params.introHeight | default "fullheight" }}">
|
||||
<!-- Super sweet Hero body title -->
|
||||
<div class="hero-body">
|
||||
<div class="container has-text-centered">
|
||||
<!-- Title and tagline -->
|
||||
<h1 class="bold-title {{ if .Site.Params.fadeIn | default true }}fade-in one{{ end }}">
|
||||
{{ .Site.Params.firstName | default "Introduction" }}.
|
||||
{{ .Title }}
|
||||
</h1>
|
||||
<h3 class="subtitle is-3 {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
|
||||
{{ .Site.Params.tagLine }}
|
||||
</h3>
|
||||
<div class="subtitle is-3 {{ if .Site.Params.fadeIn | default true }}fade-in two{{ end }}">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<!-- End title and tagline -->
|
||||
<!-- Some social icons -->
|
||||
<div class=" {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
|
||||
|
@ -29,38 +30,53 @@
|
|||
</div>
|
||||
<!-- Hero body title end -->
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<!-- Done with Hero -->
|
||||
<!-- Everything below fades in three! -->
|
||||
<div class="section no-padding-top {{ if .Site.Params.fadeIn | default true }}fade-in three{{ end }}">
|
||||
<!-- Tell them all about it! -->
|
||||
{{ 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="container">
|
||||
<h2 class="title is-2 has-text-centered">{{ .Title }}</h2>
|
||||
<div class="columns"><!-- Avatar and about.md side by side except mobile -->
|
||||
{{ if .Site.Params.avatar }}
|
||||
{{ if .Params.Image }}
|
||||
<div class="columns">
|
||||
<div class="column is-one-third has-text-centered">
|
||||
<img class="img-responsive avatar" src="{{ .Site.Params.avatar | relURL }}" alt="{{ i18n "index_avatarAlt" . }}">
|
||||
</div>
|
||||
{{ with $home.Resources.GetMatch .Params.Image }}
|
||||
{{ with .Resize "320x" }}
|
||||
<img class="img-responsive avatar" src="{{ .RelPermalink }}" alt="{{ .Name }}">
|
||||
{{ end }}
|
||||
<div class="column markdown">
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="markdown column">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="markdown has-text-centered">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
<!-- End About container-->
|
||||
{{ partial "top-icon.html" . }}
|
||||
</div>
|
||||
<div class="container"><hr></div>
|
||||
<!-- End About section -->
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<!-- Now for some cool projects -->
|
||||
{{ partial "home/projects.html" . }}
|
||||
<!-- Let's show some blog posts -->
|
||||
{{ partial "home/blog.html" . }}
|
||||
<!-- Let's chat, shall we? -->
|
||||
{{ with .Site.GetPage "page" "contact" }}
|
||||
{{ with .Resources.GetMatch "contact.md" }}
|
||||
<div class="section" id="{{ .File.TranslationBaseName }}">
|
||||
<div class="container has-text-centered">
|
||||
<h2 class="title is-2">{{ .Title }}</h2>
|
||||
|
@ -83,6 +99,8 @@
|
|||
<div class="container"><hr></div>
|
||||
{{ end }}
|
||||
<!-- End Contact section -->
|
||||
{{ end }}
|
||||
|
||||
{{ partial "footer/text.html" . }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,8 +6,12 @@
|
|||
|
||||
{{ with .Resources.ByType "image" }}
|
||||
{{ range first 5 (sort . "Params.weight") }}
|
||||
<meta property="og:image" content="{{ .Permalink }}"/>
|
||||
<meta property="og:image" content="{{ .RelPermalink }}"/>
|
||||
{{ end }}
|
||||
{{ 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 }}
|
||||
|
|
Loading…
Reference in a new issue