diff --git a/src/content/blog/blog-44.md b/src/content/blog/blog-44.md index 0bfa1bc..6d9c010 100644 --- a/src/content/blog/blog-44.md +++ b/src/content/blog/blog-44.md @@ -7,7 +7,7 @@ postSlug: building-a-tic-tac-toe-game-in-angular-a-beginners-guide featured: false draft: false tags: - - JavaScript + - Angular ogImage: "" description: "Learn how to build a Tic Tac Toe game in Angular v19 from scratch. This beginner-friendly guide will walk you through creating a simple yet engaging game using Angular's component-based architecture." --- diff --git a/src/content/blog/blog-45.md b/src/content/blog/blog-45.md new file mode 100644 index 0000000..f6df9be --- /dev/null +++ b/src/content/blog/blog-45.md @@ -0,0 +1,351 @@ +--- +author: Manthan Ankolekar +pubDatetime: 2024-12-09T08:44:00Z +modDatetime: +title: Building a Modern Music Player App with Angular and Tailwind CSS +postSlug: building-a-modern-music-player-app-with-angular-and-tailwind-css +featured: false +draft: false +tags: + - Angular + - Tailwind CSS +ogImage: "" +description: "Learn how to build a modern music player app using Angular and Tailwind CSS. This tutorial will guide you through creating a sleek and interactive music player with features like track navigation, a custom progress slider, and a curated playlist." +--- + +## Introduction + +In the age of digital music, a sleek and functional music player is essential. This tutorial walks you through creating a music player app using Angular and Tailwind CSS. With features like track navigation, a custom progress slider, and a curated playlist, this app is both visually appealing and highly interactive. + +--- + +**Key Features of Harmonic Beats** + +- **Track Navigation:** Skip forward or backward between tracks. +- **Custom Progress Slider:** Built with CSS for precise playback control. +- **Playlist Management:** Display and select tracks from a scrollable list. +- **Error Handling:** Alerts for playback issues. + +--- + +## Step-by-Step Guide to Building the App + +### 1. **Setting Up the Angular Project** + +Start by setting up an Angular project. If you don't already have Angular CLI installed, do so with: + +```bash +npm install -g @angular/cli +``` + +Then create a new project: + +```bash +ng new music-player +cd music-player +``` + +Install Tailwind CSS: + +```bash +npm install -D tailwindcss postcss autoprefixer +npx tailwindcss init +``` + +Configure `tailwind.config.js` to include Angular components: + +```javascript +module.exports = { + content: [ + "./src/**/*.{html,ts}", + ], + theme: { + extend: {}, + }, + plugins: [], +} +``` + +Add Tailwind directives in `src/styles.css`: + +```css +@tailwind base; +@tailwind components; +@tailwind utilities; +``` + +--- + +### 2. **Designing the UI with Tailwind CSS** + +Use Tailwind CSS to create a modern, responsive UI. Below is the HTML structure for the component: + +```html +
{{ error() }}
+{{ tracks[currentTrackIndex()].artist }}
+