Skip to content

Commit 9100b3d

Browse files
committed
fix: remove redundant files
1 parent 3dee607 commit 9100b3d

File tree

9 files changed

+278
-325
lines changed

9 files changed

+278
-325
lines changed

_includes/custom-scripts.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
<!-- Newsletter Subscription -->
66
<script src="{{ '/assets/js/newsletter.js' | relative_url }}" defer></script>
77

8+
<!-- Sidebar Categories -->
9+
<script src="{{ '/assets/js/sidebar-categories.js' | relative_url }}" defer></script>
10+
811
<!-- Contact Form -->
912
<link rel="stylesheet" href="{{ '/assets/css/contact.css' | relative_url }}">
1013
<script src="{{ '/assets/js/contact.js' | relative_url }}" defer></script>
@@ -23,6 +26,18 @@
2326
debug: {{ site.debug_mode | default: "true" | jsonify }}
2427
};
2528

29+
// Categories data for sidebar
30+
window.SITE_CATEGORIES = [
31+
{% assign categories = site.categories | sort %}
32+
{% for category in categories %}
33+
{
34+
name: {{ category[0] | capitalize | jsonify }},
35+
slug: {{ category[0] | downcase | replace: ' ', '-' | jsonify }},
36+
count: {{ category[1] | size }}
37+
}{% unless forloop.last %},{% endunless %}
38+
{% endfor %}
39+
];
40+
2641
// Add Formspree endpoint meta tag dynamically
2742
document.addEventListener('DOMContentLoaded', function() {
2843
if (window.NEWSLETTER_CONFIG.formspreeEndpoint &&

_includes/sidebar-categories.html

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<div class="sidebar-categories">
2+
<h6 class="sidebar-heading">
3+
<i class="fas fa-folder-open me-2"></i>Categories
4+
</h6>
5+
<div class="categories-list">
6+
{% assign categories = site.categories | sort %}
7+
{% for category in categories limit: 8 %}
8+
{% assign posts_count = category[1] | size %}
9+
<a href="{{ '/categories/' | append: category[0] | downcase | replace: ' ', '-' | relative_url }}"
10+
class="category-item">
11+
<span class="category-name">{{ category[0] | capitalize }}</span>
12+
<span class="post-count">{{ posts_count }}</span>
13+
</a>
14+
{% endfor %}
15+
</div>
16+
</div>
17+
18+
<style>
19+
#sidebar .sidebar-categories {
20+
margin-bottom: 1.5rem;
21+
padding: 1rem;
22+
background: var(--sidebar-bg);
23+
border-radius: 8px;
24+
border: 1px solid var(--border-color);
25+
}
26+
27+
#sidebar .sidebar-categories .sidebar-heading {
28+
color: var(--heading-color);
29+
font-weight: 600;
30+
font-size: 0.9rem;
31+
margin-bottom: 0.75rem;
32+
text-transform: uppercase;
33+
letter-spacing: 0.5px;
34+
}
35+
36+
#sidebar .sidebar-categories .categories-list {
37+
display: flex;
38+
flex-direction: column;
39+
gap: 0.5rem;
40+
}
41+
42+
#sidebar .sidebar-categories .category-item {
43+
display: flex;
44+
justify-content: space-between;
45+
align-items: center;
46+
padding: 0.5rem;
47+
text-decoration: none;
48+
color: var(--text-color);
49+
border-radius: 4px;
50+
transition: all 0.2s ease;
51+
font-size: 0.85rem;
52+
}
53+
54+
#sidebar .sidebar-categories .category-item:hover {
55+
background: var(--btn-box-shadow);
56+
color: var(--link-color);
57+
text-decoration: none;
58+
transform: translateX(2px);
59+
}
60+
61+
#sidebar .sidebar-categories .category-name {
62+
flex: 1;
63+
}
64+
65+
#sidebar .sidebar-categories .post-count {
66+
background: var(--label-color);
67+
color: var(--sidebar-bg);
68+
padding: 0.2rem 0.5rem;
69+
border-radius: 12px;
70+
font-size: 0.75rem;
71+
font-weight: 500;
72+
min-width: 20px;
73+
text-align: center;
74+
}
75+
76+
/* Dark mode adjustments */
77+
[data-mode="dark"] #sidebar .sidebar-categories {
78+
background: var(--sidebar-bg);
79+
border-color: var(--main-border-color);
80+
}
81+
82+
[data-mode="dark"] #sidebar .sidebar-categories .category-item:hover {
83+
background: rgba(255, 255, 255, 0.1);
84+
}
85+
86+
[data-mode="dark"] #sidebar .sidebar-categories .post-count {
87+
background: var(--btn-border-color);
88+
color: var(--text-color);
89+
}
90+
91+
/* Responsive adjustments */
92+
@media (max-width: 768px) {
93+
#sidebar .sidebar-categories {
94+
padding: 0.75rem;
95+
}
96+
97+
#sidebar .sidebar-categories .category-item {
98+
font-size: 0.8rem;
99+
}
100+
}
101+
</style>

_tabs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# the default layout is 'page'
33
icon: fas fa-info-circle
4-
order: 4
4+
order: 1
55
---
66

77
Hi, I'm **Usama Sadiq**, a Principal Software Engineer, Open edX Core Contributor, and hands-on Python/Django + DevOps specialist with over 6 years of experience in building and scaling modern web infrastructure.

0 commit comments

Comments
 (0)