Welcome to the repository of the Happy Birthday, Daniel Wang! project, a heartfelt digital birthday card created using Node.js and Express with EJS templates.
- Project Overview
- Features
- Getting Started
- Project Structure
- Usage
- Contributing
- License
- Acknowledgments
- 中文版本
This project is designed as a special birthday gift for Daniel Wang.
- 🎂 Cake Animation: The cake image changes dynamically with each click, simulating the eating of a cake slice by slice.
- 📊 Cake Counter: A counter that tracks the number of cakes “eaten.”
- 🥳 Special Animation: Every fifth cake slice triggers a special animation effect.
- 📍 GitHub Link: A GitHub icon in the footer links to this repository.
- Node.js: Make sure you have Node.js installed on your system. You can download it from Node.js.org.
- npm: Node Package Manager is required to install dependencies.
-
Clone the repository:
git clone https://github.com/YuanXiQWQ/Happy-Birthday-Daniel-Wang.git
-
Navigate to the project directory:
cd Happy-Birthday-Daniel-Wang
-
Install the dependencies:
npm install
-
Start the server:
node app.js
-
Open your browser and navigate to
http://localhost:3000
to view the birthday card.
Happy-Birthday-Daniel-Wang/
│
├── public/ # Publicly accessible assets
│ ├── css/
│ │ └── style.css # CSS styles
│ ├── js/
│ │ └── script.js # JavaScript for interactivity
│ └── images/ # Images, including cake slices and GitHub icon
│ └── 0.webp
│ └── 1.webp
│ └── ... # Other cake slice images
│ └── github.png
│
├── views/ # EJS templates
│ ├── index.ejs # Main template for the homepage
│ └── layout.ejs # Layout template
│
├── app.js # Main application file
└── package.json # Project metadata and dependencies
- Eat the Cake: Click on the cake image to simulate eating a slice of cake.
- Cake Counter: Watch the counter-increase with each slice.
- One More Cake: Click the "One More Cake" button to reset the cake image and enjoy another round.
- Special Animation: Every fifth slice triggers a special "jelly" animation to celebrate.
Feel free to explore and enjoy the codebase!
This project is licensed under the MIT License. See the LICENSE file for details.
- Special thanks to Daniel Wang for being an amazing friend and the inspiration for this project.
欢迎来到 Happy Birthday, Daniel Wang! 项目的仓库,这是一个使用 Node.js 和 Express 以及 EJS 模板创建的数字生日贺卡。
这个项目是为 Daniel Wang 设计的特别生日礼物
- 🎂 蛋糕动画: 蛋糕图片随每次点击动态变化,模拟吃蛋糕一片一片的过程。
- 📊 蛋糕计数器: 一个记录“吃掉的”蛋糕数量的计数器。
- 🥳 特殊动画: 每五片蛋糕触发一次特殊动画效果。
- 📍 GitHub 链接: 页脚中的 GitHub 图标链接到本仓库。
- Node.js: 请确保你的系统中安装了 Node.js。你可以从 nodejs.org 下载。
- npm: 需要 Node 包管理器来安装依赖项。
-
克隆仓库:
git clone https://github.com/YuanXiQWQ/Happy-Birthday-Daniel-Wang.git
-
进入项目目录:
cd Happy-Birthday-Daniel-Wang
-
安装依赖:
npm install
-
启动服务器:
node app.js
-
打开浏览器并访问
http://localhost:3000
查看生日贺卡。
Happy-Birthday-Daniel-Wang/
│
├── public/ # 公共资源文件
│ ├── css/
│ │ └── style.css # CSS 样式
│ ├── js/
│ │ └── script.js # 用于交互的 JavaScript
│ └── images/ # 图片,包括蛋糕片和 GitHub 图标
│ └── 0.webp
│ └── 1.webp
│ └── ... # 其他蛋糕片图片
│ └── github-mark.svg
│
├── views/ # EJS 模板
│ ├── index.ejs # 主页模板
│ └── layout.ejs # 布局模板
│
├── app.js # 主应用文件
└── package.json # 项目元数据和依赖项
- 吃蛋糕: 点击蛋糕图片,模拟吃下一片蛋糕。
- 蛋糕计数器: 随着每片蛋糕的消失,计数器将增加。
- 再来一块蛋糕: 点击 "One More Cake" 按钮重置蛋糕图片,再次享受新的体验。
- 特殊动画: 每五片蛋糕会触发一次特殊的“果冻”动画来庆祝。
欢迎探索和享受这个代码库!
本项目使用 MIT 许可证。详情请参阅 LICENSE 文件。
- 特别感谢 Daniel Wang,作为一个了不起的朋友和这个项目的灵感来源。