Changes to sidebar, moved sidebar to partial.

This commit is contained in:
tsmitty11 2023-05-18 13:58:51 +02:00
parent 474fde6093
commit 1d9d354749
2 changed files with 26 additions and 39 deletions

View file

@ -33,7 +33,7 @@
{{ end }} {{ end }}
<div class="p-4 pb-5"> <div class="p-4 pb-5">
<a href="{{ .RelPermalink }}"><h3>{{ .Title }}</h3></a> <a href="{{ .RelPermalink }}"><h3>{{ .Title }}</h3></a>
<span class="grid-gray small">Published {{ .Date.Format "02/01/2006" }}</span><br> <span class="grid-gray small">Published: {{ .Date.Format "02/01/2006" }}</span><br>
<span class="grid-gray small">Categories: {{ range .Params.categories }}<a class="grid-gray" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>, {{ end }}</span> <span class="grid-gray small">Categories: {{ range .Params.categories }}<a class="grid-gray" href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>, {{ end }}</span>
<span class="preview-content small mt-2">{{ .Content }}</span> <span class="preview-content small mt-2">{{ .Content }}</span>
</div> </div>
@ -43,45 +43,9 @@
{{ end }} {{ end }}
</div> </div>
</div> </div>
<div class="col-md-3 sidebar one-box ps-4">
<h3 class="mb-4">About Me</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. </p>
<h3 class="mt-4">Search</h3> {{ partial "sidebar" . }}
<input type="text" id="search" name="search" placeholder="Search..">
<h3 class="mt-4">Subscribe</h3>
<p>Subscribe to our newsletter:</p>
<input type="email" id="email" name="email" placeholder="Your email..">
<input type="submit" value="Subscribe">
<h3 class="mt-4">Popular Posts</h3>
<ul>
<li>Post 1</li>
<li>Post 2</li>
<li>Post 3</li>
</ul>
<h3 class="mt-4">Categories</h3>
<ul>
<li>Category 1</li>
<li>Category 2</li>
<li>Category 3</li>
</ul>
<h3 class="mt-4">Follow Me</h3>
<p>Facebook | Twitter | Instagram</p>
<h3 class="mt-4">Archives</h3>
<ul>
<li>January 2023</li>
<li>February 2023</li>
<li>March 2023</li>
</ul>
<h3 class="mt-4">Sponsor</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</div>
</div> </div>
</div> </div>
</main> </main>
@ -131,7 +95,7 @@
.sidebar { .sidebar {
flex: 0 0 30%; flex: 0 0 30%;
max-width: 20%; max-width: 20%;
border-left: 1px solid #ddd; border-left: 1px solid #949494;
} }
.sidebar ul { .sidebar ul {

View file

@ -0,0 +1,23 @@
<div class="col-md-3 sidebar one-box ps-4">
<h4 class="mt-4">categories</h4>
<ul>
{{ range .Site.Taxonomies.categories }}
<li><a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}">{{ .Page.Title }}</a></li>
{{ end }}
</ul>
<h4 class="mt-4">tags</h4>
<ul>
{{ range .Site.Taxonomies.tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ .Page.Title }}</a></li>
{{ end }}
</ul>
<h4 class="mt-4">follow me</h4>
<p>Facebook | Twitter | Instagram</p>
<h4 class="mt-4">give a star</h4>
<a class="github-button" href="https://github.com/teaxyz/cli" data-icon="octicon-star" data-show-count="true" aria-label="Star teaxyz/cli on GitHub">Star</a>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</div>