Migrate to Bootstrap 5 (#918)

* Migrate to Bootstrap 5

* Fix dropdown

* Fix horizontal line color

* Fix vertical line

* Migrate bootstrap on example site

* Fix style issue + scroll spy

Signed-off-by: hossainemruz <hossainemruz@gmail.com>

---------

Signed-off-by: hossainemruz <hossainemruz@gmail.com>
Co-authored-by: Emruz Hossain <hossainemruz@gmail.com>
This commit is contained in:
Bernat Borràs Civil 2024-04-20 22:03:59 +02:00 committed by GitHub
parent f8c6d8c613
commit 03148c9f3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 105 additions and 82 deletions

View file

@ -24,7 +24,7 @@
</script>
</head>
<body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-spy="scroll" data-target="#TableOfContents" data-offset="80">
<body class="type-{{ .Page.Type }} kind-{{ .Page.Kind }}" data-bs-spy="scroll" data-bs-target="#TableOfContents" data-bs-offset="80">
<div class="container-fluid bg-secondary wrapper">
<!----- ADD NAVBAR --------------->
{{ block "navbar" . }} {{ end }}

View file

@ -58,8 +58,8 @@
{{ end }}
</div>
<div class="card-footer">
<span class="float-left">${date}</span>
<a href="${link}" class="float-right btn btn-outline-info btn-sm">Read</a>
<span class="float-start">${date}</span>
<a href="${link}" class="float-end btn btn-outline-info btn-sm">Read</a>
</div>
</div>
</div>

View file

@ -37,7 +37,7 @@
<!--Content Start-->
<div class="page-content">
{{ if site.Params.features.blog.showAuthor | default true }}
<div class="author-profile ml-auto align-self-lg-center">
<div class="author-profile ms-auto align-self-lg-center">
<img class="rounded-circle" src='{{ partial "helpers/get-author-image.html" . }}' alt="Author Image">
<h5 class="author-name">{{ partial "helpers/get-author-name.html" . }}</h5>
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
@ -51,7 +51,7 @@
</div>
{{ if not (site.Params.features.blog.showAuthor | default true) }}
<div class="author-profile ml-auto align-self-lg-center">
<div class="author-profile ms-auto align-self-lg-center">
<p class="text-muted">{{ .Page.Date | time.Format ":date_full" }}{{ if site.Params.features.readingTime }} | {{ .ReadingTime }} {{i18n "minute" .ReadingTime }}{{ end }}</p>
</div>
{{ end }}
@ -64,7 +64,7 @@
</div>
<!-- Share or Contribute -->
<div class="row pl-3 pr-3">
<div class="row ps-3 pe-3">
<!--Social Media Share Buttons-->
<div class="col-md-6 share-buttons">
{{ if site.Params.features.blog.shareButtons }}
@ -165,7 +165,7 @@
</div>
</div>
<!--scroll back to top-->
<a id="scroll-to-top" class="btn" data-toggle="tooltip" data-placement="left" title="Scroll to top">
<a id="scroll-to-top" class="btn" type="button" data-bs-toggle="tooltip" data-bs-placement="left" title="Scroll to top">
<i class="fas fa-chevron-circle-up"></i>
</a>
</section>
@ -175,7 +175,7 @@
<section class="toc-section" id="toc-section">
{{ if and site.Params.features.toc.enable ( .Params.enableTOC | default true ) }}
<div class="toc-holder">
<h5 class="text-center pl-3">{{ i18n "toc_heading" }}</h5>
<h5 class="text-center ps-3">{{ i18n "toc_heading" }}</h5>
<hr>
<div class="toc">
{{ .TableOfContents }}