Featured Projects Portfolio Site

Create a Featured Projects Portfolio Site

Showcase select projects by coding an online portfolio site from scratch

There are many different ways to share your work online. If you are a web designer with front-end web development skills looking to showcase your talent, one of the best ways is to custom design and code your own portfolio site from scratch. In this exercise, we will create a portfolio with three “featured” items. This “depth-over breadth” approach is well suited for designers that want to showcase a smaller amount of projects and go into great detail for each one. Case studies are well suited to tell a story and highlight the design process.

See a Demo
https://laulima.hawaii.edu/access/content/group/21336a81-b8f0-4b8c-8059-ba1b1b192128/public/tests/portfolios/myportfolio3/

View on Github
https://github.com/kccnma/teachingmaterials/tree/master/myportfolio3/

View on Codepen
https://codepen.io/kccnma/pen/NWqKppJ

Download Starter Files
https://laulima.hawaii.edu/access/content/group/21336a81-b8f0-4b8c-8059-ba1b1b192128/public/tests/portfolios/img.zip

Let’s Code!

Get started by launching your favorite code editor (IDE)

Create a new HTML folder named “customportfolio”

Inside of your new directory, create a new index.html file and then download the provided portfolio images for this exercise.  Next, create another new folder named “css” and inside of it create a new file named style.css. These two files (index.html and style.css) are the initial files that we will be editing. Once you are all setup, your local folder setup should look something like this:
Code, Save, Refresh, Repeat!


“Three Case Studies” Version (2020)

Start with Markup (HTML), then add Styling (CSS), then Repeat.

Ideally, you should code line-by-line and write every line of html and css from the source code below by hand. To speed up the process (for those with neither the time or patience), please feel free to copy-and-paste large blocks of code, one-at-a-time, in order. After each iteration (code block), be sure to hit save then preview your changes in the browser (refresh) before moving on the the next code block.

HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My Portfolio</title>
<meta name="description" content="A minimal, simple portfolio site.">
<!-- VIEWPORT FOR MOBILE -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- MAIN CSS FILE -->
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<header class="site-header">
<div class="site-id">
[ logo ]
</div>
<div class="site-nav">
[ site nav ]
</div>
</header>
<main class="site-main">
<h1>Heading 1</h1>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Atque, esse.</p>
<a href="#">Link</a>
</main>
<footer class="site-footer">
<div class="site-nav">
[ footer nav ]
</div>
</footer>
</body>
</html>
view raw mp3-start1.html hosted with ❤ by GitHub

…and also start with a simple style.css file with the following base styling.

CSS
/* GLOBAL RESETS */
* { box-sizing: border-box; }
body { margin: 0; }
/* GLOBAL COLORS */
body {
background-color: rgba(0,0,0,.8);
color: rgba(255,255,255,.8);
}
a { color: rgba(255,255,255,.9);}
/* BESPOKE LAYOUT STRUCTURE */
/* FLEX-BOX MAIN LAYOUT
body {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
}
main { flex-grow: 1; }
*/
body {
min-height: 100vh;;
display: grid;
grid-template-rows: auto 1fr auto;
}
.site-header {
display: flex;
justify-content: space-between;
}
/* .site-header {
display: grid;
grid-template-columns: auto 1fr;
} */
/* main {
display: grid;
align-items: center;
} */
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
* {
/* margin: 0; padding: 0;
box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 1) !important;
background-color: rgba(146, 21, 21, 0.05) !important;
color: rgba(0, 0, 0, .4) !important; */
/* background-image: none !important; */
/* border-color: rgba(0,0,0,0) !important; */
}
/* body { background-color: rgba(255,255,0,.2) !important; }
.site-id { background-color: rgba(255,0,0,.2) !important; }
.site-nav { background-color: rgba(0,255,0,.2) !important; }
.site-footer { background-color: rgba(0,0,255,.2) !important; } */
view raw mp3-start1.css hosted with ❤ by GitHub

At this stage, you should be experimenting with different ways to layout the page until you have a solid layout that is robust. This is a great time to try out different techniques and learn new approaches to layout, such as CSS Grid and Flexbox.

Once you are comfortable with your layout system, you can go ahead and remove the commented code.

/* GLOBAL RESETS */
* { box-sizing: border-box; }
body { margin: 0; }
/* GLOBAL COLORS */
body {
background-color: rgba(0,0,0,.8);
color: rgba(255,255,255,.8);
}
a { color: rgba(255,255,255,.9);}
/* BESPOKE LAYOUT STRUCTURE */
body {
min-height: 100vh;;
display: grid;
grid-template-rows: auto 1fr auto;
}
.site-header {
display: flex;
justify-content: space-between;
}
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
* {
/* margin: 0; padding: 0;
box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 1) !important;
background-color: rgba(146, 21, 21, 0.05) !important;
color: rgba(0, 0, 0, .4) !important; */
/* background-image: none !important; */
/* border-color: rgba(0,0,0,0) !important; */
}
/* body { background-color: rgba(255,255,0,.2) !important; }
.site-id { background-color: rgba(255,0,0,.2) !important; }
.site-nav { background-color: rgba(0,255,0,.2) !important; }
.site-footer { background-color: rgba(0,0,255,.2) !important; } */

Add CSS Table of Contents and Base Styling

Once you have a stable setup, be sure to pause and clean up your code by adding comments, a table of contents at the top, and any base styling that you will need, such as your base typography (e.g. a type specimen) and commonly used UI elements (e.g. buttons).

CSS Table of Contents
/* CSS TABLE OF CONTENTS
# GLOBALS
# RESET
# COLORS
# TYPOGRAPHY
# HEADINGS
# PARAGRAPHS
# LINKS
# TYPE SPECIMEN
# MEDIA
# IMAGES
# COMPONENTS
# BUTTONS
# LAYOUT
# CONTAINER
# BESPOKE LAYOUT HELPERS
# STRUCTURE
# HEADER
# FOOTER
# NAV
# MAIN
# SECTIONS
# ANIMATIONS
# @KEYFRAME
# SCROLL-TRIGGERED
*/
view raw mp3-css-toc.css hosted with ❤ by GitHub
CSS Globals (Reset, Colors, & Typography)
/* GLOBAL RESETS */
* { box-sizing: border-box; }
body { margin: 0; }
/* GLOBAL COLORS */
body {
background-color: rgba(221,221,221,1);
color: rgba(0,0,0,.8);
}
a { color: rgba(0,0,0,.9);}
a:hover { color: rgba(0, 0, 0, 1); }
/* GLOBAL TYPOGRAPHY */
body {
font-family: "Rubik", Helvetica, Arial, sans-serif;
font-weight: 400;
font-size: 87.5%; /* 14px */
line-height: 1.4;
}
h1,h2,h3 { font-weight: normal; }
p { max-width: 35em; }
a { text-decoration: none;}
/* TYPE SPECIMEN */
.headline {
font-size: 4em;
font-weight: 400;
line-height: 1;
margin: 0 0 .4em 0;
}
.subheadline {
font-size: 2em;
font-weight: 300;
line-height: 1;
margin: 0 0 .6em 0;
color: rgba(0,0,0,.5);
}
CSS Responsive Images and Default Buttons
/* MEDIA */
img {
max-width: 100%;
height: auto;
}
/* BUTTONS */
.button {
display: inline-block;
border: 1px solid rgba(0, 0, 0, 0.5);
border-radius: 3em;
padding: 1em 2em;
margin: .5em;
}
.button:hover {
background: rgba(0, 0, 0, 1);
color: rgba(255,255,255,1);
border-color: rgba(0, 0, 0, 1);
}
CSS Layout & Site Structure
/* LAYOUT */
.container {
max-width: 1000px;
margin: 0 auto;
}
/* STRUCTURE */
.site-header,
.site-footer {
text-align: center;
margin: 1em 0;
padding-bottom: 1em;
}
.site-header {
display: flex;
justify-content: space-between;
position: absolute;
width: 100%;
}
.site-header h1 {
font-size: 1.5em;
font-weight: 400;
margin: 0;
}
.site-header h1 a {
color: rgba(0, 0, 0, 0.5);
text-transform: uppercase;
letter-spacing: 0.1em;
padding: 1em;
display: inline-block;
transition: .2s ease-out all;
}
.site-header h1 a:hover {
color: rgba(0, 0, 0, 1);
}
/* SITE NAV */
.site-navigation ul {
padding: 0;
margin: 1em 1.5em 0 0;
}
.site-navigation ul li {
display: inline-block;
}
.site-navigation ul li a {
display: block;
padding: 1em 0.5em;
margin: 0 .2em;
color: rgba(0, 0, 0, 0.5);
text-transform: uppercase;
letter-spacing: 0.1em;
border-bottom: 2px solid rgba(0, 0, 0, 0);
transition: .2s ease-out all;
}
.site-navigation ul li a:hover {
border-bottom: 2px solid rgba(0, 0, 0, 0.2);
color: rgba(0, 0, 0, 1);
}
.site-navigation ul li a.selected {
border-bottom: 2px solid rgba(0, 0, 0, 0.5);
}
/* MAIN CONTENT */
main { padding: 5em 0; }
section {
padding: 2em;
min-height: 90vh;
display: grid;
align-items: center;
justify-content: center;
}

Completed Home Page

Continue to add final content and styling until you get a complete home page.

HTML
<body>
<header class="site-header fade-in-and-down">
<div class="site-identity">
<h1><a href="index.html">John Doe</a></h1>
</div>
<nav class="site-navigation">
<ul>
<li><a href="index.html" class="selected">Work</a></li>
<li><a href="about.html">About</a></li>
</ul>
</nav>
</header>
<main>
<section class="featuredproject">
<div class="image-wrapper">
<a href="mybook/index.html"><img src="img/placeholder-1x1-book3.jpg" alt="Placeholder" /></a>
</div>
<div class="text-wrapper">
<h2 class="headline">Book Project</h2>
<h3 class="subheadline">Featured Project #1</h3>
<p>Short description of the featured product. Phasellus quis lorem eu purus condimentum rhoncus. Nunc id
elementum mi, non venenatis sem. Curabitur iaculis velit id imperdiet pretium.</p>
<a href="mybook/index.html" class="button">View Book Details</a>
</div>
</section>
<section class="featuredproject swapped">
<div class="image-wrapper">
<a href="#"><img src="img/placeholder-1x1-hero.jpg" alt="Placeholder" /></a>
</div>
<div class="text-wrapper">
<h2 class="headline">Second Project</h2>
<h3 class="subheadline">Subheader lorem ipsum</h3>
<p>Short description of the featured product. Phasellus quis lorem eu purus condimentum rhoncus. Nunc id
elementum mi, non venenatis sem. Curabitur iaculis velit id imperdiet pretium.</p>
<a href="#" class="button">Project #2 Details</a>
</div>
</section>
<section class="featuredproject">
<div class="image-wrapper">
<a href="#"><img src="img/placeholder-1x1-video.jpg" alt="Placeholder" /></a>
</div>
<div class="text-wrapper">
<h2 class="headline">Third Project</h2>
<h3 class="subheadline">Subheader lorem ipsum</h3>
<p>Short description of the featured product. Phasellus quis lorem eu purus condimentum rhoncus. Nunc id
elementum mi, non venenatis sem. Curabitur iaculis velit id imperdiet pretium.</p>
<a href="#" class="button">View Project #3</a>
</div>
</section>
</main>
<footer class="site-footer">
<nav class="site-navigation">
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
</ul>
</nav>
</footer>
</body>
view raw mp3-final1.html hosted with ❤ by GitHub
CSS for Featured Project Sections
/* FEATURED PROJECTS ON HOME PAGE */
@media (min-width: 768px) {
.featuredproject {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1200px;
margin: 0 auto;
}
.featuredproject.swapped {
flex-direction: row-reverse;
}
.featuredproject .image-wrapper {
width: 49%;
}
.featuredproject .text-wrapper {
width: 49%;
padding: 3em;
}
}

When you are done, the home page should look like this:

See the Pen Custom Portfolio Test #0.2 by kccnma (@kccnma) on CodePen.0

Once the home page is stable, the next step will be to create some subpages, starting with the following:

  • projectname/index.html
  • about.html

Next Steps: Continue adding more pages with real content

After the home page is secure, along with at least one project/portfolio entry sub page, you can move on to add all pages with real content. As you add all sub pages and content, be sure to test on multiple devices and screen sizes and try designing-as-you-code. You might find it helpful (and easier at times) to design in the browser instead of in your usual design application.

For the completed version with sub pages and additional css (e.g. circular image helper), see the demo and source code via the links below:

See a Demo
https://laulima.hawaii.edu/access/content/group/21336a81-b8f0-4b8c-8059-ba1b1b192128/public/tests/portfolios/myportfolio3/

View on Github
https://github.com/kccnma/teachingmaterials/tree/master/myportfolio3/

View on Codepen
https://codepen.io/kccnma/pen/NWqKppJ


Be sure to customize it to meet your goals and needs. Have fun!

Summary

Coding your online portfolio is never an easy task. There are so many ways to present your work, so which way is best? Unfortunately, there is no right or wrong answer—only you can make this decision. The good news is that you can use your online portfolio as a great excuse to practice writing custom hand-written code from scratch because the best way to become a stronger web designer and front-end web developer is to create web sites.  The more custom coded sites you make, the easier it will get as you develop your own best practices for writing code and solving code-related UX and UI problems.

Related Resources and Reading

Go Further

Author Notes

This was written specifically to help aspiring web designers as they aim to:

  • Synthesize the concepts and skills garnered as a designer and front-end web developer by showcasing a culmination of projects in a custom designed and coded bespoke interface that integrates conceptual thinking and aesthetic application.