Skip to content

Commit 2f2d89e

Browse files
committed
sticky post, tags support
1 parent ecd81b0 commit 2f2d89e

9 files changed

Lines changed: 88 additions & 15 deletions

File tree

_includes/menu-header.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
<a class="nav-link" href="{{site.baseurl}}/contact.html">Contact</a>
1111
</li>
1212
<li class="nav-item">
13-
<a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mundana-wordpress/">WP version</a>
13+
<a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mundana-wordpress/">WP</a>
14+
</li>
15+
<li class="nav-item">
16+
<a target="_blank" class="nav-link" href="https://www.wowthemes.net/themes/mundana-ghost/">Ghost</a>
1417
</li>
1518
<li class="nav-item">
1619
<a target="_blank" class="nav-link" href="https://www.wowthemes.net/donate/">Buy me a coffee <i class="fa fa-coffee text-danger"></i></a>

_layouts/post.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,15 @@ <h1 class="display-4 mb-4 article-headline">{{ page.title }}</h1>
6868
<article class="article-post">
6969
{{ content }}
7070
</article>
71-
71+
72+
<!-- Tags -->
73+
<div class="mb-4">
74+
<span class="taglist">
75+
{% for tag in page.tags %}
76+
<a class="sscroll btn btn-light btn-sm font-weight-bold" href="{{site.baseurl}}/tags.html#{{ tag | downcase }}">{{ tag | downcase }}</a>
77+
{% endfor %}
78+
</span>
79+
</div>
7280

7381
<!-- Mailchimp Subscribe Form -->
7482
{% if site.mailchimp-list %}

_pages/tags.html

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "Tags"
3+
layout: default
4+
permalink: "/tags.html"
5+
---
6+
7+
<div class="container">
8+
<div class="row justify-content-center">
9+
<div class="col-md-8">
10+
<h1 class="font-weight-bold title h6 text-uppercase mb-4">Tags</h1>
11+
12+
{% for tag in site.tags %}
13+
<h4 class="font-weight-bold spanborder text-capitalize" id="{{ tag[0] | downcase }}"><span>{{ tag[0] }}</span></h4>
14+
15+
{% assign pages_list = tag[1] %}
16+
{% for post in pages_list %}
17+
{% if post.title != null %}
18+
{% if group == null or group == post.group %}
19+
20+
{% include main-loop-card.html %}
21+
{% endif %}
22+
{% endif %}
23+
{% endfor %}
24+
{% assign pages_list = nil %}
25+
{% assign group = nil %}
26+
27+
{% endfor %}
28+
29+
</div>
30+
31+
<div class="col-md-4">
32+
{% include sidebar-featured.html %}
33+
</div>
34+
35+
</div>
36+
</div>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
layout: post
3+
title: "Could we reinvent the charm of old cities"
4+
author: jane
5+
categories: [ Jekyll, tutorial ]
6+
image: assets/images/home.jpg
7+
tags: [sticky]
8+
---
9+
10+
Bucharest’s history alternated periods of development and decline from the early settlements in antiquity until its consolidation as the national capital of Romania late in the 19th century. First mentioned as the “Citadel of București” in 1459, it became the residence of the famous Wallachian prince Vlad III the Impaler.
11+
12+
#### Early 18th century woodcut of Bucharest
13+
14+
The Ottomans appointed Greek administrators (Phanariotes) to run the town from the 18th century. A short-lived revolt initiated by Tudor Vladimirescu in 1821 led to the end of the rule of Constantinople Greeks in Bucharest.[19]
15+
16+
The Old Princely Court (Curtea Veche) was erected by Mircea Ciobanul in the mid-16th century. Under subsequent rulers, Bucharest was established as the summer residence of the royal court. During the years to come, it competed with Târgoviște on the status of capital city after an increase in the importance of southern Muntenia brought about by the demands of the suzerain power – the Ottoman Empire.
17+
18+
Bucharest finally became the permanent location of the Wallachian court after 1698 (starting with the reign of Constantin Brâncoveanu).
19+
20+
Partly destroyed by natural disasters and rebuilt several times during the following 200 years, and hit by Caragea’s plague in 1813–14, the city was wrested from Ottoman control and occupied at several intervals by the Habsburg Monarchy (1716, 1737, 1789) and Imperial Russia (three times between 1768 and 1806). It was placed under Russian administration between 1828 and the Crimean War, with an interlude during the Bucharest-centred 1848 Wallachian revolution. Later, an Austrian garrison took possession after the Russian departure (remaining in the city until March 1857). On 23 March 1847, a fire consumed about 2,000 buildings, destroying a third of the city.

_posts/2019-02-03-powerful-things-markdown-editor.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "Powerful things you can do with the Markdown editor"
44
author: jane
55
categories: [ Jekyll, tutorial ]
66
image: https://images.unsplash.com/photo-1528784351875-d797d86873a1?ixlib=rb-1.2.1&auto=format&fit=crop&w=750&q=80
7+
tags: [summer]
78
---
89
There are lots of powerful things you can do with the Markdown editor. If you've gotten pretty comfortable with writing in Markdown, then you may enjoy some more advanced tips about the types of things you can do with Markdown!
910

assets/css/theme.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ a.text-dark:hover {
235235
}
236236
.navbar-light .navbar-nav .nav-link {
237237
color:rgba(0,0,0,0.5);
238+
font-size: .93rem;
238239
}
239240
.navbar-light .navbar-nav .nav-link:hover,.navbar-light .navbar-nav .nav-link:focus {
240241
color:rgba(0,0,0,0.7);
@@ -641,7 +642,7 @@ footer {
641642
position:relative;
642643
}
643644
.sticky-top-offset {
644-
top:100px;
645+
top:70px;
645646
}
646647
.homefirstpage .main-loop .main-loop-card:nth-child(-n+5) {
647648
display:none !important;

assets/images/home.jpg

-15.4 KB
Loading

assets/images/jumbotron.jpg

-106 KB
Binary file not shown.

index.html

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
<h2 class="h4 font-weight-bold">
2828
<a class="text-dark" href="{{site.baseurl}}{{latest_post.url}}">{{ latest_post.title }}</a>
2929
</h2>
30-
<p class="card-text">
31-
<a class="excerpt" href="{{site.baseurl}}{{latest_post.url}}">{{ latest_post.excerpt | strip_html | strip_newlines | truncate: 136 }}</a>
30+
<p class="excerpt">
31+
{{ latest_post.excerpt | strip_html | strip_newlines | truncate: 136 }}
3232
</p>
3333
<div>
3434
<small class="d-block text-muted">
@@ -133,24 +133,28 @@ <h2 class="mb-2 h6 font-weight-bold">
133133

134134
</div>
135135

136-
137-
138-
139-
<!-- Highlight (your own choice of highlighting a link, no post here) -->
136+
<!-- Sticky - add sticky tag to the post you want to highlight here - tags: [sticky] -->
137+
{% for post in site.posts %}
138+
{% if post.tags contains "sticky" %}
140139
<div class="jumbotron jumbotron-fluid jumbotron-home pt-0 pb-0 mb-2rem bg-lightblue position-relative">
141140
<div class="pl-4 pr-0 h-100 tofront">
142141
<div class="row justify-content-between">
143-
<div class="col-md-6 pt-6 pb-6 align-self-center">
144-
<h1 class="mb-3">Could we reinvent the charm of old cities ?</h1>
142+
<div class="col-md-6 pt-6 pb-6 pr-lg-4 align-self-center">
143+
<h1 class="mb-3">{{post.title}}</h1>
145144
<p class="mb-3 lead">
146-
Beautifully crafted, Mundana is the perfect design for your Jekyll blog. Fully compatible with Github pages.
145+
{{ post.excerpt | strip_html | strip_newlines | truncate: 136 }}
147146
</p>
148-
<a href="{{site.baseurl}}/about.html" class="btn btn-dark">Read More</a>
147+
<a href="{{site.baseurl}}{{post.url}}" class="btn btn-dark">Read More</a>
148+
</div>
149+
<div class="col-md-6 d-none d-md-block pr-0" style="background-size:cover;background-image:url({{post.image | absolute_url}});">
149150
</div>
150-
<div class="col-md-6 d-none d-md-block pr-0" style="background-size:cover;background-image:url({{site.baseurl}}/assets/images/home.jpg);"> </div>
151151
</div>
152152
</div>
153-
</div>
153+
</div>
154+
{% endif %}
155+
{% endfor %}
156+
157+
154158

155159

156160

0 commit comments

Comments
 (0)