A beautiful interactive web application that displays love messages and greetings in a visually appealing way. The app features animated 2D hearts, interactive animations, and rotating messages in multiple languages.
Visit the live application at https://para-vici.netlify.app/
This project uses Svelte 5's new runes mode, which introduces a new reactive programming model:
$state
- For declaring reactive state variables$derived
- For computed values that depend on state$effect
- For side effects that run when dependencies changeExample usage in the project:
<script>
// Declare reactive state
let appLanguage = $state('de');
// Derived value that updates when appLanguage changes
let appTitle = $derived($_('title'));
// Effect that runs when dependencies change
$effect(() => {
if (appLanguage && appTitle) {
updateMetaTags();
}
});
</script>
Clone the repository
git clone https://github.com/yourusername/for-my-love-svelte.git
cd for-my-love-svelte
Install dependencies
npm install
Start the development server:
npm run dev
This will start a development server at localhost:5000. The page will automatically reload when you make changes to the source files.
To allow connections from other computers on your network (useful for testing on mobile devices):
npm run dev -- --host
Run TypeScript type checking:
npm run check
Create an optimized production build:
npm run build
After building, you can preview the production build with:
npm run start
Deploy to Surge.sh:
npm run publish
This will build the project and deploy it to iheartvici.surge.sh.
public/
- Static assets and build outputsrc/
- Source code_layout.svelte
- Layout componentApp.svelte
- Main application componentHeart.svelte
- 2D hearts animation with CSSContentCard.svelte
- Message display componentNavigation.svelte
- Language selection and navigationi18n.ts
- Internationalization setupglobal.d.ts
- TypeScript declarationslang/
- Translation filesde.json
- German translationsen.json
- English translationses.json
- Spanish translationscontent.model.ts
- Type definitions for contentmain.ts
- Application entry pointThe application features an interactive experience:
Add new messages or greetings by editing the language files in src/lang/
:
// Example addition to en.json
{
"wishes": [
// ... existing messages
{
"id": 17,
"text": "Your new message here"
}
]
}
To add a new language, create a new file in the src/lang/
directory following the structure of the existing language files, and update the language selector in Navigation.svelte
.
The application supports all modern browsers:
This project is licensed under the MIT License - see the LICENSE file for details.