forked from gurusabarish/hugo-profile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generic home page section generation
This change enables theme user to specify arbitrary order of sections, and add multiple sections of the same type (more generic approach than in gurusabarish#105, which is applicable only to experience blocks). - All sections are specified in config as a list, with order of items directly reflecting order on the main page (including navbar). - Type of a section is specified with a new `type` field. - If there are multiple sections of the same type, in order to distinguish them for navbar navigation, you need to specify unique `id` field. - Navbar and main page generation is more generic, allowing to add custom section types – the only requirement is a custom partial named after the section type. Styling can be provided in a custom CSS (enabled with `customCSS` site param). Signed-off-by: Marek Pikuła <[email protected]>
- Loading branch information
1 parent
5878751
commit e63f70c
Showing
14 changed files
with
509 additions
and
515 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
{{ if .Site.Params.about.enable | default false }} | ||
<section id="about" class="py-0 py-sm-5"> | ||
<section id="{{ .id | default .type }}" class="about py-0 py-sm-5"> | ||
<div class="container bg-transparent"> | ||
<h3 class="text-center bg-transparent">{{ .Site.Params.about.title }}</h3> | ||
<h3 class="text-center bg-transparent">{{ .title | default (strings.FirstUpper .type) }}</h3> | ||
<div class="bg-transparent row justify-content-center px-3 py-5"> | ||
{{ if .Site.Params.about.image }} | ||
<div class="col-sm-12 col-md-8 col-lg-4 mb-5 mb-sm-0 mb-md-5 mb-lg-0 d-none d-sm-none d-md-block"> | ||
<div class="image d-flex px-5"> | ||
<img src="{{ .Site.Params.about.image }}" class="img-thumbnail mx-auto rounded-circle" alt=""> | ||
{{ if .image }} | ||
<div class="col-sm-12 col-md-8 col-lg-4 mb-5 mb-sm-0 mb-md-5 mb-lg-0 d-none d-sm-none d-md-block"> | ||
<div class="image d-flex px-5"> | ||
<img src="{{ .image }}" class="img-thumbnail mx-auto rounded-circle" alt=""> | ||
</div> | ||
</div> | ||
</div> | ||
{{ end }} | ||
<div class="col-sm-12 col-md-12 col-lg-8 content"> | ||
{{ .Site.Params.about.content | markdownify }} | ||
{{ .content | markdownify }} | ||
|
||
{{ if .Site.Params.about.skills.enable }} | ||
{{ .Site.Params.about.skills.title }} | ||
<ul> | ||
{{ range .Site.Params.about.skills.items }} | ||
<li>{{ . | markdownify }}</li> | ||
{{ end }} | ||
</ul> | ||
{{ if .skills.enable }} | ||
{{ .skills.title }} | ||
<ul> | ||
{{ range .skills.items }} | ||
<li>{{ . | markdownify }}</li> | ||
{{ end }} | ||
</ul> | ||
{{ end }} | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.