A modern online art gallery built with Nuxt.js and Tailwind CSS.
- Responsive design for all device sizes
- Browse artwork by categories and tags
- Search functionality for finding specific artworks
- Detailed view for each artwork with related items
- Clean and minimalist UI focused on showcasing the art
- Framework: Nuxt.js 3
- CSS Framework: Tailwind CSS
- State Management: Pinia
- Fonts:
- Playfair Display (headings)
- Raleway (body text)
art-gallery/
├── assets/
│ └── css/
│ └── main.css
├── components/
│ ├── ArtworkCard.vue
│ ├── ArtworkDetails.vue
│ ├── FilterSidebar.vue
│ ├── GalleryGrid.vue
│ └── RelatedArtworks.vue
├── layouts/
│ └── default.vue
├── pages/
│ ├── about.vue
│ ├── artwork/
│ │ └── [id].vue
│ ├── gallery.vue
│ └── index.vue
├── public/
│ └── images/
│ └── artworks/
│ └── ...
├── stores/
│ └── gallery.js
├── nuxt.config.ts
├── package.json
└── tailwind.config.js
- Clone the repository:
git clone https://github.com/yourusername/art-gallery.git
cd art-gallery
- Install dependencies:
npm install
- Run development server:
npm run dev
- Build for production:
npm run build
- Preview production build:
npm run preview
To use real artwork images, place your image files in the public/images/artworks/
directory and update the image paths in the stores/gallery.js
file. For example:
{
id: 1,
title: 'Sunset over the Mountains',
image: '/images/artworks/sunset-mountains.jpg',
// ... other properties
}
To add more artwork to the gallery, edit the artworks
array in the stores/gallery.js
file, following the same data structure.
You can modify the available categories and tags by updating the categories
and allTags
arrays in the stores/gallery.js
file.
To add user authentication for features like favoriting artworks or artist accounts, consider using:
- Nuxt Auth Module
- Firebase Authentication
- Auth0
To connect to a backend API for dynamic data:
- Create an API folder with services
- Use Nuxt's built-in fetch or useState composables
- Update the store to fetch data from your API
To turn this into an art marketplace:
- Add shopping cart functionality with Pinia
- Implement checkout process
- Integrate payment gateway (Stripe, PayPal, etc.)
-
Prepare Your Images
- Supported formats: JPG, PNG
- Recommended size: 1200x800px or larger
- Maximum file size: 5MB
-
Upload via Web Interface
- Navigate to the admin section
/admin/artworks
- Click "Add New Artwork"
- Fill in the artwork details
- Click "Upload Image" and select your file
- Click "Save" to store the artwork with image
- Navigate to the admin section
-
Manual File Addition If you need to add images manually:
a. Place image files in:
public/images/artworks/
b. Update the database record:
UPDATE artworks SET image_path = '/images/artworks/your-image.jpg' WHERE id = artwork_id;
The system automatically:
- Creates a web-optimized version
- Stores original in data/ingress for backup
- Generates appropriate thumbnails
- Updates database with correct paths
If images don't appear:
- Check file permissions on image directories
- Verify image paths in database
- Clear browser cache
- Check server logs for upload errors
This project is licensed under the MIT License - see the LICENSE file for details.