Categories now show their subcategories as tags with remove buttons,
plus an input field to add new subcategories directly from admin.
Added Kala and Liha as default subcategories for Reseptit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- writeData now returns JSON error if file write fails
- Global error/exception handler returns JSON instead of blank 500
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Admin panel: new "Käyttäjät" section showing all registered users with
post count, likes count, email and join date.
Posts: submissions by logged-in users show a green "Vahvistettu" badge,
while guest submissions show a random code (e.g. #L01U51) for tracking.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace mailto link with original contact form (name, email, message fields)
- Add contact API endpoint that sends email via mail() and saves to messages.json
- Restore .contact-form CSS styles and translation keys
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- User auth: register (nickname + password + email), login, logout with PHP sessions
- Persistent likes: logged-in users' likes saved to users.json, anonymous via session
- "Tykkäämäni" filter button next to search — filter liked posts, combinable with search
- Hide empty/sparse categories from filter buttons until posts exist
- Replace broken contact form with simple mailto link (info@tykkaa.fi)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- All 9 neulominen posts moved from 'knitting' to 'kasityot' with subcategory ['neulominen']
- crochet_basket moved to 'kasityot' with subcategory ['virkkaus']
- 3 kasvit posts moved to 'puutarha' with matching subcategories
- 3 matkustus posts (travel_lapland, travel_tallinn, travel_saaristo) removed
- 5 tips posts moved to 'hyvinvointi' (mieli/arki) or 'puutarha' (tip_balcony_garden)
- Added POST_CATEGORY_MAP constant for automatic live-server migration
- getOrInitPosts() now auto-migrates old category references and drops matkustus posts
- Updated code section comments to reflect new structure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Kategoriat: Käsityöt ✂️, Puutarha 🌱, Sisustus 🏠, Kirjat 📚,
Hyvinvointi 🧘, Lemmikit 🐾, Kasvit 🪴, Matkustus ✈️
- Jokaisessa 2–4 esimerkkipostausta, yhteensä 26 uutta
- Tekijänimet vähennetty 5:een: Maija-Liisa, Tiina K., Riitta H., Sinikka, Pekka
- Pekka vain resepteissä (bolognese, lihapullat, karjalanpaisti)
- getOrInitCategories() lisää uudet kategoriat automaattisesti live-serverille
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- api.php: lisätään 'Muut'-alikategoria Resepteihin, Neulomiseen ja Vinkkeihin
- api.php: getOrInitCategories() lisää puuttuvat alikategoriat automaattisesti
- admin.html: poistetaan emoji-kenttä (emoji tulee kategoriasta automaattisesti)
- admin.html: alikategoriat checkboxeina → voi valita useamman samanaikaisesti
- script.js: subcategory tallennetaan aina taulukkona
- script.js: filterPosts tukee pilkulla eroteltuja alikategorioita (postSubs.includes)
- script.js: renderCards kirjoittaa subcategory-arrayn pilkulla eroteltuna data-attribuuttiin
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>