A minimalist, terminal-style single-page website with a real-time counter showing how many days I've been single. Counting up from April 25, 2024 — still going. Built with Eleventy and Tailwind CSS, featuring a sleek terminal aesthetic.
- Live Counter: Real-time count of days, hours, minutes, and seconds since April 25, 2024
- Terminal UI: Beautiful terminal-inspired design with syntax highlighting aesthetics
- Responsive Design: Fully responsive and mobile-friendly
- Additional Stats: Shows weeks, months, and years equivalent
- Zero Dependencies: No JavaScript frameworks, just vanilla JS
- Static Site: Fast and lightweight, built with Eleventy
- Node.js (v16 or higher)
- pnpm (or npm/yarn)
- Clone the repository:
git clone https://github.com/dfanso/days-i-have-been-single.git
cd days-i-have-been-single- Install dependencies:
pnpm install- To change the start date, edit
src/index.njk:
{% set startDate = "2024-04-25" %}And in the JavaScript section:
const startDate = new Date('2024-04-25T00:00:00');- Build the project:
pnpm run build- Start the development server:
pnpm run devThe site will be available at http://localhost:3000
pnpm run build- Build CSS and generate static sitepnpm run dev- Build CSS and start development server with watch modepnpm run build:css- Build Tailwind CSS onlypnpm run watch:css- Watch and rebuild CSS on changespnpm run build:eleventy- Build Eleventy site onlypnpm run watch:eleventy- Start Eleventy development server
- Eleventy - Static site generator
- Tailwind CSS - Utility-first CSS framework
- Vanilla JavaScript - No frameworks, just pure JS
- Vercel Analytics - Web analytics
This project includes Vercel Analytics for tracking page views and user interactions. Analytics is automatically enabled when deployed to Vercel. For other hosting platforms, the analytics script is included via CDN and will work once the site is deployed.
To view analytics data:
- Deploy your site to Vercel
- Visit your Vercel dashboard
- Navigate to the Analytics tab for your project
Edit in src/index.njk:
- Nunjucks variable:
{% set startDate = "2024-04-25" %} - JavaScript:
const startDate = new Date('2024-04-25T00:00:00');
Modify the color scheme in src/index.njk by changing Tailwind classes:
- Terminal colors:
bg-gray-900,bg-gray-800 - Accent colors:
text-cyan-400,text-blue-500,text-purple-500
Edit src/_layouts/base.njk to change the overall page structure and add meta tags.
ISC
DFanso - Instagram
Built with Eleventy and Tailwind CSS