mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-12-22 22:52:54 +00:00
Fix hero sizes (#137)
* Fix hero sizes - Use proper sections in index.html to comply with bulma styles - Update default value of header height to "fullheight" (shows navbar) * Revert unrelated changes
This commit is contained in:
parent
29bca079b0
commit
632bcd4579
5 changed files with 7447 additions and 92 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1 @@
|
|||
exampleSite/public
|
||||
exampleSite/public
|
|
@ -16,7 +16,7 @@ DefaultContentLanguage = "en" # Default language fo
|
|||
|
||||
# Configure the home page
|
||||
[params.home]
|
||||
introHeight = "large" # Input either "medium" or "large" or "fullheight"
|
||||
introHeight = "fullheight" # Input either "medium" or "large" or "fullheight"
|
||||
showLatest = true # Show latest blog post summary
|
||||
showAllPosts = false # Set true to list all posts on home page, or set false to link to separate blog list page
|
||||
numberOfProjectsToShow = 3 # Maximum number of projects to show on home page. Unset or comment out to show all projects
|
||||
|
|
7347
exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.content
generated
Normal file
7347
exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.content
generated
Normal file
File diff suppressed because it is too large
Load diff
1
exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.json
generated
Normal file
1
exampleSite/resources/_gen/assets/sass/sass/style.sass_7642ba43b3212fd7d7ba324df3b88b0c.json
generated
Normal file
|
@ -0,0 +1 @@
|
|||
{"Target":"css/main.css","MediaType":"text/css","Data":{}}
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
|
||||
<head>
|
||||
{{ partial "head/metadata.html" . }}
|
||||
{{ partial "head/openGraph.html" . }}
|
||||
|
@ -7,103 +8,108 @@
|
|||
{{ partial "head/css.html" . }}
|
||||
{{ partial "css/owlCarousel.html" . }}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<section id="top" class="section">
|
||||
{{ with .Site.GetPage "/home" }}
|
||||
<div class="hero is-{{ .Site.Params.home.introHeight | default "large" }}">
|
||||
<!-- Super sweet Hero body title -->
|
||||
<div class="hero-body">
|
||||
<div class="container has-text-centered">
|
||||
<!-- Title and tagline -->
|
||||
<h1 class="bold-title {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in one{{ end }}">
|
||||
{{ .Title }}
|
||||
</h1>
|
||||
<div class="subtitle is-3 {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in two{{ end }}">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<!-- End title and tagline -->
|
||||
<!-- Some social icons -->
|
||||
<div class="{{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in three{{ end }}">
|
||||
{{ partial "home/social.html" . }}
|
||||
</div>
|
||||
<!-- End top social icons -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Hero body title end -->
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with .Site.GetPage "/home" }}
|
||||
<section id="top" class="hero is-{{ .Site.Params.home.introHeight | default "fullheight" }}">
|
||||
<!-- Hero head section to play nice with Bulma -->
|
||||
<div class="hero-head"></div>
|
||||
|
||||
<!-- Done with Hero -->
|
||||
<div class="{{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in three{{ end }}">
|
||||
<!-- Tell them all about it! -->
|
||||
{{ partial "nav.html" . }}
|
||||
|
||||
{{ with .Site.GetPage "/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>
|
||||
{{ if .Params.Image }}
|
||||
<div class="columns">
|
||||
<div class="column is-one-third has-text-centered">
|
||||
{{ with $home.Resources.GetMatch .Params.Image }}
|
||||
{{ with .Resize "320x" }}
|
||||
<img class="img-responsive avatar" src="{{ .Permalink }}" alt="{{ .Name }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="markdown column">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class="markdown has-text-centered">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- Super sweet Hero body title -->
|
||||
<div class="hero-body">
|
||||
<div class="container has-text-centered">
|
||||
<!-- Title and tagline -->
|
||||
<h1 class="bold-title {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in one{{ end }}">
|
||||
{{ .Title }}
|
||||
</h1>
|
||||
<div class="subtitle is-3 {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in two{{ end }}">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
<!-- End About container-->
|
||||
{{ partial "top-icon.html" . }}
|
||||
</div>
|
||||
<div class="container"><hr></div>
|
||||
{{ 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 .Resources.GetMatch "contact.md" }}
|
||||
<div class="section" id="{{ .File.TranslationBaseName }}">
|
||||
<div class="container has-text-centered">
|
||||
<h2 class="title is-2">{{ .Title }}</h2>
|
||||
<div class="markdown">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ if .Site.Params.home.localTime }}
|
||||
<p>{{ i18n "index_currentTime" . }} <span id="time"></span>.</p>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.email }}
|
||||
<h3 class="subtitle is-3 has-text-centered top-pad">
|
||||
<a href="mailto:{{ . }}">{{ . }}</a>
|
||||
</h3>
|
||||
{{ end }}
|
||||
<!-- End title and tagline -->
|
||||
<!-- Some social icons -->
|
||||
<div class="{{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in three{{ end }}">
|
||||
{{ partial "home/social.html" . }}
|
||||
</div>
|
||||
<!-- End Contact container -->
|
||||
{{ partial "top-icon.html" . }}
|
||||
<!-- End top social icons -->
|
||||
</div>
|
||||
<div class="container"><hr></div>
|
||||
{{ end }}
|
||||
<!-- End Contact section -->
|
||||
{{ end }}
|
||||
</div> <!-- End of Hero body -->
|
||||
{{ end }}
|
||||
|
||||
{{ partial "footer/text.html" . }}
|
||||
<div class="hero-foot {{ if or (.Site.Params.fadeIn | default true) .Site.Params.fadeInIndex }}fade-in three{{ end }}">
|
||||
<!-- Tell them all about it! -->
|
||||
{{ partial "nav.html" . }}
|
||||
</div>
|
||||
</section>
|
||||
</section> <!-- Done with Hero -->
|
||||
|
||||
{{ with .Site.GetPage "/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>
|
||||
{{ if .Params.Image }}
|
||||
<div class="columns">
|
||||
<div class="column is-one-third has-text-centered">
|
||||
{{ with $home.Resources.GetMatch .Params.Image }}
|
||||
{{ with .Resize "320x" }}
|
||||
<img class="img-responsive avatar" src="{{ .Permalink }}" alt="{{ .Name }}">
|
||||
{{ end }}
|
||||
{{ 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 }}
|
||||
{{ 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 .Resources.GetMatch "contact.md" }}
|
||||
<div class="section" id="{{ .File.TranslationBaseName }}">
|
||||
<div class="container has-text-centered">
|
||||
<h2 class="title is-2">{{ .Title }}</h2>
|
||||
<div class="markdown">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ if .Site.Params.home.localTime }}
|
||||
<p>{{ i18n "index_currentTime" . }} <span id="time"></span>.</p>
|
||||
{{ end }}
|
||||
{{ with .Site.Params.email }}
|
||||
<h3 class="subtitle is-3 has-text-centered top-pad">
|
||||
<a href="mailto:{{ . }}">{{ . }}</a>
|
||||
</h3>
|
||||
{{ end }}
|
||||
{{ partial "home/social.html" . }}
|
||||
</div>
|
||||
<!-- End Contact container -->
|
||||
{{ partial "top-icon.html" . }}
|
||||
</div>
|
||||
<div class="container">
|
||||
<hr>
|
||||
</div>
|
||||
{{ end }}
|
||||
<!-- End Contact section -->
|
||||
{{ end }}
|
||||
|
||||
{{ partial "footer/text.html" . }}
|
||||
|
||||
<!-- End of fade in three section -->
|
||||
{{ partial "footer/scripts.html" . }}
|
||||
{{ partial "js/owlCarousel.html" . }}
|
||||
|
@ -117,4 +123,5 @@
|
|||
<script src="{{ $bundleMoment.Permalink }}" integrity="{{ $bundleMoment.Data.Integrity }}"></script>
|
||||
{{ end }}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
Loading…
Reference in a new issue