- 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>
Clicking anywhere on a card opens the post modal. Like button and
like count have stopPropagation so they work independently. Added
cursor:pointer to card for visual affordance.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Clicking any image in a post modal opens it full-screen with a dark
overlay. Close by clicking outside, the ✕ button, or pressing Escape.
Added zoom-in cursor and hover opacity to signal clickability.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When user selects Reseptit category, recipe fields (time, servings,
ingredients, steps) appear automatically. All other categories show
the post body field instead. Removed the manual toggle buttons and
cleaned up related CSS.
Co-Authored-By: Claude Sonnet 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>
- Tagline: "Jaa asioita joista tykkäät"
- Hero: kuka tahansa voi jakaa
- About: avoin yhteisö kaikille
- Footer: "Avoin yhteisö kaikille"
- About-emoji 👩🍳 → 🤝
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vaihdetaan SVG-img-lähestymistapa HTML+CSS-lähestymistapaan, jolloin
fontti latautuu luotettavasti. SVG:nä ladattu kuva ei voi käyttää
sivun ulkoisia fontteja.
- index.html: lisätty Press Start 2P Google Fonts link;
logo-h1 käyttää pixel-logo-luokkaa (♥tykkää.fi)
- style.css: .pixel-logo fontti+koko+varjo, .logo-heart oranssi,
.logo-fi cream-väri + pienempi koko
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Ainesluettelon vieressä 'Kopioi ostoslista' -nappi: kopioi
julkaisun nimen ja ainesosat ostoslistamuodossa leikepöydälle
- Tykkäykset tallennetaan localStorage:en — muistetaan vaikka
PHP-sessio vanhenisi (selain muistaa oman tykkäyshistoriansa)
- Latauksessa yhdistetään server-sessio ja localStorage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
mime_content_type() vaatii fileinfo-laajennuksen joka ei ehkä ole
käytössä Pleskissä → PHP kaatuu fatal erroriin → HTTP 500 tyhjä body.
getimagesize() on osa GD-kirjastoa, lähes aina saatavilla.
Testiendpoint: upload.php?test kertoo onko PHP käynnissä ja mitkä
laajennukset on saatavilla.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- upload.php: ob_start()+error_reporting(0) estää PHP-varoitusten
sekoittumisen JSON-vastaukseen; ob_clean() ennen jokaista echoa
- script.js + admin.html: lue vastaus ensin tekstinä, yritä sitten
JSON-parsinta ja näytä tarkka virheviesti (HTTP-koodi + raakavastaus)
jos JSON ei onnistu
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>