Skip to content

Commit 018f654

Browse files
authored
improved the index page (#18)
- Added a limited list of latest posts - Improved the visibility of such posts - Changed the intro text
1 parent bd35b72 commit 018f654

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

src/_includes/home.html

+25-9
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,36 @@ <h2 class="text-md md:text-2xl text-center">Coding Bull is a <span class="text-a
1919
</div>
2020
</div>
2121
</div>
22-
23-
<div class="prose mt-16">
22+
23+
<div class="blog-content mt-16">
2424
{{ content | safe }}
2525
</div>
2626

2727
<div class="my-8">
28-
<div class="text-xl">Blog posts:</div>
29-
<ul class="list-disc list-inside">
28+
<div class="text-center text-3xl blog-title my-4 font-bold">
29+
Latest posts:
30+
</div>
31+
<div class="grid lg:grid-cols-3 gap-5">
3032
{% for post in collections.blog %}
31-
<li>
32-
<a href="{{ post.url }}">{{ post.data.title }}</a>
33-
</li>
34-
{% endfor %}
35-
</ul>
33+
{% if loop.index0 < 3 %} <a href="{{ post.url }}"
34+
class="transition ease-in-out delay-150 block bg-base-300 hover:scale-110 hover:bg-base-200 shadow-md p-4 text-primary-content flex-col justify-between">
35+
<h3 class="text-xl text-center h-3/4">
36+
{{ post.data.title }}
37+
</h3>
38+
39+
<div class="flex gap-x-3">
40+
{% for tag in post.data.tags %}
41+
{% if tag !== 'posts' %}
42+
<span class="hidden lg:block bg-base-100 text-accent rounded-xl py-1 px-3 text-sm">
43+
#{{ tag }}
44+
</span>
45+
{% endif %}
46+
{% endfor %}
47+
</div>
48+
</a>
49+
{% endif %}
50+
{% endfor %}
51+
</div>
3652
</div>
3753
</div>
3854

src/index.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,10 @@ image: "/image/landing.png"
66
---
77
Hi! Welcome to Coding Bull!
88

9-
## This website us currently under development.
9+
Want to learn some niche coding tricks? Are you just looking to improve your daily work routine? Do you want to see a lot of GIFs?
10+
11+
Then you are in the right place!
12+
13+
## New videos are being added to our Youtube channel daily.
14+
15+
You can also subscribe to our newsletter to receive the latest news.

0 commit comments

Comments
 (0)