Fix URL issues

This commit is contained in:
Emruz Hossain 2020-09-03 19:02:52 +06:00
parent bfaf57a083
commit faa91755f9
16 changed files with 96 additions and 72 deletions

View file

@ -12,7 +12,7 @@ languages:
fr:
languageName: Français
weight: 2
# Force a locale to be use, really usefull to develop the application ! Should be commented in production, the "weight" should rocks.
# Force a locale to be use, really useful to develop the application ! Should be commented in production, the "weight" should rocks.
#DefaultContentLanguage: fr
# Allow raw html in markdown file
@ -33,8 +33,8 @@ disqusShortname: does-not-exist
# Enable global emoji support
enableEmoji: true
# Custom parameters
# Custom parameters
params:
# Copyright Notice
copyright: © 2020 Copyright.
@ -49,9 +49,9 @@ params:
# 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.
logo:
main: /assets/images/main-logo.png
inverted: /assets/images/inverted-logo.png
favicon: /assets/images/favicon.png
main: assets/images/main-logo.png
inverted: assets/images/inverted-logo.png
favicon: assets/images/favicon.png
# GitHub repo URL of your site
gitRepo: https://github.com/hossainemruz/toha-example-site

View file

@ -13,4 +13,4 @@ summary:
- I am a Devops
- I love servers
- I work on open-source projects
- I love to work with some fun projects"
- I love to work with some fun projects

View file

@ -14,7 +14,7 @@ company:
url: "https://www.example.com"
# your resume. this file path should be relative to you "static" directory
resume: "/files/resume.pdf"
resume: "files/resume.pdf"
# a summary about you
summary: "Je suis un ingénieur en logiciel passionné, avec x années d'expérience professionnelle. J'ai construit des outils OSS pour [Kubernetes](https://kubernetes.io/) en utilisant GO. Mes outils aident les gens à déployer leurs charges de travail dans Kubernetes. Parfois, je travaille sur des projets amusants comme l'écriture d'un thème, etc."

View file

@ -11,14 +11,14 @@ section:
# Your achievements achievements
achievements:
- title: Meilleur présentateur
image: /images/achievements/presenter.jpg
image: images/achievements/presenter.jpg
summary: Meilleur présentateur de la conférence XYZ 2020.
- title: Champion
image: /images/achievements/sport.jpg
image: images/achievements/sport.jpg
summary: Champion du championnat cycliste interurbain 2020.
- title: Remise des diplômes
image: /images/achievements/graduation-cap.jpg
image: images/achievements/graduation-cap.jpg
summary: J'ai obtenu une licence en sciences (B.Sc.) en informatique et en ingénierie à l'université XYZ.
- title: Lauréat du prix
image: /images/achievements/woman-winner.jpg
image: images/achievements/woman-winner.jpg
summary: Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus architecto minus facere vero?

View file

@ -12,38 +12,38 @@ section:
# Give a summary of you each skill in the summary section.
skills:
- name: Kubernetes
icon: "/images/skills/kubernetes.png"
icon: "images/skills/kubernetes.png"
summary: "Capable de déployer, de gérer l'application sur Kubernetes. Expérimenté dans la rédaction de contrôleurs Kubernetes pour les CRD."
url: "https://kubernetes.io/"
- name: Go
icon: "/images/skills/go.png"
icon: "images/skills/go.png"
summary: "Utiliser comme langue principale pour le développement professionnel. Capable d'écrire des programmes évolutifs, testables et maintenables."
url: "https://golang.org/"
- name: Cloud Computing
icon: "/images/skills/cloud.png"
icon: "images/skills/cloud.png"
summary: "A travaillé avec la plupart des principaux nuages tels que GCP, AWS, Azure, etc."
- name: Docker
icon: "/images/skills/docker.svg"
icon: "images/skills/docker.svg"
summary: "Inscrivez la plupart des programmes en tant que conteneur déchargé. Expérimenté dans le processus de construction en plusieurs étapes et en plusieurs arcs."
url: "https://www.docker.com/"
- name: Prometheus
icon: "/images/skills/prometheus.png"
icon: "images/skills/prometheus.png"
summary: "Capable d'installation, de configurer les métriques de Prometheus. Expérimenté avec PromQL, AlertManager. Expérimenté également dans la rédaction d'exportateurs de métriques."
url: "https://prometheus.io/"
- name: Linux
icon: "/images/skills/linux.png"
icon: "images/skills/linux.png"
summary: "Utilisé comme système d'exploitation principal. Capable d'écrire des scripts bash/shell."
- name: Git
icon: "/images/skills/git.png"
icon: "images/skills/git.png"
summary: "Expérimenté dans le développement basé sur les GIT. Surtout, utilisez Github. Avoir également une expérience de travail avec GitLab."
url: "https://git-scm.com/"
- name: C++
icon: "/images/skills/c++.png"
icon: "images/skills/c++.png"
summary: "Connaître les bases de la programmation C/C++. Utilisé pour la programmation de concours et la résolution de problèmes."

View file

@ -8,13 +8,18 @@
{{ end }}
{{ define "sidebar" }}
{{ $blogHome:="#" }}
{{ if site.IsMultiLingual }}
{{ $blogHome = (path.Join (cond ( eq .Language.Lang "en") "" .Language.Lang) "post") }}
{{ end }}
<section class="sidebar-section" id="sidebar-section">
<div class="sidebar-holder">
<div class="sidebar" id="sidebar">
<input type="text" value="" placeholder="Search" data-search="" id="search-box" />
<div class="sidebar-tree">
<ul class="tree" id="tree">
<li id="list-heading"><a href="/posts" data-filter="all">Posts</a></li>
<li id="list-heading"><a href="#" data-filter="all">Posts</a></li>
<div class="subtree">
{{ partial "navigators/sidebar.html" (dict "menus" .Site.Menus.sidebar "ctx" .) }}
</div>

View file

@ -19,7 +19,7 @@
<input type="text" value="" placeholder="Search" data-search="" id="search-box" />
<div class="sidebar-tree">
<ul class="tree" id="tree">
<li id="list-heading"><a href="/posts" data-filter="all">Posts</a></li>
<li id="list-heading"><a href="{{ site.BaseURL | absLangURL }}post" data-filter="all">Posts</a></li>
<div class="subtree">
{{ partial "navigators/sidebar.html" (dict "menus" .Site.Menus.sidebar "ctx" .) }}
</div>

View file

@ -1,5 +1,5 @@
<div class="post-card">
<a href="{{ .RelPermalink }}" class="post-card-link">
<a href="{{ .RelPermalink | relLangURL }}" class="post-card-link">
<div class="card">
<div class="card-head">
<img class="card-img-top" src='{{ partial "helpers/get-hero.html" . }}'/>
@ -11,7 +11,7 @@
<div class="card-footer">
<span class="float-left">{{ .Date.Format "January 2, 2006" }}</span>
<a
href="{{ .RelPermalink }}"
href="{{ .RelPermalink | relLangURL }}"
class="float-right btn btn-outline-info btn-sm"
>Read</a
>

View file

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

View file

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

View file

@ -1,18 +1,24 @@
{{ $mainLogo:="assets/images/main-logo.png" }}
{{ $invertedLogo:="assets/images/inverted-logo.png" }}
{{ if .Site.Params.logo.main }}
{{ $mainLogo = .Site.Params.logo.main }}
{{ end }}
{{ if .Site.Params.logo.inverted }}
{{ $invertedLogo = .Site.Params.logo.inverted }}
{{ end }}
{{ $pageURL:= .RelPermalink }}
{{ if .Site.IsMultiLingual }}
{{ $pageURL = strings.TrimPrefix (path.Join "/" .Language.Lang) $pageURL }}
{{ end }}
<nav class="navbar navbar-expand-xl top-navbar final-navbar shadow">
<div class="container">
{{ $mainLogo:="/assets/images/main-logo.png" }}
{{ $invertedLogo:="/assets/images/inverted-logo.png" }}
{{ if .Site.Params.logo.main }}
{{ $mainLogo = .Site.Params.logo.main }}
{{ end }}
{{ if .Site.Params.logo.inverted }}
{{ $invertedLogo = .Site.Params.logo.inverted }}
{{ end }}
<button class="navbar-toggler navbar-light" id="sidebar-toggler" type="button" onclick="toggleSidebar()">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="{{ site.BaseURL }}">
<img src="{{ $mainLogo }}">
<a class="navbar-brand" href="{{ site.BaseURL | absLangURL }}">
<img src="{{ $mainLogo | absURL }}">
{{- site.Title -}}
</a>
<button class="navbar-toggler navbar-light" id="toc-toggler" type="button" onclick="toggleTOC()">
@ -21,10 +27,26 @@
<div class="collapse navbar-collapse" id="top-nav-items">
<ul class="navbar-nav ml-auto">
{{ if .IsTranslated }}
<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">
<img class="flag" src="https://www.countryflags.io/{{ cond (eq .Site.Language.Lang "en") "gb" .Language }}/flat/16.png">
{{- .Site.Language.LanguageName -}}
</a>
<div class="dropdown-menu" aria-labelledby="languageSelector">
{{ range $.Site.Home.AllTranslations }}
<a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}">
<img class="flag" src="https://www.countryflags.io/{{ cond (eq .Site.Language.Lang "en") "gb" .Language }}/flat/24.png">
{{- .Language.LanguageName -}}
</a>
{{ end }}
</div>
</li>
{{ end }}
</ul>
</div>
</div>
<!-- Store the logo information in a hidden img for the JS -->
<img src="{{ $mainLogo }}" class="d-none" id="main-logo">
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo">
<img src="{{ $mainLogo | absURL }}" class="d-none" id="main-logo">
<img src="{{ $invertedLogo | absURL }}" class="d-none" id="inverted-logo">
</nav>

View file

@ -1,3 +1,12 @@
{{ $mainLogo:="assets/images/main-logo.png" }}
{{ $invertedLogo:="assets/images/inverted-logo.png" }}
{{ if .Site.Params.logo.main }}
{{ $mainLogo = .Site.Params.logo.main }}
{{ end }}
{{ if .Site.Params.logo.inverted }}
{{ $invertedLogo = .Site.Params.logo.inverted }}
{{ end }}
{{ $sections:= .Site.Data.sections }}
{{ if (index .Site.Data .Site.Language.Lang).sections }}
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }}
@ -5,16 +14,8 @@
<nav class="navbar navbar-expand-xl top-navbar initial-navbar" id="top-navbar">
<div class="container">
{{ $mainLogo:="/assets/images/main-logo.png" }}
{{ $invertedLogo:="/assets/images/inverted-logo.png" }}
{{ if .Site.Params.logo.main }}
{{ $mainLogo = .Site.Params.logo.main }}
{{ end }}
{{ if .Site.Params.logo.inverted }}
{{ $invertedLogo = .Site.Params.logo.inverted }}
{{ end }}
<a class="navbar-brand" href="{{ .Site.BaseURL }}{{ if .IsTranslated }}/{{ .Site.Language.Lang }}{{end}}">
<img src="{{ $invertedLogo }}" id="logo">
<a class="navbar-brand" href="{{ .Site.BaseURL | absLangURL }}">
<img src="{{ $invertedLogo | absURL }}" id="logo">
{{- .Site.Title -}}
</a>
<button
@ -62,11 +63,11 @@
{{ end }}
{{ if .IsTranslated }}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" 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/{{ cond (eq .Site.Language.Lang "en") "gb" .Language }}/flat/16.png">
{{ .Site.Language.LanguageName }}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<div class="dropdown-menu" aria-labelledby="languageSelector">
{{ range $.Site.Home.AllTranslations }}
<a class="dropdown-item nav-link languages-item" href="{{ .Permalink }}">
<img class="flag" src="https://www.countryflags.io/{{ cond (eq .Site.Language.Lang "en") "gb" .Language }}/flat/24.png">
@ -80,6 +81,6 @@
</div>
</div>
<!-- Store the logo information in a hidden img for the JS -->
<img src="{{ $mainLogo }}" class="d-none" id="main-logo">
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo">
<img src="{{ $mainLogo | absURL }}" class="d-none" id="main-logo">
<img src="{{ $invertedLogo | absURL }}" class="d-none" id="inverted-logo">
</nav>

View file

@ -9,7 +9,7 @@
{{ if .HasChildren }}
<!-- Add current entry -->
<li>
<i class="fas {{ $icon }}"></i><a class="{{$class}}" href="{{.URL}}">{{.Name}}</a>
<i class="fas {{ $icon }}"></i><a class="{{$class}}" href="{{ .URL }}">{{.Name}}</a>
<!-- Add sub-tree -->
<ul class="{{ $class }}">
{{ partial "navigators/sidebar.html" (dict "menus" .Children "ctx" $.ctx) }}
@ -17,6 +17,6 @@
</li>
{{ else }}
<!-- No sub-tree. So, only add current entry -->
<li><a class="{{$class}}" href="{{.URL}}">{{.Name}}</a></li>
<li><a class="{{$class}}" href="{{ .URL }}">{{.Name}}</a></li>
{{ end }}
{{ end }}

View file

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

View file

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

View file

@ -1,4 +1,3 @@
<<<<<<< HEAD
{{ $greeting:="Hi! I am" }}
{{ if .Site.Params.author.greeting }}
{{ $greeting = .Site.Params.author.greeting }}
@ -9,7 +8,7 @@
{{ else if .Site.Params.author.name }}
{{ $name = .Site.Params.author.name }}
{{ end }}
=======
{{ $author:= .Site.Data.author }}
{{ if (index .Site.Data .Site.Language.Lang).author }}
{{ $author = (index .Site.Data .Site.Language.Lang).author }}
@ -20,29 +19,26 @@
{{ $sections = (index .Site.Data .Site.Language.Lang).sections }}
{{ end }}
>>>>>>> Refactor translation codes
{{ $backgroundImage:= "assets/images/default-background.jpg" }}
{{ if .Site.Params.background }}
{{ $backgroundImage = .Site.Params.background }}
{{ end }}
{{ $authorImage:= "assets/images/default-avatar.png" }}
{{ if $author.image }}
{{ $authorImage = $author.image }}
{{ end }}
<div class="container-fluid home" id="home">
<div
class="background container-fluid"
style="background-image: url('{{ if .Site.Params.background }}{{ .Site.Params.background }}{{ else }}/assets/images/default-background.jpg{{ end }}');"
style="background-image: url('{{ $backgroundImage | absURL }}');"
></div>
<div class="container content text-center">
<img src="{{ if $author.image }}{{ $author.image }}{{ else }}/assets/images/default-avatar.png{{ end }}"
<img src="{{ $authorImage | absURL }}"
class="rounded-circle mx-auto d-block img-fluid"
/>
<<<<<<< HEAD
<h1 class="greeting"> {{ $greeting }} {{ $name }}</h1>
=======
<h1 class="greeting">{{ i18n "greeting" }}
{{ if $author.nickname }}
{{ $author.nickname }}
{{ else if $author.name }}
{{ $author.name }}
{{ else }}
Jane Doe
{{ end }}
</h1>
>>>>>>> Refactor translation codes
<div class="typing-carousel">
<span id="ityped" class="ityped"></span>
<span class="ityped-cursor"></span>