make a personal portfolio web site single page with ability to display my artworks…
- User
make a personal portfolio web site single page with ability to display my artworks categorised and my contact info also I want to upload my pdf resume so my anybody can download it
Assistant
Of course! I'll guide you through creating a clean, modern, single-page portfolio website from scratch. This guide will include all the code (HTML, CSS, and a little JavaScript for the artwork filtering) and step-by-step instructions.
You'll get a professional-looking site that is:
- Single-Page: Easy for visitors to navigate.
- Categorized Gallery: Allows you to filter your artwork (e.g., "Digital Painting," "3D Models," "Sketches").
- Resume Download: A prominent button for recruiters to download your PDF resume.
- Responsive: Looks great on desktops, tablets, and mobile phones.
Step 1: Set Up Your Project Folder
First, create a folder on your computer to hold all your website files. Inside this main folder, create the following structure:
my-portfolio/ ├── index.html // Your main page content ├── style.css // Your website's design and layout ├── script.js // The interactive filtering logic │ ├── images/ // Folder for all your artwork images │ ├── artwork1.jpg │ └── artwork2.png │ └── resume/ // Folder for your resume PDF └── my-resume.pdfAction:
- Create a folder named
my-portfolio. - Inside it, create two more folders:
imagesandresume. - Place your artwork images into the
imagesfolder. - Place your PDF resume into the
resumefolder (rename it to something simple likemy-resume.pdf). - Create the three empty files:
index.html,style.css, andscript.js.
Step 2: The HTML (The Structure)
This is the skeleton of your website. Copy the code below and paste it into your
index.htmlfile. I've added comments (<!-- ... -->) to explain each section.index.html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Your Name - Artist Portfolio</title> <link rel="stylesheet" href="style.css"> </head> <body> <!-- Header & Navigation --> <header> <div class="logo"> <h1>Your Name</h1> <p>Digital Artist & Illustrator</p> </div> <nav> <a href="#portfolio">Portfolio</a> <a href="#about">About</a> <a href="#contact">Contact</a> </nav> </header> <main> <!-- Hero Section with Resume Download --> <section id="hero"> <h2>Welcome to My Creative Space</h2> <p>Explore my collection of digital paintings, 3D models, and traditional sketches.</p> <a href="resume/my-resume.pdf" class="cta-button" download>Download My Resume (PDF)</a> </section> <!-- Portfolio Gallery Section --> <section id="portfolio"> <h2>My Portfolio</h2> <!-- Filter Buttons --> <div class="filter-buttons"> <button class="filter-btn active" data-category="all">All</button> <button class="filter-btn" data-category="digital">Digital Paintings</button> <button class="filter-btn" data-category="3d">3D Models</button> <button class="filter-btn" data-category="traditional">Traditional Art</button> </div> <!-- Artworks Gallery --> <div class="gallery"> <!-- Artwork Item 1 (Digital) --> <div class="artwork-item" data-category="digital"> <img src="images/artwork1.jpg" alt="Description of artwork 1"> <h3>Project Title One</h3> <p>A short description of the artwork.</p> </div> <!-- Artwork Item 2 (3D) --> <div class="artwork-item" data-category="3d"> <img src="images/artwork2.png" alt="Description of artwork 2"> <h3>Project Title Two</h3> <p>A short description of the artwork.</p> </div> <!-- Artwork Item 3 (Traditional) --> <div class="artwork-item" data-category="traditional"> <img src="images/artwork3.jpg" alt="Description of artwork 3"> <h3>Project Title Three</h3> <p>A short description of the artwork.</p> </div> <!-- Add more artwork items here, just copy and paste the block above --> <!-- Make sure to change the data-category, img src, and text! --> </div> </section> <!-- About Me Section --> <section id="about"> <h2>About Me</h2> <p> Hello! I'm [Your Name], a passionate artist with a love for storytelling through visuals. I specialize in [Your Specialty, e.g., character design and environmental art]. I have experience with tools like Photoshop, Blender, and Procreate. My goal is to create compelling worlds and memorable characters. </p> </section> <!-- Contact Section --> <section id="contact"> <h2>Get In Touch</h2> <p>I'm currently available for freelance work and commissions. Feel free to reach out!</p> <div class="contact-info"> <p><strong>Email:</strong> <a href="mailto:youremail@example.com">youremail@example.com</a></p> <p><strong>Socials:</strong> <a href="https://instagram.com/yourprofile" target="_blank">Instagram</a> | <a href="https://twitter.com/yourprofile" target="_blank">Twitter</a> | <a href="https://www.artstation.com/yourprofile" target="_blank">ArtStation</a> </p> </div> </section> </main> <!-- Footer --> <footer> <p>© 2024 Your Name. All Rights Reserved.</p> </footer> <!-- Link to the JavaScript file --> <script src="script.js"></script> </body> </html>
Step 3: The CSS (The Style & Design)
This code will make your website look modern and professional. Copy it into your
style.cssfile.style.css/* --- Global Styles & Variables --- */ :root { --primary-color: #2c3e50; /* Dark Blue */ --secondary-color: #3498db; /* Bright Blue */ --background-color: #ecf0f1; /* Light Gray */ --text-color: #34495e; /* Dark Gray */ --card-bg-color: #ffffff; /* White */ --heading-font: 'Georgia', serif; --body-font: 'Arial', sans-serif; } html { scroll-behavior: smooth; } body { font-family: var(--body-font); line-height: 1.6; margin: 0; padding: 0; background-color: var(--background-color); color: var(--text-color); } h1, h2, h3 { font-family: var(--heading-font); color: var(--primary-color); } main { max-width: 1200px; margin: 0 auto; padding: 20px; } section { padding: 60px 20px; border-bottom: 1px solid #bdc3c7; } section:last-of-type { border-bottom: none; } /* --- Header & Navigation --- */ header { background: var(--card-bg-color); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 1000; } header .logo h1 { margin: 0; color: var(--primary-color); } header .logo p { margin: 0; font-size: 0.9em; } header nav a { margin: 0 15px; text-decoration: none; color: var(--primary-color); font-weight: bold; transition: color 0.3s; } header nav a:hover { color: var(--secondary-color); } /* --- Hero Section --- */ #hero { text-align: center; background-color: var(--card-bg-color); border-radius: 8px; } .cta-button { display: inline-block; background-color: var(--secondary-color); color: #fff; padding: 12px 25px; text-decoration: none; border-radius: 5px; font-weight: bold; margin-top: 20px; transition: background-color 0.3s; } .cta-button:hover { background-color: #2980b9; /* Darker blue */ } /* --- Portfolio Section --- */ #portfolio { text-align: center; } .filter-buttons { margin-bottom: 30px; } .filter-btn { background: none; border: 2px solid var(--secondary-color); color: var(--secondary-color); padding: 10px 20px; margin: 5px; cursor: pointer; border-radius: 5px; transition: all 0.3s; } .filter-btn:hover, .filter-btn.active { background-color: var(--secondary-color); color: #fff; } .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; } .artwork-item { background: var(--card-bg-color); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0,0,0,0.1); transition: transform 0.3s, box-shadow 0.3s; } .artwork-item:hover { transform: translateY(-5px); box-shadow: 0 6px 12px rgba(0,0,0,0.15); } .artwork-item img { width: 100%; height: 250px; object-fit: cover; display: block; } .artwork-item h3 { margin: 15px; } .artwork-item p { margin: 0 15px 15px; font-size: 0.9em; } /* This class will be added by JavaScript to hide items */ .artwork-item.hide { display: none; } /* --- About & Contact Sections --- */ #about, #contact { max-width: 800px; margin: 0 auto; text-align: center; } #contact a { color: var(--secondary-color); text-decoration: none; } #contact a:hover { text-decoration: underline; } /* --- Footer --- */ footer { text-align: center; padding: 20px; background-color: var(--primary-color); color: #fff; } /* --- Responsive Design --- */ @media (max-width: 768px) { header { flex-direction: column; text-align: center; } header nav { margin-top: 10px; } .gallery { grid-template-columns: 1fr 1fr; } } @media (max-width: 480px) { header nav a { margin: 0 8px; } .gallery { grid-template-columns: 1fr; } }
Step 4: The JavaScript (The Interactivity)
This small script handles the logic for filtering your artwork when a category button is clicked. Copy it into your
script.jsfile.script.jsdocument.addEventListener('DOMContentLoaded', () => { const filterButtons = document.querySelectorAll('.filter-btn'); const artworkItems = document.querySelectorAll('.artwork-item'); filterButtons.forEach(button => { button.addEventListener('click', () => { // Remove 'active' class from all buttons and add it to the clicked one filterButtons.forEach(btn => btn.classList.remove('active')); button.classList.add('active'); const category = button.dataset.category; artworkItems.forEach(item => { const itemCategory = item.dataset.category; if (category === 'all' || category === itemCategory) { item.classList.remove('hide'); // Show item } else { item.classList.add('hide'); // Hide item } }); }); }); });
Step 5: How to Customize and Add Your Content
Now you just need to replace the placeholder content with your own.
-
index.htmlFile:- Title: Change
<title>Your Name - Artist Portfolio</title>to your name. - Header: Replace
Your NameandDigital Artist & Illustratorin the<header>section. - Hero Section: Update the welcome message if you like. Crucially, make sure the resume link
href="resume/my-resume.pdf"matches the name of your PDF file inside theresumefolder. - Add Your Artwork:
- Inside the
<div class="gallery">, you'll see blocks for each artwork item. - Copy and paste the
artwork-item<div>block for each piece you want to display. - For each item, change:
data-category="...": This must match one of thedata-categoryvalues in your filter buttons (digital,3d,traditional). This is how the filtering works.src="images/artwork1.jpg": Changeartwork1.jpgto the actual filename of your image in theimagesfolder.alt="...": Write a brief, descriptive alternative text for accessibility.<h3>and<p>: Update the title and description for the piece.
- Inside the
- Categories: You can change the categories by editing the text and
data-categoryattributes on the<button>elements. If you add a new category, make sure to use that samedata-categoryvalue on your artwork items. - About Me: Fill in the paragraph in the
#aboutsection. - Contact: Update your email and social media links in the
#contactsection. - Footer: Change
Your Namein the<footer>.
- Title: Change
-
style.cssFile (Optional Customization):- If you want to change the color scheme, just edit the values in the
:rootsection at the top of the file. For example, changevar(--primary-color)to a new hex code.
- If you want to change the color scheme, just edit the values in the
Step 6: How to Put Your Website Online (For Free!)
Once your site looks good on your local computer (by opening
index.htmlin your browser), you can easily publish it online for free.The Easiest Method: Netlify Drop
- Go to Netlify and sign up for a free account.
- On your main dashboard, you'll see a section that says "Want to deploy a new site without connecting to Git? Drag and drop your site folder here."
- Simply drag your entire
my-portfoliofolder and drop it onto that area. - Netlify will upload your files and give you a random live URL (like
random-name-12345.netlify.app) in seconds. - You can go into the site settings on Netlify to change the site name to something more personal (e.g.,
yourname-portfolio.netlify.app).
You now have a live, professional portfolio website that you built yourself!