Skip to content

Commit

Permalink
--
Browse files Browse the repository at this point in the history
  • Loading branch information
aishikrehman committed Mar 20, 2024
1 parent d5ee1b3 commit 8b7f6fd
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 35 deletions.
3 changes: 3 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ googleAnalytics: "G-3NFDT41J8E"

Params:
defaultLang: bn
tagTranslations:
animal-rights: প্রাণী অধিকার
environment: পরিবেশ
author:
name: Aishik Rehman
jobtitle: Wikimedian and Lexicolgist and CSEr.
Expand Down
3 changes: 3 additions & 0 deletions content/bn/tags/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: ট্যাগসমূহ
---
4 changes: 4 additions & 0 deletions data/tag_translations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
animal rights: প্রাণী অধিকার
wikipedia: উইকিপিডিয়া
proofreading: প্রুফ সংশোধন
philosophy: দর্শন
2 changes: 1 addition & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
{{- block "style" . }}{{ end -}}
{{- block "script" . }}{{ end }}
{{- template "_internal/google_analytics.html" . }}
{{/* {{- template "_internal/google_analytics.html" . }} */}}
</head>
<body>
{{ partial "header.html" . }}
Expand Down
2 changes: 1 addition & 1 deletion layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{{ $lang := .Site.Language.Lang }}
{{ $quotes := index .Site.Data.quotes $lang }}
{{ range $index, $quote := $quotes }}
<button data-bs-slide-to="{{ $index }}" data-bs-target="#QuoteCarousel"
<button id="Carousel{{ $index }}" data-bs-slide-to="{{ $index }}" data-bs-target="#QuoteCarousel"
class="{{ if eq $index 0 }}active{{ end }}"></button>
{{ end }}
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/page/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ <h3 class="text-light pt-1">{{ .Title }}</h3>
</div>
</div>
<div class="container pb-5 mb-2 mb-md-4">
<div class="bg-light shadow-lg rounded-3 p-4 mt-n5 mb-4">
<div class="bg-light shadow-lg p-4 mt-n5 mb-4">
<div class="row gy-3 gx-4 justify-content-between">
<div class="d-flex align-items-center flex-shrink-0">
<form action='{{ absLangURL "/search/" }}' method="get" class="input-group">
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<div class="col-md-6 text-center text-md-end mb-4">
<div class="social-links">
{{ range $name, $value := .Site.Params.author.social }}
<a class="btn-social me-2 mt-2" href="{{$value}}"><i class="bi bi-{{ $name }}"></i></a>
<a class="btn-social me-2 mt-2" href="{{ $value }}" aria-label="Fine me at {{ $name }}"><i class="bi bi-{{ $name }}"></i></a>
{{ end }}
</div>
</div>
</div>
<div class="pb-4 fs-sm opacity-50 text-center text-md-start">{{i18n "allrights"}} <br> {{i18n "copyright"}}
<div class="pb-4 fs-sm text-center text-md-start">{{i18n "allrights"}} <br> {{i18n "copyright"}}
</div>
</div>
</footer>
8 changes: 4 additions & 4 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<header class="bg-light border-bottom">
<div class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand me-4 order-lg-1" href='{{ absLangURL "" }}'>
<a class="navbar-brand me-4" href='{{ absLangURL "" }}'>
<div class="navbar-tool-text ms-n3 d-block position-relative">
<span class="h5 fw-bold">{{ .Site.Title }}</span>
<span class="d-block ">{{ .Site.Params.subtitle }}</span>
Expand All @@ -10,13 +10,13 @@
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse order-lg-2" id="navbarCollapse">
<div class="collapse navbar-collapse pt-5 pt-lg-0" id="navbarCollapse">
{{- if not (in .RelPermalink "/search/") -}}
<div class="me-auto px-3">
<form action='{{ absLangURL "/search/"}}' method="get" class="input-group">
<input autocomplete="off" class="search-input form-control" style="border-radius: 0px;" name="q"
placeholder="{{ .Site.Params.searchText }}" type="text" value="">
<button class="input-group-text btn btn-accent btn-sm" style="border-radius: 0px;"><i
placeholder="{{ .Site.Params.searchText }}" type="text" value="" aria-label="Search">
<button id="SearchButton" class="input-group-text btn btn-accent btn-sm" style="border-radius: 0px;"><i
class="bi bi-search"></i></button>
</form>
</div>
Expand Down
33 changes: 17 additions & 16 deletions layouts/partials/listitem.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@
</script>
{{ range .Paginator.Pages }}
<article class="blog-list border-bottom pb-4 mb-5">
<div class="blog-start-column">
<div class="d-flex align-items-center fs-sm pb-2 mb-1">
{{ with .Params.date }}
<span class="blog-entry-meta-link">{{ . | dateFormat "January 2, 2006" }}</span>
{{ end }}
</div>
<h2 class="h5 blog-entry-title"><a href="{{.RelPermalink}}">{{ .Title }}</a></h2>
{{ if isset .Params "tags" }}
<div class="fs-sm text-muted pe-2 mb-2">{{ range .Params.tags }}<a class="btn-tag me-2 mb-2"
href='{{absLangURL "/tags/"}}{{ . | urlize }}'>#{{ . }}</a>{{ end }}
</div>
{{ end }}
<div class="blog-start-column">
<div class="d-flex align-items-center fs-sm pb-2 mb-1">
{{ with .Params.date }}
<span class="dateofpost">{{ . | dateFormat "January 2, 2006" }}</span>
{{ end }}
</div>
<div class="blog-end-column">
<p class="fs-sm">{{ .Summary | truncate 400 }} {{ if .Truncated }}
<a href="{{ .RelPermalink }}">[{{i18n "readmore"}}]</a>{{ end }}</a>
</p>
<h2 class="h5 blog-entry-title"><a class="fw-bold" href="{{.RelPermalink}}">{{ .Title }}</a></h2>
{{ if isset .Params "tags" }}
<div class="fs-sm text-muted pe-2 mb-2">{{ range .Params.tags }}<a class="btn-tag me-2 mb-2"
href='{{absLangURL "/tags/"}}{{ . | urlize }}'>#{{ . }}</a>{{ end }}
</div>
{{ end }}
</div>
<div class="blog-end-column">
<p>
{{ .Summary | truncate 400 }}
{{ if .Truncated }}<a href="{{ .RelPermalink }}">[{{i18n "readmore"}}]</a>{{ end }}
</p>
</div>
</article>
{{ end }}
{{ template "_internal/pagination.html" . }}
25 changes: 21 additions & 4 deletions layouts/tags/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,37 @@
{{ define "main" }}
<div class="container">
<div class="row row-cols-sm-4 row-cols-1 gy-3 mt-5">
{{ if not (eq (len $.Data.Terms) 0) }}
{{/* {{ $tagTranslations := .Site.Data.tag_translations }}
{{ range .Data.Terms.Alphabetical }}
<a class="col" href="{{ .Page.Title | urlize}}">
{{ $translatedTag := index $tagTranslations .Page.Title }}
<a class="col" href="{{ .Page.Title | urlize }}">
<div class="card position-relative h-100">
<div class="card-body p-3">
<div class="ps-3">
<h6 class="fs-base pt-1 mb-1">
{{ if $translatedTag }}
{{ $translatedTag }}
{{ else }}
{{ .Page.Title | humanize }}
{{ end }}
</h6>
<p class="fs-ms text-muted mb-0">{{ .Count }}</p>
</div>
</div>
</div>
</a>
{{ end }} */}}
{{ range .Data.Terms.Alphabetical }}
<a class="col" href="{{ .Page.Title | urlize }}">
<div class="card position-relative h-100">
<div class="card-body p-3">
{{/* <img class="rounded-circle" src="img/team/03.jpg" width="96" alt="Jonathan Doe"> */}}
<div class="ps-3">
<h6 class="fs-base pt-1 mb-1">{{ .Page.Title | humanize }}</h6>
<p class="fs-ms text-muted mb-0">{{ .Count }}</p>
</div>
</div>
</div>
</a>
{{ end}}
{{ end }}
</div>
</div>
Expand Down
29 changes: 24 additions & 5 deletions layouts/tags/term.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
{{ define "main" }}
<div class="container">
<div class="row justify-content-center pt-5 mt-2">
<section class="col-lg-9">
{{ partial "listitem.html" . }}
</section>
<div class="bg-secondary py-4">
<div class="container d-lg-flex justify-content-between py-2 py-lg-3">
<div class="order-lg-2 mb-3 mb-lg-0 pt-lg-2">
{{ partial "meta.breadcrumb" . }}
</div>
<div class="order-lg-1 pe-lg-4 text-center text-lg-start">
<h1 class="h3 mb-0">{{ .Title | humanize }}</h1>
{{/* {{ $translations := .Site.Data.tag_translations }}
{{ $translated := index $translations .Title }}
<h1 class="h3 mb-0">{{ if $translated }}{{ $translated }}{{ else }}{{ .Title }}{{ end }}</h1> */}}
{{- if .IsTranslated -}}
{{ range .Translations }}
<a href="{{ .Permalink }}">{{i18n "alter" (dict "alter" .Language.LanguageName
)}}</a>
{{- end -}}
{{ end }}
</div>
</div>
</div>
<div class="container">
<div class="row justify-content-center pt-5 mt-2">
<section class="col-lg-9">
{{ partial "listitem.html" . }}
</section>
</div>
</div>
{{ end }}
2 changes: 1 addition & 1 deletion static/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
--bs-border-radius-xl: 1rem;
--bs-border-radius-2xl: 2rem;
--bs-border-radius-pill: 50rem;
--bs-link-color: #fe696a;
--bs-link-color: #000;
--bs-link-hover-color: #fe3638;
--bs-code-color: #d63384;
--bs-highlight-bg: #fff3cd
Expand Down

0 comments on commit 8b7f6fd

Please sign in to comment.