Merge pull request #2 from hossainemruz/master

update fork
This commit is contained in:
Richard Tirtadji 2020-10-25 23:03:06 +07:00 committed by GitHub
commit 85eea236ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 267 additions and 124 deletions

37
.github/ISSUE_TEMPLATE/bug.md vendored Normal file
View file

@ -0,0 +1,37 @@
---
name: Bug
about: File a bug report.
title: 'bug'
---
## Expected Behavior
<!--- Tell us what should happen -->
## Current Behavior
<!--- Tell us what happens instead of the expected behavior -->
## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.
4.
### Screenshots
<!--- Provide any screenshots or links to deployments -->
### Browsers Affected
<!-- Check all that apply -->
- [ ] Chrome
- [ ] Firefox
- [ ] Edge
- [ ] Safari 11
- [ ] Safari 10
- [ ] IE 11
## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

View file

@ -0,0 +1,30 @@
---
name: Feature Request
about: File a Feature Request.
title: 'Feature Request'
---
<!---
Before filing an issue, please review the following:
Existing Features: https://github.com/hossainemruz/toha#features
Project Roadmap: https://github.com/hossainemruz/toha#project-roadmap
-->
### Describe the solution you'd like
<!--
Provide a clear and concise description of what you want to happen.
-->
### Describe alternatives you've considered
<!--
Let us know about other solutions you've tried or researched.
-->
### Additional context
<!--
Is there anything else you can add about the proposal?
You might want to link to related issues here, if you haven't already.
-->

9
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View file

@ -0,0 +1,9 @@
---
name: Question
about: Ask a general question.
---
<!--- Use this template for general questions. For bug reports or feature requests, please use those templates -->
### Question
<!--- Insert your question here. Please provide as much detail as possible. -->

10
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -0,0 +1,10 @@
### Issue
<!--- Insert a link to the associated github issue here. -->
### Description
<!-- Insert details about what the changes being proposed are. -->
### Test Evidence
<!-- Provide screenshot evidence and/or testing steps to validate the proposed changes. -->

View file

@ -98,9 +98,9 @@ params:
# transparent navbar and the main logo will be used in the non-transparent navbar. # transparent navbar and the main logo will be used in the non-transparent navbar.
# It will be default to the theme logos if not provided. # It will be default to the theme logos if not provided.
logo: logo:
main: assets/images/main-logo.png main: /assets/images/main-logo.png
inverted: assets/images/inverted-logo.png inverted: /assets/images/inverted-logo.png
favicon: assets/images/favicon.png favicon: /assets/images/favicon.png
# GitHub repo URL of your site # GitHub repo URL of your site
gitRepo: https://github.com/hossainemruz/toha-example-site gitRepo: https://github.com/hossainemruz/toha-example-site
@ -233,17 +233,44 @@ Here, are the current plan and progress of various components of this theme. The
## Contributing ## Contributing
You can contribute to this theme in various way. You can report a bug, file an feature request, send a PR, share your thoughts etc. You can contribute to this theme in various ways. You can report a [bug](https://github.com/hossainemruz/toha/issues/new?template=bug.md), file an [feature request](https://github.com/hossainemruz/toha/issues/new?template=feature_request.md), send a PR, [share your thoughts](https://github.com/hossainemruz/toha/issues/new?template=question.md) etc.
Pull requests are most welcomed and I will be happy to review. Just follow the following principles: Pull requests are most welcome and I will be happy to review. Just follow the following principles:
- Keep it simple. - Keep it simple.
- Keep it consistent with the design. - Keep it consistent with the design.
- Use as little dependency as possible. - Use as few dependencies as possible.
- Have patient. - Have patience.
>I am not a web developer. I just created this theme for my personal needs. So, it is reasonable to have some flaws in the codes. Feel free to open issues and PR acknowledging the problems. >I am not a web developer. I just created this theme for my personal needs. So, it is reasonable to have some flaws in the codes. Feel free to open issues and PR acknowledging the problems.
## Local Development
For local development, you can run your own site or the [example site](https://github.com/hossainemruz/toha-example-site) locally and make changes in the theme submodule.
### Fork
Fork [this repo](https://github.com/hossainemruz/toha) and setup your local submodule with the following from the site's folder by running the following
```sh
git submodule update --init --recursive --remote
cd themes/toha
git remote add my-fork https://github.com/<your-github-user>/toha
git checkout -b my-feature-branch
```
From there you can make changes to the source code of the theme while testing with your running Hugo site.
### Open a PR
When the changes look good, commit and push them to your fork
```sh
git add .
git commit -m "A meaningful commit message"
git push my-fork my-feature-branch
```
And then open a PR `https://github.com/<your-github-user></your-github-user>/toha/pull/new/my-feature-branch`
## Attribution ## Attribution
- Thanks [Anup Deb](https://dribbble.com/anupdeb) for his design guidance. - Thanks [Anup Deb](https://dribbble.com/anupdeb) for his design guidance.

View file

@ -15,7 +15,7 @@ languages:
bn: bn:
languageName: বাংলা languageName: বাংলা
weight: 3 weight: 3
de: de:
languageName: Deutsch languageName: Deutsch
weight: 4 weight: 4
id: id:
@ -54,9 +54,9 @@ params:
# transparent navbar and the main logo will be used in the non-transparent navbar. # transparent navbar and the main logo will be used in the non-transparent navbar.
# It will be default to the theme logos if not provided. # It will be default to the theme logos if not provided.
logo: logo:
main: assets/images/main-logo.png main: /assets/images/main-logo.png
inverted: assets/images/inverted-logo.png inverted: /assets/images/inverted-logo.png
favicon: assets/images/favicon.png favicon: /assets/images/favicon.png
# GitHub repo URL of your site # GitHub repo URL of your site
gitRepo: https://github.com/hossainemruz/toha-example-site gitRepo: https://github.com/hossainemruz/toha-example-site

View file

@ -1,15 +1,15 @@
{{ define "header" }} {{ define "header" }}
<link rel="stylesheet" href="/assets/css/404.css"> <link rel="stylesheet" href="{{ "/assets/css/404.css" | relURL }}">
{{ end }} {{ end }}
{{ define "navbar" }} {{ define "navbar" }}
{{ partial "navigators/navbar-2.html" (dict "baseURL" .Site.BaseURL "title" .Site.Title "hasToggleButton" false) }} {{ partial "navigators/navbar-2.html" (dict "baseURL" site.BaseURL "title" site.Title "hasToggleButton" false) }}
{{ end }} {{ end }}
{{ define "content" }} {{ define "content" }}
<div class="container"> <div class="container">
<div class="notFound"> <div class="notFound">
<img src="/assets/images/404.png" alt=""> <img src="{{ "/assets/images/404.png" | relURL }}" alt="">
<div class="message"> <div class="message">
<h1>404</h1> <h1>404</h1>
<h4>The page you are looking for is not there yet.</h4> <h4>The page you are looking for is not there yet.</h4>

View file

@ -9,7 +9,7 @@
{{ block "header" . }} {{ end }} {{ block "header" . }} {{ end }}
<!-- ADD GOOGLE ANALYTICS IF ENABLED --> <!-- ADD GOOGLE ANALYTICS IF ENABLED -->
{{ if .Site.GoogleAnalytics }} {{ if site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{ end }} {{ end }}
</head> </head>

View file

@ -1,6 +1,6 @@
{{ define "header" }} {{ define "header" }}
<link rel="stylesheet" href="/assets/css/layouts/list.css"> <link rel="stylesheet" href="{{ "/assets/css/layouts/list.css" | relURL }}">
<link rel="stylesheet" href="/assets/css/navigators/sidebar.css"> <link rel="stylesheet" href="{{ "/assets/css/navigators/sidebar.css" | relURL}}">
{{ end }} {{ end }}
{{ define "navbar" }} {{ define "navbar" }}
@ -21,7 +21,7 @@
<ul class="tree" id="tree"> <ul class="tree" id="tree">
<li id="list-heading"><a href="{{ site.BaseURL | absLangURL }}/posts" data-filter="all">Posts</a></li> <li id="list-heading"><a href="{{ site.BaseURL | absLangURL }}/posts" data-filter="all">Posts</a></li>
<div class="subtree"> <div class="subtree">
{{ partial "navigators/sidebar.html" (dict "menus" .Site.Menus.sidebar "ctx" .) }} {{ partial "navigators/sidebar.html" (dict "menus" site.Menus.sidebar "ctx" .) }}
</div> </div>
</ul> </ul>
</div> </div>
@ -47,5 +47,5 @@
{{ end }} {{ end }}
{{ define "scripts" }} {{ define "scripts" }}
<script src="/assets/js/list.js"></script> <script src="{{ "/assets/js/list.js" | relURL }}"></script>
{{ end }} {{ end }}

View file

@ -4,8 +4,8 @@
rel="stylesheet" rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/atom-one-dark.min.css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/atom-one-dark.min.css"
/> />
<link rel="stylesheet" href="/assets/css/layouts/single.css" /> <link rel="stylesheet" href="{{ "/assets/css/layouts/single.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/navigators/sidebar.css"> <link rel="stylesheet" href="{{ "/assets/css/navigators/sidebar.css" | relURL }}">
{{ end }} {{ end }}
{{ define "navbar" }} {{ define "navbar" }}
@ -21,7 +21,7 @@
<ul class="tree" id="tree"> <ul class="tree" id="tree">
<li id="list-heading"><a href="{{ site.BaseURL | absLangURL }}posts" data-filter="all">Posts</a></li> <li id="list-heading"><a href="{{ site.BaseURL | absLangURL }}posts" data-filter="all">Posts</a></li>
<div class="subtree"> <div class="subtree">
{{ partial "navigators/sidebar.html" (dict "menus" .Site.Menus.sidebar "ctx" .) }} {{ partial "navigators/sidebar.html" (dict "menus" site.Menus.sidebar "ctx" .) }}
</div> </div>
</ul> </ul>
</div> </div>
@ -35,13 +35,13 @@
<div class="content"> <div class="content">
<div class="container p-0 read-area"> <div class="container p-0 read-area">
<!--Hero Area--> <!--Hero Area-->
<div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ strings.TrimSuffix "/" .Site.BaseURL }}{{ partial "helpers/get-hero.html" . }});'> <div class="hero-area col-sm-12" id="hero-area" style='background-image: url({{ strings.TrimSuffix "/" site.BaseURL }}{{ partial "helpers/get-hero.html" . | relURL }});'>
</div> </div>
<!--Content Start--> <!--Content Start-->
<div class="page-content"> <div class="page-content">
<div class="author-profile ml-auto align-self-lg-center"> <div class="author-profile ml-auto align-self-lg-center">
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}'/> <img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . | relURL }}'/>
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5> <h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
<p>{{ .Page.Date.Format "January 2, 2006" }}</p> <p>{{ .Page.Date.Format "January 2, 2006" }}</p>
</div> </div>
@ -55,9 +55,9 @@
</div> </div>
<!--- Improve this page button ---> <!--- Improve this page button --->
{{ if .Site.Params.GitRepo }} {{ if site.Params.GitRepo }}
<div class="btn-improve-page"> <div class="btn-improve-page">
<a href="{{ .Site.Params.GitRepo }}/edit/master/content/{{ .File.Path }}"> <a href="{{ site.Params.GitRepo }}/edit/master/content/{{ .File.Path }}">
<i class="fas fa-code-branch"></i> <i class="fas fa-code-branch"></i>
Improve This Page Improve This Page
</a> </a>
@ -69,7 +69,7 @@
{{ partial "navigators/next-prev-navigator.html" . }} {{ partial "navigators/next-prev-navigator.html" . }}
<hr /> <hr />
<!-- Add Disqus forum --> <!-- Add Disqus forum -->
{{ if .Site.DisqusShortname }} {{ if site.DisqusShortname }}
{{ partial "disqus.html" . }} {{ partial "disqus.html" . }}
{{ end }} {{ end }}
</div> </div>
@ -97,7 +97,7 @@
{{ define "scripts" }} {{ define "scripts" }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js"></script>
<script src="/assets/js/single.js"></script> <script src="{{ "/assets/js/single.js" | relURL }}"></script>
<script> <script>
hljs.initHighlightingOnLoad(); hljs.initHighlightingOnLoad();
</script> </script>

View file

@ -2,21 +2,29 @@
<html lang="en"> <html lang="en">
<head> <head>
<title>{{- .Site.Title -}}</title> <title>{{- .Site.Title -}}</title>
<meta name="description" content="{{ .Site.Params.description }}" /> {{ $siteDescription := .Site.Params.description }}
{{ if (index .Site.Data .Site.Language.Lang).site }}
{{ $siteConfig := (index .Site.Data .Site.Language.Lang).site }}
{{ if $siteConfig.description }}
{{ $siteDescription = $siteConfig.description }}
{{ end }}
{{ end }}
<meta name="description" content="{{ $siteDescription }}" />
<!-- import common headers --> <!-- import common headers -->
{{- partial "header.html" . -}} {{- partial "header.html" . -}}
<!-- import index page specific headers --> <!-- import index page specific headers -->
<link rel="stylesheet" href="/assets/css/sections/home.css" /> <link rel="stylesheet" href="{{ "/assets/css/sections/home.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/sections/about.css" /> <link rel="stylesheet" href="{{ "/assets/css/sections/about.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/sections/skills.css" /> <link rel="stylesheet" href="{{ "/assets/css/sections/skills.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/sections/experiences.css" /> <link rel="stylesheet" href="{{ "/assets/css/sections/experiences.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/sections/projects.css" /> <link rel="stylesheet" href="{{ "/assets/css/sections/projects.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/sections/recent-posts.css" /> <link rel="stylesheet" href="{{ "/assets/css/sections/recent-posts.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/sections/achievements.css" /> <link rel="stylesheet" href="{{ "/assets/css/sections/achievements.css" | relURL }}"/>
<!-- Add Google Analytics if enabled in configuration --> <!-- Add Google Analytics if enabled in configuration -->
{{ if .Site.GoogleAnalytics }} {{ if site.GoogleAnalytics }}
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{ end }} {{ end }}
</head> </head>
@ -29,9 +37,9 @@
{{- partial "sections/home.html" . -}} {{- partial "sections/home.html" . -}}
<!--- ADD OPTIONAL SECTIONS -----------> <!--- ADD OPTIONAL SECTIONS ----------->
{{ $sections:= .Site.Data.sections }} {{ $sections:= site.Data.sections }}
{{ if (index .Site.Data .Site.Language.Lang).sections }} {{ if (index site.Data site.Language.Lang).sections }}
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }} {{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }} {{ end }}
{{ if $sections }} {{ if $sections }}
@ -62,9 +70,9 @@
{{ partial "scripts.html" . }} {{ partial "scripts.html" . }}
<!--- ADD INDEX PAGE SPECIFIC SCRIPTS --> <!--- ADD INDEX PAGE SPECIFIC SCRIPTS -->
<script src="/assets/js/itype.min.js"></script> <script src="{{ "/assets/js/itype.min.js" | relURL }}"></script>
<script src="/assets/js/github-button.js"></script> <script src="{{ "/assets/js/github-button.js" | relURL }}"></script>
<script src="/assets/js/home.js"></script> <script src="{{ "/assets/js/home.js" | relURL }}"></script>
<script src="/assets/js/jquery.filterizr.min.js"></script> <script src="{{ "/assets/js/jquery.filterizr.min.js" | relURL }}"></script>
</body> </body>
</html> </html>

View file

@ -8,7 +8,7 @@
<div> <div>
<div class="d-flex"> <div class="d-flex">
{{ if .logo }} {{ if .logo }}
<img class="card-img-xs" src="{{ .logo | absURL }}" alt="{{ .name }}" /> <img class="card-img-xs" src="{{ .logo | relURL }}" alt="{{ .name }}" />
{{ end }} {{ end }}
<h5 class="card-title mb-0">{{ .name }}</h5> <h5 class="card-title mb-0">{{ .name }}</h5>
</div> </div>

View file

@ -3,7 +3,7 @@
<div class="card"> <div class="card">
<div class="card-head d-flex"> <div class="card-head d-flex">
{{ if .icon }} {{ if .icon }}
<img class="card-img-xs" src="{{ .icon | absURL }}" alt="{{ .name }}" /> <img class="card-img-xs" src="{{ .icon | relURL }}" alt="{{ .name }}" />
{{ end }} {{ end }}
<h5 class="card-title">{{ .name }}</h5> <h5 class="card-title">{{ .name }}</h5>
</div> </div>

View file

@ -8,7 +8,7 @@
var dsq = document.createElement("script"); var dsq = document.createElement("script");
dsq.type = "text/javascript"; dsq.type = "text/javascript";
dsq.async = true; dsq.async = true;
var disqus_shortname = "{{ .Site.DisqusShortname }}"; var disqus_shortname = "{{ site.DisqusShortname }}";
dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js"; dsq.src = "//" + disqus_shortname + ".disqus.com/embed.js";
( (
document.getElementsByTagName("head")[0] || document.getElementsByTagName("head")[0] ||

View file

@ -1,16 +1,16 @@
{{ $author:= .Site.Data.author }} {{ $author:= site.Data.author }}
{{ if (index .Site.Data .Site.Language.Lang).author }} {{ if (index site.Data site.Language.Lang).author }}
{{ $author = (index .Site.Data .Site.Language.Lang).author }} {{ $author = (index site.Data site.Language.Lang).author }}
{{ end }} {{ end }}
{{ $sections:= .Site.Data.sections }} {{ $sections:= site.Data.sections }}
{{ if (index .Site.Data .Site.Language.Lang).sections }} {{ if (index site.Data site.Language.Lang).sections }}
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }} {{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }} {{ end }}
{{ $copyrightNotice := "© 2020 Copyright."}} {{ $copyrightNotice := "© 2020 Copyright."}}
{{ if (index .Site.Data .Site.Language.Lang).site }} {{ if (index site.Data site.Language.Lang).site }}
{{ $siteConfig := (index .Site.Data .Site.Language.Lang).site }} {{ $siteConfig := (index site.Data site.Language.Lang).site }}
{{ if $siteConfig.copyright }} {{ if $siteConfig.copyright }}
{{ $copyrightNotice = $siteConfig.copyright }} {{ $copyrightNotice = $siteConfig.copyright }}
{{ end }} {{ end }}
@ -48,7 +48,7 @@
</ul> </ul>
</div> </div>
{{ end }} {{ end }}
{{ if .Site.Params.newsletter.enable }} {{ if site.Params.newsletter.enable }}
<div class="col-md-4 col-sm-12"> <div class="col-md-4 col-sm-12">
<!-- <h5>Newsletter</h5> --> <!-- <h5>Newsletter</h5> -->
<p>{{ i18n "newsletter_text" }}</p> <p>{{ i18n "newsletter_text" }}</p>
@ -76,7 +76,7 @@
<div class="row text-left"> <div class="row text-left">
<div class="col-md-4"> <div class="col-md-4">
<a id="theme" href="https://github.com/hossainemruz/toha" target="#"> <a id="theme" href="https://github.com/hossainemruz/toha" target="#">
<img src="/assets/images/inverted-logo.png"> <img src="{{ "/assets/images/inverted-logo.png" | relURL }}">
Toha Toha
</a> </a>
</div> </div>
@ -84,7 +84,7 @@
<div class="col-md-4 text-right"> <div class="col-md-4 text-right">
<a id="hugo" href="https://gohugo.io/">{{ i18n "hugoAttributionText" }} <a id="hugo" href="https://gohugo.io/">{{ i18n "hugoAttributionText" }}
<img <img
src="/assets/images/hugo-logo-wide.svg" src="{{ "/assets/images/hugo-logo-wide.svg" | relURL }}"
alt="Hugo Logo" alt="Hugo Logo"
height="18" height="18"
/> />

View file

@ -3,17 +3,17 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" />
<!-- ============ import common css ========== --> <!-- ============ import common css ========== -->
<link rel="stylesheet" href="/assets/css/bootstrap.min.css" /> <link rel="stylesheet" href="{{ "/assets/css/bootstrap.min.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/layouts/main.css" /> <link rel="stylesheet" href="{{ "/assets/css/layouts/main.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/style.css" /> <link rel="stylesheet" href="{{ "/assets/css/style.css" | relURL }}"/>
<link rel="stylesheet" href="/assets/css/navigators/navbar.css" /> <link rel="stylesheet" href="{{ "/assets/css/navigators/navbar.css" | relURL }}"/>
<!--=================== cdn ==============================--> <!--=================== cdn ==============================-->
<link href="https://fonts.googleapis.com/css2?family=Muli:wght@300;400;500;600" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Muli:wght@300;400;500;600" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" />
<!--================= fab-icon =========================--> <!--================= fab-icon =========================-->
<link rel="icon" type="image/png" href="{{ .Site.Params.logo.favicon | default "/assets/images/favicon.png" | absURL }}" /> <link rel="icon" type="image/png" href="{{ site.Params.logo.favicon | default "/assets/images/favicon.png" | relURL }}" />
<!--================= custom style overrides =========================--> <!--================= custom style overrides =========================-->
<link rel="stylesheet" href="/assets/css/style.css" /> <link rel="stylesheet" href="{{ "/assets/css/style.css" | relURL }}"/>

View file

@ -1,7 +1,12 @@
{{ $authorImage:= "/assets/images/default-avatar.png"}} {{ $author:= site.Data.author }}
{{ if .Site.Data.site.author}} {{ if (index site.Data site.Language.Lang).author }}
{{ $authorImage = .Site.Data.site.author.image | relURL }} {{ $author = (index site.Data site.Language.Lang).author }}
{{ end}} {{ end }}
{{ $authorImage:= "/assets/images/default-avatar.png" }}
{{ if $author.image }}
{{ $authorImage = $author.image }}
{{ end }}
{{ if eq (printf "%T" .Params.author ) "maps.Params" }} {{ if eq (printf "%T" .Params.author ) "maps.Params" }}
{{ with .Params.author }} {{ with .Params.author }}
{{ if .image }} {{ if .image }}

View file

@ -1,6 +1,6 @@
{{ $authorName:= .Site.Params.author.name }} {{ $authorName:= site.Params.author.name }}
{{ if .Site.Data.site.author}} {{ if site.Data.site.author}}
{{ $authorName = .Site.Data.site.author.name }} {{ $authorName = site.Data.site.author.name }}
{{ end}} {{ end}}
{{ if eq (printf "%T" .Params.author ) "maps.Params" }} {{ if eq (printf "%T" .Params.author ) "maps.Params" }}
{{ with .Params.author }} {{ with .Params.author }}

View file

@ -1,12 +1,12 @@
{{ $pageURL:= .RelPermalink }} {{ $pageURL:= .RelPermalink }}
{{ if .Site.IsMultiLingual }} {{ if site.IsMultiLingual }}
{{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }} {{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }}
{{ end }} {{ end }}
<div class="dropdown languageSelector"> <div class="dropdown languageSelector">
<a class="btn dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="btn dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png"> <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png">
{{ .Site.Language.LanguageName }} {{ site.Language.LanguageName }}
</a> </a>
<div class="dropdown-menu" aria-labelledby="languageSelector"> <div class="dropdown-menu" aria-labelledby="languageSelector">
{{ range .Translations }} {{ range .Translations }}

View file

@ -1,12 +1,12 @@
{{ $pageURL:= .RelPermalink }} {{ $pageURL:= .RelPermalink }}
{{ if .Site.IsMultiLingual }} {{ if site.IsMultiLingual }}
{{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }} {{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }}
{{ end }} {{ end }}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png"> <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png">
{{ .Site.Language.LanguageName }} {{ site.Language.LanguageName }}
</a> </a>
<div class="dropdown-menu" aria-labelledby="languageSelector"> <div class="dropdown-menu" aria-labelledby="languageSelector">
{{ range .Translations }} {{ range .Translations }}

View file

@ -1,10 +1,10 @@
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png"> <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/16.png">
{{ .Site.Language.LanguageName }} {{ site.Language.LanguageName }}
</a> </a>
<div class="dropdown-menu" aria-labelledby="languageSelector"> <div class="dropdown-menu" aria-labelledby="languageSelector">
{{ range $.Site.Home.AllTranslations }} {{ range site.Home.AllTranslations }}
<a class="dropdown-item nav-link languages-item" href="{{ .Permalink }}"> <a class="dropdown-item nav-link languages-item" href="{{ .Permalink }}">
<img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/24.png"> <img class="flag" src="https://www.countryflags.io/{{ partial "helpers/country-code.html" .Language }}/flat/24.png">
{{ .Language.LanguageName }} {{ .Language.LanguageName }}

View file

@ -1,5 +1,5 @@
{{ $mainLogo:="assets/images/main-logo.png" }} {{ $mainLogo:="/assets/images/main-logo.png" }}
{{ $invertedLogo:="assets/images/inverted-logo.png" }} {{ $invertedLogo:="/assets/images/inverted-logo.png" }}
{{ if site.Params.logo.main }} {{ if site.Params.logo.main }}
{{ $mainLogo = site.Params.logo.main }} {{ $mainLogo = site.Params.logo.main }}
{{ end }} {{ end }}
@ -13,7 +13,7 @@
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}"> <a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
<img src="{{ $mainLogo | absURL }}"> <img src="{{ $mainLogo | relURL }}">
{{- site.Title -}} {{- site.Title -}}
</a> </a>
<button class="navbar-toggler navbar-light" id="toc-toggler" type="button" onclick="toggleTOC()"> <button class="navbar-toggler navbar-light" id="toc-toggler" type="button" onclick="toggleTOC()">
@ -29,6 +29,6 @@
</div> </div>
</div> </div>
<!-- Store the logo information in a hidden img for the JS --> <!-- Store the logo information in a hidden img for the JS -->
<img src="{{ $mainLogo | absURL }}" class="d-none" id="main-logo"> <img src="{{ $mainLogo | relURL }}" class="d-none" id="main-logo">
<img src="{{ $invertedLogo | absURL }}" class="d-none" id="inverted-logo"> <img src="{{ $invertedLogo | relURL }}" class="d-none" id="inverted-logo">
</nav> </nav>

View file

@ -1,22 +1,22 @@
{{ $mainLogo:="assets/images/main-logo.png" }} {{ $mainLogo:="/assets/images/main-logo.png" }}
{{ $invertedLogo:="assets/images/inverted-logo.png" }} {{ $invertedLogo:="/assets/images/inverted-logo.png" }}
{{ if .Site.Params.logo.main }} {{ if site.Params.logo.main }}
{{ $mainLogo = .Site.Params.logo.main }} {{ $mainLogo = site.Params.logo.main }}
{{ end }} {{ end }}
{{ if .Site.Params.logo.inverted }} {{ if site.Params.logo.inverted }}
{{ $invertedLogo = .Site.Params.logo.inverted }} {{ $invertedLogo = site.Params.logo.inverted }}
{{ end }} {{ end }}
{{ $sections:= .Site.Data.sections }} {{ $sections:= site.Data.sections }}
{{ if (index .Site.Data .Site.Language.Lang).sections }} {{ if (index site.Data site.Language.Lang).sections }}
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }} {{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }} {{ end }}
<nav class="navbar navbar-expand-xl top-navbar initial-navbar" id="top-navbar"> <nav class="navbar navbar-expand-xl top-navbar initial-navbar" id="top-navbar">
<div class="container"> <div class="container">
<a class="navbar-brand" href="{{ .Site.BaseURL | relLangURL }}"> <a class="navbar-brand" href="{{ site.BaseURL | relLangURL }}">
<img src="{{ $invertedLogo | absURL }}" id="logo"> <img src="{{ $invertedLogo | relURL }}" id="logo">
{{- .Site.Title -}} {{- site.Title -}}
</a> </a>
<button <button
class="navbar-toggler navbar-dark" class="navbar-toggler navbar-dark"
@ -31,7 +31,16 @@
<div class="collapse navbar-collapse" id="top-nav-items"> <div class="collapse navbar-collapse" id="top-nav-items">
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#home">{{ i18n "home" }}</a> <a
class="nav-link"
href="#home"
data-toggle="collapse"
data-target=".navbar-collapse"
aria-controls="collapseExample"
role="button"
>
{{ i18n "home" }}
</a>
</li> </li>
{{ if $sections }} {{ if $sections }}
{{ range sort $sections "section.weight" }} {{ range sort $sections "section.weight" }}
@ -41,7 +50,15 @@
{{ $sectionID = .section.id }} {{ $sectionID = .section.id }}
{{ end }} {{ end }}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#{{ $sectionID }}">{{ .section.name }}</a> <a
class="nav-link"
href="#{{ $sectionID }}"
data-toggle="collapse"
data-target=".navbar-collapse"
aria-controls="collapseExample"
>
{{ .section.name }}
</a>
</li> </li>
{{ end }} {{ end }}
{{- end }} {{- end }}
@ -60,7 +77,7 @@
<a class="nav-link" id="blog-link" href="{{ "/posts" | relLangURL }}">{{ i18n "posts" }}</a> <a class="nav-link" id="blog-link" href="{{ "/posts" | relLangURL }}">{{ i18n "posts" }}</a>
</li> </li>
{{ end }} {{ end }}
{{ range (index .Site.Data .Site.Language.Lang).site.customMenus }} {{ range (index site.Data site.Language.Lang).site.customMenus }}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ .url }}">{{ .name }}</a> <a class="nav-link" href="{{ .url }}">{{ .name }}</a>
</li> </li>
@ -72,6 +89,6 @@
</div> </div>
</div> </div>
<!-- Store the logo information in a hidden img for the JS --> <!-- Store the logo information in a hidden img for the JS -->
<img src="{{ $mainLogo | absURL }}" class="d-none" id="main-logo"> <img src="{{ $mainLogo | relURL }}" class="d-none" id="main-logo">
<img src="{{ $invertedLogo | absURL }}" class="d-none" id="inverted-logo"> <img src="{{ $invertedLogo | relURL }}" class="d-none" id="inverted-logo">
</nav> </nav>

View file

@ -1,6 +1,6 @@
<script src="/assets/js/jquery-3.4.1.min.js"></script> <script src="{{ "/assets/js/jquery-3.4.1.min.js" | relURL }}"></script>
<script src="/assets/js/popper.min.js"></script> <script src="{{ "/assets/js/popper.min.js" | relURL }}"></script>
<script src="/assets/js/bootstrap.min.js"></script> <script src="{{ "/assets/js/bootstrap.min.js" | relURL }}"></script>
<script src="/assets/js/navbar.js"></script> <script src="{{ "/assets/js/navbar.js" | relURL }}"></script>
<script src="/assets/js/main.js"></script> <script src="{{ "/assets/js/main.js" | relURL }}"></script>

View file

@ -38,7 +38,7 @@
</ul> </ul>
</div> </div>
{{ if .resume }} {{ if .resume }}
<a href="{{ .resume | absURL }}" target="#" <a href="{{ .resume | relURL }}" target="#"
><button class="btn btn-dark">{{ i18n "resume"}}</button></a ><button class="btn btn-dark">{{ i18n "resume"}}</button></a
> >
{{ end }} {{ end }}

View file

@ -1,6 +1,6 @@
<div <div
class="achievement-entry text-center" class="achievement-entry text-center"
style="background-image: url({{ .image | absURL }});" style="background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ .image | relURL }}');"
> >
<i class="fas fa-search-plus" id="enlarge-icon"></i> <i class="fas fa-search-plus" id="enlarge-icon"></i>
<h4 class="title" id="achievement-title">{{ .title }}</h4> <h4 class="title" id="achievement-title">{{ .title }}</h4>

View file

@ -1,6 +1,6 @@
{{ $author:= .Site.Data.author }} {{ $author:= site.Data.author }}
{{ if (index .Site.Data .Site.Language.Lang).author }} {{ if (index site.Data site.Language.Lang).author }}
{{ $author = (index .Site.Data .Site.Language.Lang).author }} {{ $author = (index site.Data site.Language.Lang).author }}
{{ end }} {{ end }}
{{ $name:="Jane Doe" }} {{ $name:="Jane Doe" }}
@ -10,17 +10,17 @@
{{ $name = $author.name }} {{ $name = $author.name }}
{{ end }} {{ end }}
{{ $sections:= .Site.Data.sections }} {{ $sections:= site.Data.sections }}
{{ if (index .Site.Data .Site.Language.Lang).sections }} {{ if (index site.Data site.Language.Lang).sections }}
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }} {{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }} {{ end }}
{{ $backgroundImage:= "assets/images/default-background.jpg" }} {{ $backgroundImage:= "/assets/images/default-background.jpg" }}
{{ if .Site.Params.background }} {{ if site.Params.background }}
{{ $backgroundImage = .Site.Params.background }} {{ $backgroundImage = site.Params.background }}
{{ end }} {{ end }}
{{ $authorImage:= "assets/images/default-avatar.png" }} {{ $authorImage:= "/assets/images/default-avatar.png" }}
{{ if $author.image }} {{ if $author.image }}
{{ $authorImage = $author.image }} {{ $authorImage = $author.image }}
{{ end }} {{ end }}
@ -28,10 +28,10 @@
<div class="container-fluid home" id="home"> <div class="container-fluid home" id="home">
<div <div
class="background container-fluid" class="background container-fluid"
style="background-image: url('{{ $backgroundImage | absURL }}');" style="background-image: url('{{ strings.TrimSuffix "/" site.BaseURL }}{{ $backgroundImage | relURL }}');"
></div> ></div>
<div class="container content text-center"> <div class="container content text-center">
<img src="{{ $authorImage | absURL }}" <img src="{{ $authorImage | relURL }}"
class="rounded-circle mx-auto d-block img-fluid" class="rounded-circle mx-auto d-block img-fluid"
/> />
<h1 class="greeting"> {{ $author.greeting }} {{ $name }}</h1> <h1 class="greeting"> {{ $author.greeting }} {{ $name }}</h1>

12
package-lock.json generated
View file

@ -149,9 +149,9 @@
"dev": true "dev": true
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001150", "version": "1.0.30001151",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001150.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001151.tgz",
"integrity": "sha512-kiNKvihW0m36UhAFnl7bOAv0i1K1f6wpfVtTF5O5O82XzgtBnb05V0XeV3oZ968vfg2sRNChsHw8ASH2hDfoYQ==", "integrity": "sha512-Zh3sHqskX6mHNrqUerh+fkf0N72cMxrmflzje/JyVImfpknscMnkeJrlFGJcqTmaa0iszdYptGpWMJCRQDkBVw==",
"dev": true "dev": true
}, },
"chalk": { "chalk": {
@ -258,9 +258,9 @@
} }
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.582", "version": "1.3.583",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.582.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.583.tgz",
"integrity": "sha512-0nCJ7cSqnkMC+kUuPs0YgklFHraWGl/xHqtZWWtOeVtyi+YqkoAOMGuZQad43DscXCQI/yizcTa3u6B5r+BLww==", "integrity": "sha512-L9BwLwJohjZW9mQESI79HRzhicPk1DFgM+8hOCfGgGCFEcA3Otpv7QK6SGtYoZvfQfE3wKLh0Hd5ptqUFv3gvQ==",
"dev": true "dev": true
}, },
"emoji-regex": { "emoji-regex": {