Skip to content

Commit f746f22

Browse files
authored
Fix deadcode and improve Cadence (#7)
1 parent 4350fe2 commit f746f22

File tree

7 files changed

+81
-55
lines changed

7 files changed

+81
-55
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ vendor/
1818
.idea/
1919
*.sublime-*
2020

21-
# Node (if using any tooling)
21+
# Node (dev tooling only - not part of Jekyll build)
2222
node_modules/
23+
package.json
24+
package-lock.json
2325

2426
# Environment
2527
.env

Makefile

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Digital Bazaar — Makefile
22
# Simplifies common development tasks
33

4-
.PHONY: help install update assets images hero clean serve serve-drafts build setup-hooks prod-build
4+
.PHONY: help install update assets images hero clean serve serve-drafts build setup-hooks prod-build dev-lint dev-install-tools
55

66
# Homebrew Ruby paths (macOS)
77
RUBY_BIN := /opt/homebrew/opt/ruby/bin
@@ -35,6 +35,8 @@ help: ## Show this help message
3535
@echo " $(CYAN)serve-drafts$(RESET) Start server with drafts visible"
3636
@echo " $(CYAN)build$(RESET) Build static site to _site/"
3737
@echo " $(CYAN)setup-hooks$(RESET) Enable git pre-commit hooks"
38+
@echo " $(CYAN)dev-install-tools$(RESET) Install PurgeCSS for dead code detection"
39+
@echo " $(CYAN)dev-lint$(RESET) Find unused CSS (requires dev-install-tools)"
3840
@echo ""
3941
@echo "$(YELLOW)Production:$(RESET)"
4042
@echo " $(CYAN)prod-build$(RESET) Build for production (minified)"
@@ -147,6 +149,45 @@ serve: ## Start local development server at http://localhost:4000
147149
serve-drafts: ## Start server with draft posts visible
148150
$(BUNDLE) exec jekyll serve --livereload --drafts
149151

152+
dev-lint: ## Find unused CSS using PurgeCSS (requires: make dev-install-tools)
153+
@echo "🔍 Analyzing CSS for unused selectors..."
154+
@echo ""
155+
@if [ ! -d node_modules/purgecss ]; then \
156+
echo "❌ PurgeCSS not installed. Run 'make dev-install-tools' first."; \
157+
exit 1; \
158+
fi
159+
@# Build the site first to get all HTML
160+
@$(BUNDLE) exec jekyll build --quiet
161+
@mkdir -p _site/purged
162+
@echo "Scanning _site/ for unused CSS..."
163+
@echo ""
164+
@npx purgecss \
165+
--css _site/assets/css/styles.css \
166+
--content '_site/**/*.html' \
167+
--output _site/purged
168+
@echo ""
169+
@echo "$(YELLOW)Results:$(RESET)"
170+
@ORIG=$$(wc -c < _site/assets/css/styles.css | tr -d ' '); \
171+
PURGED=$$(wc -c < _site/purged/styles.css | tr -d ' '); \
172+
SAVED=$$((ORIG - PURGED)); \
173+
echo " Original: $$ORIG bytes"; \
174+
echo " Purged: $$PURGED bytes"; \
175+
echo " Savings: $$SAVED bytes ($$(( (SAVED * 100) / ORIG ))%)"
176+
@echo ""
177+
@echo "$(YELLOW)Purged CSS saved to:$(RESET) _site/purged/styles.css"
178+
@echo ""
179+
@echo "💡 Compare _site/assets/css/styles.css with _site/purged/styles.css"
180+
@echo " to identify unused selectors, then manually remove from source."
181+
182+
dev-install-tools: ## Install dead code detection tools (PurgeCSS)
183+
@echo "📦 Installing dead code detection tools..."
184+
@if [ ! -f package.json ]; then \
185+
echo '{"name": "digitalbazaar-dev", "private": true}' > package.json; \
186+
fi
187+
npm install --save-dev purgecss
188+
@echo ""
189+
@echo "✅ Tools installed. Run 'make dev-lint' to analyze CSS."
190+
150191
# =============================================================================
151192
# PRODUCTION
152193
# =============================================================================

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Digital Bazaar 🛍️
1+
# Digital Bazaar 💬
22

3-
**البازار الرقمي** — A bilingual (Arabic/English) digital magazine for the Arab tech community.
3+
**البازار الرقمي** — A bilingual (Arabic/English) digital community for the Arab world.
44

5-
> A high-signal Arabic community for builders.
5+
> A modern bazaar for Arab digital minds.
66
77
## Dependencies
88

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# A bilingual (Arabic/English) digital magazine for the Arab tech community
33

44
# Site Settings
5-
title: Digital Bazaar
5+
title: Digital Bazaar 💬
66
description: A modern bazaar for Arab digital minds.
77
url: "https://digitalbazaarhub.github.io"
88
baseurl: ""

_data/strings_ar.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ nav:
2222
rules: "القواعد"
2323
menu: "القائمة"
2424

25-
# Language Toggle
26-
language:
27-
current: "العربية"
28-
switch_to: "English"
29-
switch_url: "/en/"
30-
3125
# Buttons
3226
buttons:
3327
join_whatsapp: "انضم إلى واتساب"
@@ -45,12 +39,6 @@ arrow_left: "→"
4539
arrow_external: ""
4640
arrow_external_rtl: ""
4741

48-
# 404 Page
49-
error_404:
50-
title: "الصفحة غير موجودة"
51-
message: "عذراً، الصفحة التي تبحث عنها غير موجودة."
52-
back: "العودة للرئيسية"
53-
5442
# Months (for archive) — KEEP AS-IS
5543
months:
5644
January: "يناير"
@@ -404,20 +392,23 @@ cadence_page:
404392
hero_alt: "تجمّع أناس في بازار رقمي دافئ"
405393
keep_up:
406394
label: "كيف تتابع؟"
407-
text: "نعلن المواعيد والتذكيرات في مجموعة «الإعلانات» على الواتساب. قد تختلف الأوقات — ونحاول المداورة بين المناطق الزمنية."
395+
text: "نعلن المواعيد والتذكيرات في قروب «الإعلانات» على الواتساب. قد تختلف الأوقات — ونحاول المداورة بين المناطق الزمنية."
408396

409397
rhythms:
410398
heading: "📅 جلسات متكرّرة"
411399
items:
412-
- title: "سبت البازار"
400+
- title: "📱 بازار السبت"
413401
description: "جلسة كتابية خفيفة يوم السبت عبر المجموعات: شارك ما تبنيه/تتعلمه، اطرح أسئلة، وشارك في النقاش."
414402
how: "أفضل طريقة للمشاركة: تحديث قصير (سطران–ثلاثة) + سؤال واحد واضح."
415-
- title: "جلسات Firesides الشهرية"
403+
- title: "🔥 جلسات Firesides الشهرية"
416404
description: "جلسة يقودها ضيف (أو حلقة نقاش) حول موضوع واحد مع أسئلة وأجوبة مباشرة. نعلن الشكل والموعد مسبقًا."
417405
how: "أفضل طريقة للمشاركة: اقرأ تمهيد الجلسة، جهّز سؤالًا واحدًا جيدًا، ثم تابع بعد الجلسة."
418-
- title: "خيوط الأسئلة والأجوبة الدورية"
406+
- title: "🤔 خيوط الأسئلة والأجوبة الدورية"
419407
description: "خيوط «اسألني أي شيء» غير متزامنة مع خبراء من المجتمع. ممتازة للأسئلة العميقة دون الالتزام بموعد."
420408
how: "أفضل طريقة للمشاركة: سياق + قيود + ماذا جرّبت."
409+
- title: "🤝 الإرشاد"
410+
description: "إرشاد مُنظّم مع ساعات مكتب محددة المدة وطلبات واضحة. لا وعود مبهمة — فقط عمل حقيقي وحلقات ملاحظات. توجّه إلى قروب «النصائح والإرشاد»."
411+
how: "أفضل طريقة للمشاركة: تعال بسؤال أو تحدٍّ محدد، وليس طلب عام «أريد أسألك»."
421412

422413
participation:
423414
heading: "✅ كيف تشارك دون أن تُرهق"
@@ -455,9 +446,9 @@ cadence_page:
455446
- question: "هل الجلسات بالعربية فقط؟"
456447
answer: "لا. بعضها عربي، بعضها إنجليزي، وكثير منها خليط. الاثنين مرحّب بهما."
457448
- question: "هل تنشرون ملخصات؟"
458-
answer: "أحيانًا. وعندها نضع الرابط في المجموعة ذات الصلة (ولاحقًا على الموقع)."
449+
answer: "أحيانًا. وعندها نضع الرابط في القروب ذات الصلة (ولاحقًا على الموقع)."
459450
- question: "كيف أعرف ما القادم؟"
460-
answer: "مجموعة «الإعلانات» على الواتساب - هي مصدر الحقيقة."
451+
answer: "قروب «الإعلانات» على الواتساب - هي مصدر الحقيقة."
461452

462453
#####################################
463454
# #

_data/strings_en.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,12 @@ nav:
2020
rules: "Rules"
2121
menu: "Menu"
2222

23-
# Language Toggle
24-
language:
25-
current: "English"
26-
switch_to: "العربية"
27-
switch_url: "/ar/"
28-
2923
# Directional arrows (flip for RTL)
3024
arrow_right: ""
3125
arrow_left: ""
3226
arrow_external: ""
3327
arrow_external_rtl: ""
3428

35-
# 404 Page
36-
error_404:
37-
title: "Page Not Found"
38-
message: "Sorry, the page you're looking for doesn't exist."
39-
back: "Back to Home"
40-
4129
#############################
4230
# #
4331
# "Home" Page #
@@ -373,20 +361,23 @@ cadence_page:
373361
hero_alt: "People gathering in a warm digital bazaar"
374362
keep_up:
375363
label: "How to keep up:"
376-
text: "Dates and reminders are posted in the Announcements group on WhatsApp. Times vary — we try to rotate for different time zones."
364+
text: "Dates and reminders are posted in the WhatsApp <i>\"Announcements\"</i> group. Times vary — we try to rotate for different time zones."
377365

378366
rhythms:
379367
heading: "📅 Recurring sessions"
380368
items:
381-
- title: "Bazaar Saturdays"
382-
description: "A casual text-based Saturday session across the groups: share what youre building/learning, ask questions, and join the conversation."
369+
- title: "📱 Bazaar Saturdays"
370+
description: "A casual text-based Saturday session across the groups: share what you're building/learning, ask questions, and join the conversation."
383371
how: "Best way to join: post a 2–3 line update + one clear question."
384-
- title: "Monthly Firesides"
372+
- title: "🔥 Monthly Firesides"
385373
description: "A guest-led session (or panel) on one topic, with live Q&A. Format + time are announced in advance."
386374
how: "Best way to join: read the prompt, bring one thoughtful question, and follow up after."
387-
- title: "Periodic Q&A threads"
388-
description: "Async ask me anything threads with community experts. Great for deep questions without meeting times."
375+
- title: "🤔 Periodic Q&A threads"
376+
description: "Async ask me anything threads with community experts. Great for deep questions without meeting times."
389377
how: "Best way to join: give context + constraints + what you tried."
378+
- title: "🤝 Mentorship"
379+
description: "Structured mentorship with time-boxed office hours and clear asks. No vague promises — just proof-of-work and real feedback loops. Head to the <i>\"Advice & Mentorship\"</i> group."
380+
how: "Best way to join: come with a specific question or challenge, not a general 'pick your brain' request."
390381

391382
participation:
392383
heading: "✅ How to participate (without getting overwhelmed)"
@@ -426,7 +417,7 @@ cadence_page:
426417
- question: "Do you post recaps?"
427418
answer: "Sometimes. If we do, we’ll link them from the relevant group (and later, on the website)."
428419
- question: "How do I know what’s next?"
429-
answer: "Announcements group on WhatsApp — that’s the source of truth."
420+
answer: "<i>\"Announcements\"</i> group on WhatsApp — that’s the source of truth."
430421

431422
#####################################
432423
# #

assets/css/styles.scss

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,23 +2601,30 @@ code:not(pre code) {
26012601
margin-bottom: 16px;
26022602
}
26032603

2604-
/* Rhythm cards grid */
2604+
/* Rhythm cards grid - 2x2 on all breakpoints above mobile */
26052605
.cadence-rhythms {
26062606
display: grid;
2607-
gap: 16px;
2607+
gap: 18px;
26082608
}
26092609

26102610
@media (min-width: 640px) {
26112611
.cadence-rhythms {
2612-
grid-template-columns: repeat(3, 1fr);
2612+
grid-template-columns: repeat(2, 1fr);
26132613
}
26142614
}
26152615

26162616
.rhythm-card {
2617-
background: var(--surface-elevated);
2617+
background: var(--card-bg);
26182618
border: 1px solid var(--border);
2619-
border-radius: var(--radius-md);
2620-
padding: 18px;
2619+
border-radius: var(--radius-lg);
2620+
padding: 18px 20px 20px;
2621+
box-shadow: var(--card-shadow);
2622+
transition: transform 0.12s ease, box-shadow 0.18s ease;
2623+
}
2624+
2625+
.rhythm-card:hover {
2626+
transform: translateY(-3px);
2627+
box-shadow: 0 12px 28px rgba(0,0,0,0.12);
26212628
}
26222629

26232630
.rhythm-card h3 {
@@ -2667,14 +2674,8 @@ code:not(pre code) {
26672674
Helper classes for common styling needs.
26682675
Uses logical properties where applicable for RTL support.
26692676
-------------------------------------------------------------------------- */
2670-
.text-center { text-align: center; }
2671-
.text-start { text-align: start; }
2672-
.text-end { text-align: end; }
26732677

2674-
.mt-0 { margin-top: 0; }
2675-
.mb-0 { margin-bottom: 0; }
26762678

2677-
.hidden { display: none !important; }
26782679

26792680
/* --------------------------------------------------------------------------
26802681
21. PRINT STYLES

0 commit comments

Comments
 (0)