Skip to content

YuanXiQWQ/Happy-Birthday-Daniel-Wang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Happy Birthday, Daniel Wang! 🎉

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.

Table of Contents

Project Overview

This project is designed as a special birthday gift for Daniel Wang.

Features

  • 🎂 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.

Getting Started

Prerequisites

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/YuanXiQWQ/Happy-Birthday-Daniel-Wang.git
  2. Navigate to the project directory:

    cd Happy-Birthday-Daniel-Wang
  3. Install the dependencies:

    npm install
  4. Start the server:

    node app.js
  5. Open your browser and navigate to http://localhost:3000 to view the birthday card.

Project Structure

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

Usage

  • 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.

Contributing

Feel free to explore and enjoy the codebase!

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Special thanks to Daniel Wang for being an amazing friend and the inspiration for this project.

中文

生日快乐, Daniel Wang! 🎉

欢迎来到 Happy Birthday, Daniel Wang! 项目的仓库,这是一个使用 Node.js 和 Express 以及 EJS 模板创建的数字生日贺卡。

目录

项目概述

这个项目是为 Daniel Wang 设计的特别生日礼物

功能

  • 🎂 蛋糕动画: 蛋糕图片随每次点击动态变化,模拟吃蛋糕一片一片的过程。
  • 📊 蛋糕计数器: 一个记录“吃掉的”蛋糕数量的计数器。
  • 🥳 特殊动画: 每五片蛋糕触发一次特殊动画效果。
  • 📍 GitHub 链接: 页脚中的 GitHub 图标链接到本仓库。

快速开始

先决条件

  • Node.js: 请确保你的系统中安装了 Node.js。你可以从 nodejs.org 下载。
  • npm: 需要 Node 包管理器来安装依赖项。

安装

  1. 克隆仓库:

    git clone https://github.com/YuanXiQWQ/Happy-Birthday-Daniel-Wang.git
  2. 进入项目目录:

    cd Happy-Birthday-Daniel-Wang
  3. 安装依赖:

    npm install
  4. 启动服务器:

    node app.js
  5. 打开浏览器并访问 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,作为一个了不起的朋友和这个项目的灵感来源。

About

🎉🎉Happy birthday to dear Daniel🎉🎉

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published