Skip to content

Commit 1518916

Browse files
committed
feat: index.html final + shop images + youtube links + footer
1 parent 11fdd3c commit 1518916

10 files changed

Lines changed: 362 additions & 116 deletions

File tree

.github/copilot-instructions.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# AI Coding Assistant Instructions
2+
3+
## Project Overview
4+
**David KRK Official Website** — A high-performance DJ/producer portfolio built on GitHub Pages with extensive automation.
5+
6+
### Purpose & Architecture
7+
- **Core Site**: Multi-language (6 languages) GitHub Pages portfolio for DJ David KRK
8+
- **Audio**: Custom Howler.js players on multiple pages (simple players + advanced waveform player)
9+
- **Tech Stack**: Vanilla HTML/CSS/JS, Tailwind base, GitHub Actions, Service Worker (PWA)
10+
- **Deployment**: Automatic GitHub Pages with daily Lighthouse audits, weekly backups, social media automation
11+
12+
## Critical Conventions & Patterns
13+
14+
### 1. Multi-Language Implementation
15+
**Pattern**: Data-attribute driven language switching (CSS + vanilla JS)
16+
- Every page uses `data-lang` attributes on content containers
17+
- CSS shows/hides content; JS toggles language buttons
18+
- **Key files**: [assets/js/main.js](assets/js/main.js#L85-L100) for language logic
19+
- **Example**: HTML elements `<div class="lang-content" data-lang="fr">`, `<div class="lang-content" data-lang="en">`
20+
- All 6 languages hardcoded in HTML (FR, EN, ES, EU, AR, UK)
21+
- **Default behavior**: French visible on load; hide all others initially
22+
23+
### 2. Audio Player Implementation
24+
**Two distinct approaches** — choose based on use case:
25+
26+
**A) Simple Players** ([assets/js/main.js](assets/js/main.js))
27+
- Individual Howler.js objects created per track
28+
- Direct DOM button selectors: `#play-btn-xxx`, `#pause-btn-xxx`
29+
- Event-driven UI updates via Howler callbacks (play/pause/stop)
30+
- **Pattern**: `const trackSound = new Howl({ src, html5: true, preload: false })`
31+
- Use `html5: true` for large files (streamable)
32+
33+
**B) Advanced Player** ([assets/player/player.js](assets/player/player.js))
34+
- Class-based `Player` singleton management
35+
- Playlist support with GitHub raw URLs for audio files
36+
- Waveform visualization via SiriWave.js
37+
- Located in `/assets/player/` with dedicated HTML/CSS
38+
39+
### 3. Asset Paths & Build Output
40+
- **Source CSS**: `assets/css/style.css` (contains Tailwind + custom styles)
41+
- **Source JS**: `assets/js/main.js` and `assets/player/player.js`
42+
- **Build output**: `dist/` folder (minified versions via npm scripts)
43+
- **Build command**: `npm run build` → minifies to `dist/assets/`
44+
- **CSS minification**: csso-cli → `dist/assets/css/style.min.css`
45+
- **JS minification**: terser → `dist/assets/js/main.min.js`
46+
47+
### 4. CSS Architecture
48+
**Tailwind Base + Custom Overrides**
49+
- File starts with unmodified Tailwind v3.4.1 (lines 1-700+)
50+
- Custom theme overrides after base: `.language-btn`, `.lang-content`, `.hero-header`
51+
- Use `!important` for language button overrides (to force styles over Tailwind)
52+
- Color scheme: Dark background (`rgba(0,0,0,0.9)`), green accent (`#00ff00`), light text
53+
54+
### 5. Service Worker Strategy
55+
**Pattern**: Network-first with cache fallback ([sw.js](sw.js))
56+
- `CACHE_NAME = 'davidkrk-v1.0.0'`**update version** when deploying cache changes
57+
- `URLS_TO_CACHE[]` — list all critical pages, assets, external fonts
58+
- Install: Pre-caches all listed URLs
59+
- Activate: Clears old cache versions
60+
- Fetch: Try network first, then cache, then offline fallback
61+
- **Registration**: [sw-register.js](sw-register.js) attached to all HTML files
62+
- **Update pattern**: Change cache version → old site continues working until refresh
63+
64+
### 6. GitHub Actions Automation
65+
**Key Workflows** (all in [.github/workflows/](../../.github/workflows/)):
66+
- **deploy.yml**: Triggered on push; builds and deploys to gh-pages branch
67+
- **lighthouse-audit.yml**: Daily 3 AM; runs Lighthouse, creates issues if scores drop
68+
- **automation-suite.yml**: Monday 10 AM; npm updates, link checking
69+
- **backup.yml**: Sunday 1 AM; creates full site backup to Releases
70+
- **social-media-post.yml**: Triggered when `music.html` changes; auto-generates social posts
71+
72+
### 7. Page Structure
73+
All HTML pages follow this pattern:
74+
- `<head>`: Meta tags for SEO, Tailwind/Font Awesome CDN, custom CSS
75+
- `<body class="home-page|music-page|...">`: Page-specific class for styling
76+
- Language selector buttons (visible on all pages)
77+
- Multi-language content blocks with `data-lang` attributes
78+
- Footer with copyright
79+
80+
## Development Workflow
81+
82+
### Local Setup
83+
```bash
84+
npm install
85+
npm run dev # Start live-server on :8080
86+
npm run build # Minify CSS/JS to dist/
87+
```
88+
89+
### Common Tasks
90+
1. **Add audio track**: Create Howler.js object in relevant JS file + HTML button controls
91+
2. **Update styling**: Edit `assets/css/style.css` directly (Tailwind classes + custom rules)
92+
3. **Add language**: Add new `data-lang="xx"` containers and update language button loop in `main.js`
93+
4. **Deploy**: Push to `main` branch → GitHub Actions auto-deploys to `gh-pages`
94+
5. **Cache busting**: Change `CACHE_NAME` version in `sw.js` when deploying breaking changes
95+
96+
### Testing
97+
- **Lighthouse**: Automatically runs daily; check GitHub Actions > Lighthouse Audit for scores
98+
- **Manual**: `npm run dev` + browser testing on mobile/desktop
99+
- **Cache**: Open DevTools → Application → Cache Storage to verify entries
100+
101+
## Key Files Quick Reference
102+
| File | Purpose |
103+
|------|---------|
104+
| [index.html](index.html) | Homepage with language selector |
105+
| [assets/css/style.css](assets/css/style.css) | All styles (Tailwind + custom) |
106+
| [assets/js/main.js](assets/js/main.js) | Simple Howler players + language switching |
107+
| [assets/player/player.js](assets/player/player.js) | Advanced playlist player, waveforms |
108+
| [sw.js](sw.js) | Service Worker caching strategy |
109+
| [package.json](package.json) | Dependencies: csso, terser, live-server |
110+
111+
## Important Reminders
112+
- **Always update cache version** in `sw.js` when shipping cache-breaking changes
113+
- **Minification is NOT automatic** — use `npm run build` before manual deployment
114+
- **GitHub Actions handle deployment** — pushing to `main` auto-deploys; use `gh-pages` branch for manual builds
115+
- **Audio files**: Use GitHub raw URLs in advanced player; local paths in simple players
116+
- **Howler.js**: Always set `html5: true` and `preload: false` for browser compatibility

.vscode/mcp.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"servers": {
3+
"io.github.github/github-mcp-server": {
4+
"type": "stdio",
5+
"command": "docker",
6+
"args": [
7+
"run",
8+
"-i",
9+
"--rm",
10+
"-e",
11+
"GITHUB_PERSONAL_ACCESS_TOKEN=${input:token}",
12+
"ghcr.io/github/github-mcp-server:0.30.3"
13+
],
14+
"gallery": "https://api.mcp.github.com",
15+
"version": "0.30.3"
16+
}
17+
},
18+
"inputs": [
19+
{
20+
"id": "token",
21+
"type": "promptString",
22+
"description": "",
23+
"password": true
24+
}
25+
]
26+
}

bio.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ <h2 class="main-title">Bio</h2>
184184
<a href="https://www.instagram.com/davidkrk/" target="_blank" aria-label="Instagram" class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-instagram"></i></a>
185185
<a href="https://www.mixcloud.com/DavidKRK/" target="_blank" aria-label="Mixcloud" class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud"></i></a>
186186
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" aria-label="YouTube" class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube"></i></a>
187-
<a href="https://soundcloud.com/david-krkofficial" target="_blank" aria-label="SoundCloud" class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud"></i></a>
187+
<a href="https://youtube.com/@DavidKRK" target="_blank" aria-label="SoundCloud" class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud"></i></a>
188188
<a href="https://www.tiktok.com/@davidkrk" target="_blank" aria-label="TikTok" class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok"></i></a>
189189
</div>
190190
<div class="flex flex-wrap justify-center items-center gap-3 sm:gap-4 mb-4 text-sm">

contact.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ <h2 class="main-title">Contact</h2>
174174
class="social-icon text-2xl md:text-3xl"><i class="fab fa-mixcloud"></i></a>
175175
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" aria-label="YouTube"
176176
class="social-icon text-2xl md:text-3xl"><i class="fab fa-youtube"></i></a>
177-
<a href="https://soundcloud.com/david-krkofficial/" target="_blank" aria-label="SoundCloud"
177+
<a href="https://youtube.com/@DavidKRK/" target="_blank" aria-label="SoundCloud"
178178
class="social-icon text-2xl md:text-3xl"><i class="fab fa-soundcloud"></i></a>
179179
<a href="https://www.tiktok.com/@davidkrk" target="_blank" aria-label="TikTok"
180180
class="social-icon text-2xl md:text-3xl"><i class="fab fa-tiktok"></i></a>

event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ <h1 class="main-title">David KRK</h1>
9494
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-mixcloud"></i></a>
9595
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" aria-label="YouTube"
9696
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-youtube"></i></a>
97-
<a href="https://soundcloud.com/david-krkofficial/" target="_blank" aria-label="SoundCloud"
97+
<a href="https://youtube.com/@DavidKRK/" target="_blank" aria-label="SoundCloud"
9898
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-soundcloud"></i></a>
9999
<a href="https://www.tiktok.com/@davidkrk" target="_blank" aria-label="TikTok"
100100
class="social-icon text-2xl md:text-3xl text-white"><i class="fab fa-tiktok"></i></a>

images/tshirt-davidkrk.png

150 KB
Loading

index.backup

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
<!doctype html>
2+
<html lang="fr">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<title>David KRK · HOME</title>
7+
<meta name="description" content="Site officiel de David KRK, DJ et producteur international de musique Techno. Découvrez sa musique, sa biographie et ses événements.">
8+
<meta name="keywords" content="David KRK, DJ techno, producteur, événements, musique">
9+
<link rel="icon" type="image/png" href="logo-30-01-25.png">
10+
<!-- Fonts + Icones -->
11+
<link rel="preconnect" href="https://fonts.googleapis.com">
12+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
13+
<link href="https://fonts.googleapis.com/css2?family=Russo+One&display=swap" rel="stylesheet">
14+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
15+
<!-- CSS principal -->
16+
<link rel="stylesheet" href="assets/css/style.css">
17+
<script src="https://cdn.jsdelivr.net/npm/howler@2.2.3/dist/howler.core.min.js"></script>
18+
</head>
19+
<body class="home-page">
20+
21+
<div class="background-image"></div>
22+
23+
<div id="hero" class="content-wrapper">
24+
<header class="hero-header">
25+
<a href="bio.html">Bio</a>
26+
<a href="music.html">Music</a>
27+
<a href="event.html">Event</a>
28+
<a href="contact.html">Contact</a>
29+
<a href="shop.html">Shop</a>
30+
<a href="https://chat.whatsapp.com/CWnaoDc9TY6HbTmW9cOyYc" target="_blank" class="nav-link text-xl sm:text-2xl flex items-center">
31+
<i class="fab fa-whatsapp mr-1 sm:mr-2"></i>Whatsapp
32+
</a>
33+
</header>
34+
35+
<main class="text-center max-w-4xl mx-auto px-4 w-full mt-10">
36+
<h1 class="main-title">David KRK</h1>
37+
38+
<div class="language-selector flex-wrap">
39+
<button type="button" class="language-btn" data-lang="fr">Français</button>
40+
<button type="button" class="language-btn" data-lang="en">English</button>
41+
<button type="button" class="language-btn" data-lang="es">Castellano</button>
42+
<button type="button" class="language-btn" data-lang="eu">Euskara</button>
43+
<button type="button" class="language-btn" data-lang="ar">العربية</button>
44+
<button type="button" class="language-btn" data-lang="uk">Ukrainian</button>
45+
</div>
46+
47+
<div class="lang-content" data-lang="fr">
48+
<div class="text-lg">
49+
<p class="mt-4">Site officiel de David KRK</p>
50+
<p>DJ et producteur international de musique Techno.</p>
51+
<p>Découvrez sa musique, sa biographie et ses événements.</p>
52+
</div>
53+
</div>
54+
<div class="lang-content" data-lang="en">
55+
<div class="text-lg">
56+
<p class="mt-4">Official Website of David KRK</p>
57+
<p>International Techno Music DJ & Producer.</p>
58+
<p>Discover his music, biography, and events.</p>
59+
</div>
60+
</div>
61+
<div class="lang-content" data-lang="es">
62+
<div class="text-lg">
63+
<p class="mt-4">Sitio web oficial de David KRK</p>
64+
<p>DJ y productor internacional de música Techno.</p>
65+
<p>Descubre su música, biografía y eventos.</p>
66+
</div>
67+
</div>
68+
<div class="lang-content" data-lang="eu">
69+
<div class="text-lg">
70+
<p class="mt-4">David KRK-ren webgune ofiziala</p>
71+
<p>Techno musikako nazioarteko DJ eta ekoizlea.</p>
72+
<p>Ezagutu bere musika, biografia eta ekitaldiak.</p>
73+
</div>
74+
</div>
75+
<div class="lang-content" data-lang="ar" dir="rtl">
76+
<div class="text-lg">
77+
<p class="mt-4">الموقع الرسمي لديفيد كرك</p>
78+
<p>دي جي ومنتج عالمي لموسيقى التكنو.</p>
79+
<p>اكتشف موسيقاه وسيرته الذاتية وفعالياته.</p>
80+
</div>
81+
</div>
82+
<div class="lang-content" data-lang="uk">
83+
<div class="text-lg">
84+
<p class="mt-4">Офіційний сайт David KRK</p>
85+
<p>Міжнародний техно-діджей та продюсер.</p>
86+
<p>Відкрийте для себе його музику, біографію та події.</p>
87+
</div>
88+
</div>
89+
90+
<section class="mt-8 mb-8 player-container">
91+
<iframe title="Mixcloud player" width="100%" height="120"
92+
style="border:0;"
93+
src="https://player-widget.mixcloud.com/widget/iframe/?hide_cover=1&hide_artwork=1&autoplay=1&feed=%2FDavidKRK%2Fdavid-krk-life-good-techno-ep3%2F"
94+
allow="autoplay; encrypted-media; fullscreen; idle-detection; speaker-selection; web-share"></iframe>
95+
</section>
96+
97+
</main>
98+
99+
<footer class="w-full max-w-7xl mx-auto">
100+
<div class="flex justify-center items-center gap-6 mb-4">
101+
<a href="https://www.facebook.com/DavidKRKofficial" target="_blank" aria-label="Facebook"
102+
class="social-icon text-2xl md:text-3xl"><i class="fab fa-facebook"></i></a>
103+
<a href="https://www.instagram.com/davidkrk/" target="_blank" aria-label="Instagram"
104+
class="social-icon text-2xl md:text-3xl"><i class="fab fa-instagram"></i></a>
105+
<a href="https://www.mixcloud.com/DavidKRK/" target="_blank" aria-label="Mixcloud"
106+
class="social-icon text-2xl md:text-3xl"><i class="fab fa-mixcloud"></i></a>
107+
<a href="https://www.youtube.com/@DavidKRKofficial" target="_blank" aria-label="YouTube"
108+
class="social-icon text-2xl md:text-3xl"><i class="fab fa-youtube"></i></a>
109+
<a href="https://youtube.com/@DavidKRK/" target="_blank" aria-label="SoundCloud"
110+
class="social-icon text-2xl md:text-3xl"><i class="fab fa-soundcloud"></i></a>
111+
<a href="https://www.tiktok.com/@davidkrk" target="_blank" aria-label="TikTok"
112+
class="social-icon text-2xl md:text-3xl"><i class="fab fa-tiktok"></i></a>
113+
<a href="https://www.buymeacoffee.com/davidkrk" target="_blank" aria-label="Buy Me A Coffee" class="social-icon"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px;"></a><br>
114+
</div>
115+
116+
<div class="flex flex-wrap justify-center items-center gap-3 sm:gap-4 mb-4 text-sm">
117+
<a href="mailto:davidkrkofficial@gmail.com?subject=Contact%20from%20Website"
118+
class="hover:text-[var(--primary-color)] transition-colors footer-contact-link">CONTACT | BOOKING | REMIX</a>
119+
</div>
120+
121+
<p class="text-sm opacity-70">© 2026 David KRK. All Rights Reserved</p>
122+
<p class="neon-text font-bold text-lg mt-4">"May The Techno Be With You"</p>
123+
</footer>
124+
</div>
125+
126+
<script src="assets/js/main.js"></script>
127+
<script>
128+
document.addEventListener('DOMContentLoaded', () => {
129+
const langBtns = document.querySelectorAll('.language-btn');
130+
const langContents = document.querySelectorAll('.lang-content');
131+
132+
function switchLanguage(lang) {
133+
langContents.forEach(content => content.classList.remove('active'));
134+
langBtns.forEach(b => b.classList.remove('active'));
135+
136+
const contentsToShow = document.querySelectorAll(`.lang-content[data-lang="${lang}"]`);
137+
contentsToShow.forEach(content => content.classList.add('active'));
138+
139+
const activeBtn = document.querySelector(`.language-btn[data-lang="${lang}"]`);
140+
if (activeBtn) {
141+
activeBtn.classList.add('active');
142+
}
143+
}
144+
145+
langBtns.forEach(btn => {
146+
btn.addEventListener('click', () => {
147+
switchLanguage(btn.dataset.lang);
148+
});
149+
});
150+
151+
// Set default language to French
152+
switchLanguage('fr');
153+
});
154+
</script>
155+
</body>
156+
</html>
157+
158+
159+
<meta name="viewport" content="

0 commit comments

Comments
 (0)