Skip to content

About

A minimalist, terminal-style single-page website that displays a real-time counter showing how many days you've been single. Built with Eleventy and Tailwind CSS.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Days I Have Been Single

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.

Features

  • 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

Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • pnpm (or npm/yarn)

Installation

  1. Clone the repository:
git clone https://github.com/dfanso/days-i-have-been-single.git
cd days-i-have-been-single
  1. Install dependencies:
pnpm install
  1. 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');
  1. Build the project:
pnpm run build
  1. Start the development server:
pnpm run dev

The site will be available at http://localhost:3000

Available Scripts

  • pnpm run build - Build CSS and generate static site
  • pnpm run dev - Build CSS and start development server with watch mode
  • pnpm run build:css - Build Tailwind CSS only
  • pnpm run watch:css - Watch and rebuild CSS on changes
  • pnpm run build:eleventy - Build Eleventy site only
  • pnpm run watch:eleventy - Start Eleventy development server

Tech Stack

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:

  1. Deploy your site to Vercel
  2. Visit your Vercel dashboard
  3. Navigate to the Analytics tab for your project

Customization

Change the Start Date

Edit in src/index.njk:

  1. Nunjucks variable: {% set startDate = "2024-04-25" %}
  2. JavaScript: const startDate = new Date('2024-04-25T00:00:00');

Customize Colors

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

Modify Layout

Edit src/_layouts/base.njk to change the overall page structure and add meta tags.

License

ISC

Author

DFanso - Instagram


Built with Eleventy and Tailwind CSS

About

A minimalist, terminal-style single-page website that displays a real-time counter showing how many days you've been single. Built with Eleventy and Tailwind CSS.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages