Skip to content

Commit

Permalink
fix: not showing language at the footer
Browse files Browse the repository at this point in the history
  • Loading branch information
puranikvinit committed Jul 2, 2024
1 parent 8dad5e0 commit a88a088
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hugo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
baseURL = 'https://puranikvinit.github.io/0xcode/'

theme = 'risotto'
languageCode = 'en'
DefaultContentLanguage = "en"
languageCode = 'en-us'
DefaultContentLanguage = "en-us"
enableInlineShortcodes = true

title = '0xcode'
Expand Down
17 changes: 17 additions & 0 deletions layouts/partials/lang.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<p>
{{ $siteLanguages := .Site.Languages }} {{ $pageLang := .Page.Lang }} {{
$currentPage := . }} {{ $pageName := "" }} {{ range .Site.Menus.main }} {{ if
eq ($currentPage.Permalink) (.URL | absLangURL) }} {{ $pageName = .Name }} {{
end }} {{ end }} {{ range .Page.AllTranslations }} {{ $translation := .}} {{
range $siteLanguages }} {{ if eq $translation.Lang .Lang }} {{ $selected :=
false }} {{ if eq $pageLang .Lang }}
<br /><span class="active">$ echo $LANG<br /><b>{{ .Lang }}</b></span
><br />

{{ else }}
<br /><a href="{{ $translation.Permalink }}"
>export LANG={{ .LanguageName }}; ./{{ $pageName }}</a
><br />
{{ end }} {{ end }} {{ end }} {{ end }}
</p>
<br /><br />
4 changes: 2 additions & 2 deletions static/css/palettes/base16-custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
--base08: #ab4642;
--base09: #dc9656;
--base0A: #f7ca88;
--base0B: #a1b56c;
--base0B: #409937;
--base0C: #86c1b9;
--base0D: #7cafc2;
--base0D: #409937;
--base0E: #ba8baf;
--base0F: #a16946;
}

0 comments on commit a88a088

Please sign in to comment.