Skip to content

Instantly share code, notes, and snippets.

@loicpw
Created January 22, 2019 17:37
Show Gist options
  • Save loicpw/82aec49665d53a247197670002e2ca32 to your computer and use it in GitHub Desktop.
Save loicpw/82aec49665d53a247197670002e2ca32 to your computer and use it in GitHub Desktop.
Responsive Web Design Projects - Build a Personal Portfolio Webpage
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!--
Hello Camper!
For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding!
- The freeCodeCamp Team
-->
<head>
<title>Responsive Web Design Projects - Build a Personal Portfolio Webpage</title>
</head>
<body>
<header>
<nav id="navbar">
<a href="#welcome-section" class="nav-link">About</a>
<a href="#projects" class="nav-link">Work</a>
<a href="#contacts" class="nav-link">Contact</a>
</nav>
</header>
<main>
<section id="welcome-section" class="main-section">
<h1>Hey i'am Mimic.</h1>
<p>a web developer</p>
</section>
<section id="projects" class="main-section">
<h2>These are some of my projects..</h2>
<div id="projects-content">
<a href="https://codepen.io/FreeCodeCamp/pen/NNvBQW" class="project-tile"><img src="https://cloud.githubusercontent.com/assets/15967809/17642794/d084d718-6171-11e6-83fa-ede5d0a67ad2.png" alt="tribute page preview">
Tribute page</a>
<a href="https://codepen.io/FreeCodeCamp/pen/ONjoLe" class="project-tile"><img src="https://cloud.githubusercontent.com/assets/15967809/17642771/7cd6a0c4-6171-11e6-87fb-915f6084d104.png" alt="random quote machine preview">Random quote machine</a>
<a href="https://codepen.io/FreeCodeCamp/pen/PNKdjo" class="project-tile"><img src="https://cloud.githubusercontent.com/assets/15967809/17642772/7d02406c-6171-11e6-8c79-40a2933163dc.png" alt="javascript calculator preview">JavaScript calculator</a>
<a href="https://codepen.io/FreeCodeCamp/pen/mVEJag" class="project-tile"><img src="https://cloud.githubusercontent.com/assets/15967809/17642773/7d08cb94-6171-11e6-8c45-22e7cf64683e.png" alt="map data across the globe preview">Map data across the globe</a>
<a href="https://codepen.io/FreeCodeCamp/pen/wGqEga" class="project-tile"><img src="https://cloud.githubusercontent.com/assets/15967809/17642774/7d091806-6171-11e6-8d47-ecf2f2833fe2.png" alt="wikipedia viewer preview">Wikipedia viewer</a>
<a href="https://codepen.io/FreeCodeCamp/pen/KzXQgy" class="project-tile"><img src="https://cloud.githubusercontent.com/assets/15967809/17642775/7d354304-6171-11e6-8b56-66eee4681d88.png" alt="tic tac toe game preview">Tic Tac Toe game</a>
</div>
<a href="https://codepen.io/FreeCodeCamp/" target="_blank" id="show-all">show all</a>
</section>
<section id="contacts" class="main-section">
<h2>Let's work together...</h2>
<p>How do you take your coffee?</p>
<div id="contacts-content">
<div id="fcbk"><a href="https://facebook.com/freecodecamp" target="_blank">Facebook</a></div>
<div id="github"><a href="https://github.com/freecodecamp" target="_blank" id="profile-link">GitHub</a></div>
<div id="twitter"><a href="https://twitter.com/freecodecamp" target="_blank">Twitter</a></div>
<div id="email"><a href="mailto:[email protected]" target="_blank">Send a mail</a></div>
<div id="tel"><a href="tel:555-555-5555" target="_blank">Call me</a></div>
</div>
</section>
</main>
<footer>
<p><em>**This is just a fake portfolio.. All the projects and contact details given are not real..</em></p>
<p>© Created for FreeCodeCamp</p>
</footer>
</body>

Responsive Web Design Projects - Build a Personal Portfolio Webpage

Responsive Web Design Projects - Build a Personal Portfolio Webpage - freecodecamp

A Pen by Loïc Peron on CodePen.

License.

// !! IMPORTANT README:
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.
/***********
INSTRUCTIONS:
- Select the project you would
like to complete from the dropdown
menu.
- Click the "RUN TESTS" button to
run the tests against the blank
pen.
- Click the "TESTS" button to see
the individual test cases.
(should all be failing at first)
- Start coding! As you fulfill each
test case, you will see them go
from red to green.
- As you start to build out your
project, when tests are failing,
you should get helpful errors
along the way!
************/
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!
// Once you have read the above messages, you can delete all comments.
body {
font-family: 'Open Sans',Arial,sans-serif;
--theme-color: 77;
background-color: hsl(var(--theme-color, 100), 50%, 90%);
margin: 0px;
padding: 0px;
}
header {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
padding-top: 10px;
z-index: 1;
background-color: hsl(var(--theme-color, 100), 50%, 90%);
display: flex;
flex-direction: column;
align-items: flex-end;
}
#navbar {
margin-right: 20px;
}
#navbar a {
margin: 4vw;
text-decoration: inherit;
color: black;
}
main section {
height: 100vh;
}
h1 {
margin-top: 35vh;
padding-top: 40px;
}
h2 {
text-align: center;
padding-top: 20px;
}
#welcome-section {
min-height: 100px;
text-align: center;
}
#projects {
background-color: hsl(var(--theme-color2, 100), 50%, 100%);
padding-bottom: 20px;
height: auto;
display: flex;
flex-direction: column;
align-items: center;
max-width: 100%;
}
#projects h2 {
margin-bottom: 30px;
}
#projects-content {
display: grid;
grid-template-columns: 1fr 1fr;
grid-column-gap: 6vw;
grid-row-gap: 6vh;
max-width: 900px;
margin-left: 20vw;
margin-right: 20vw;
justify-items: center;
align-items: center;
}
#projects img {
width: 100%;
height: 100%;
}
#projects-content a {
display: grid;
grid-template-rows: 1fr 35px;
align-items: center;
justify-items: center;
text-align: center;
border-style: solid;
width: 300px;
height: 210px;
text-decoration: none;
color: black;
border-width: 2px;
border-style: outset;
border-color: hsl(var(--theme-color, 100), 0%, 20%);
background-color: hsl(var(--theme-color, 100), 0%, 95%);
}
#show-all {
border: solid;
border-width: 1px;
border-radius: 15px;
text-decoration: none;
padding: 7px;
padding-left: 15px;
padding-right: 15px;
margin-top: 25px;
text-align: center;
color: black;
border-color: hsl(var(--theme-color, 100), 50%, 72%);
background-color: hsl(var(--theme-color, 100), 0%, 95%);
}
#show-all:hover {
animation-name: show-all-bg;
animation-duration: 600ms;
animation-fill-mode: forwards;
animation-iteration-count: infinite;
animation-timing-function: ease;
}
@keyframes show-all-bg {
50% {
background-color: hsl(var(--theme-color, 100), 90%, 80%);
transform: scale(1.05);
}
100% {
background-color: hsl(var(--theme-color, 100), 50%, 87%);
transform: scale(1.1);
}
}
#contacts {
display: flex;
flex-direction: column;
align-items: center;
min-height: 280px;
}
#contacts h2 {
margin-top: 50px;
margin-bottom: 0px;
}
#contacts p {
margin-bottom: 30px;
}
#contacts-content {
display: flex;
align-items: center;
flex-wrap: wrap;
}
#contacts a {
display: inline-block;
line-height: 100px;
width: 100px;
height: 100px;
text-align: center;
border: solid;
border-width: 1px;
border-radius: 50%;
text-decoration: none;
color: black;
background-color: hsl(var(--theme-color, 100), 50%, 72%);
margin-left: 2vw;
margin-right: 2vw;
}
header, .main-section, footer {
padding-left: 5px;
padding-right: 5px;
}
footer {
padding-top: 5px;
padding-bottom: 5px;
text-align: center;
background-color: hsl(var(--theme-color, 100), 50%, 82%);
}
@media(max-width: 700px) {
#projects-content a {
width: 240px;
height: 168px;
}
}
@media(max-width: 650px) {
#tel {
grid-column: 2 / 4;
margin: auto;
}
#contacts-content {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-template-rows: 1fr 1fr;
grid-gap: 10px;
}
#contacts {
min-height: 390px;
}
}
@media(max-width: 570px) {
#projects-content {
grid-template-columns: 1fr;
}
}
@media(max-width: 550px) {
#contacts-content {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr 1fr;
}
#tel {
grid-column: 1 / 3;
grid-row: 3;
}
#contacts {
min-height: 500px;
}
}
@westobaba
Copy link

really helpful.....thanks

@chndr44p
Copy link

ty mate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment