Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</head>

<body>
<div class="header">
<header>

<a href="#">
<img
Expand All @@ -30,28 +30,28 @@
/>
</a>

<div>
<ul class="navigation__list">
<li class="navigation__item">
<a class="navigation__link" href="#">Home</a>
<nav>
<ul class="navigation-list"> <!-- Refactor the class names -->
<li class="navigation-item">
<a class="navigation-link" href="#">Home</a>
</li>
<li class="navigation__item">
<a class="navigation__link" href="#">About Us</a>
<li class="navigation-item">
<a class="navigation-link" href="#">About Us</a>
</li>
<li class="navigation__item">
<a class="navigation__link" href="#">News & Events</a>
<li class="navigation-item">
<a class="navigation-link" href="#">News & Events</a>
</li>
<li class="navigation__item">
<a class="navigation__link" href="#">Contact Us</a>
<li class="navigation-item">
<a class="navigation-link" href="#">Contact Us</a>
</li>
</ul>
</div>
</nav>

<button>Donate Now</button>
<button class="button-orange">Donate Now</button>

</div>
</header>

<div class="content">
<main class="content">
<div class="main">
<div class="alert">
You've helped us give <span class="text-highlight">72</span> bikes
Expand All @@ -64,14 +64,14 @@ <h1>Bikes for Refugees</h1>
Providing donated bikes and accessories to refugees and asylum
seekers in Scotland.
</p>
<button>Donate a bike today</button>
<button>Volunteer</button>
<button class="button-orange">Donate a bike today</button>
<button class="button-white">Volunteer</button>
</div>

<div>
<h2 class="heading-underline">Learn more</h2>

<div>
<div class="articles-container"> <!-- giving an extra class so I can divide the article part -->
<div class="article">
<h3 class="article__title">Why do refugees need bikes?</h3>
<p class="article__summary">
Expand Down Expand Up @@ -105,14 +105,14 @@ <h3 class="article__title">How can I help?</h3>
</div>
</div>

<div class="sidebar">
<h2 class="heading-underline">Upcoming events</h2>
<aside>
<h2 class="heading-sidebar-underline">Upcoming events</h2>

<div class="article">
<img
class="article__thumbnail"
src="spring-fundraisers_thumbnail.jpg"
alt=""
src="images/spring-fundraisers_thumbnail.jpg"
alt="spring fundraisers thumbnail"
/>
<div class="article__content">
<h3 class="article__title">
Expand All @@ -128,8 +128,8 @@ <h3 class="article__title">
<div class="article">
<img
class="article__thumbnail"
src="bikes-for-refugees_logo.jpg"
alt=""
src="images/bikes-for-refugees_logo.jpg"
alt="bikes for refugees logo"
/>
<div class="article__content">
<h3 class="article__title">
Expand All @@ -141,8 +141,8 @@ <h3 class="article__title">
<div class="article">
<img
class="article__thumbnail"
src="edinburgh-damascus_thumbnail.png"
alt=""
src="images/edinburgh-damascus_thumbnail.png"
alt="edinburgh damascus bikerider thumbnail"
/>
<div class="article__content">
<h3 class="article__title">
Expand All @@ -163,17 +163,17 @@ <h3 class="article__title">
<span class="fa fa-facebook-square"></span>
All Facebook events
</a>
</div>
</div>
</aside>
</main>

<div class="footer">
<footer>
<div class="footer__content">
<p>
<strong>Bikes for Refugees Scotland is a volunteer-led project to help
people explore and make connections with their local communities.</strong>
</p>
<p>Website by Code Your Future</p>
</div>
</div>
</footer>
</body>
</html>
124 changes: 101 additions & 23 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ p {
margin-bottom: 0;
}

.header,
.content,
.footer {
header,
main, /* Wrote content but your HTML has <main class="content">,
not a <content> element */
footer {
padding: 0 1.5rem;
max-width: 1200px;
margin: 0 auto;
}

/* Header */

.header {
header {
display: flex;
align-items: center;
justify-content: space-between;
Expand All @@ -60,28 +61,33 @@ p {

/* Navigation */

.navigation__list {
.navigation-list {
display: flex;
list-style: none;
}

.navigation__item {
padding: 0.5rem 0;
.navigation-item {
padding: 0.5rem 1.5rem; /* Add spacing to Left/right padding */
}

.navigation__link {
.navigation-link:hover, /* Add navigation hover effect --orange-dark */
.navigation-link:focus {
color: var(--orange-dark);
transform: translateY(-3px);
}

.navigation-link {
color: var(--grey-dark);
font-weight: 600;
text-transform: uppercase;
text-decoration: none;
}


/* Text styles */

.text-highlight {
color: var(--orange-dark);
font-weight: 600;
color: var(--grey-dark); /* fix accessability contrast for Lighthouse */
font-weight: 700;
}

.arrow-right {
Expand All @@ -92,15 +98,43 @@ p {
border-left-color: var(--orange-dark);
}


/* Buttons */

/* INSERT BUTTON STYLES HERE */
button {
padding: 0.75em 1.5em;
border-radius: 0.2em;
border: 0;
font-weight: 700;
font-size: 1.2em;
}

.button-orange {
background-color: var(--orange-dark);
color: var(--white);
border: 1px solid var(--orange-dark);
}

.button-orange:hover, /* Add first hover effect on orange buttons */
.button-orange:focus {
background: var(--white);
color: var(--orange-dark);
border: 1px solid var(--orange-dark);
}

/* Content */
.button-white {
background-color: var(--white);
color: var(--orange-dark);
border: 1px solid var(--white);
}

.content {
.button-white:hover, /* Add second hover effect on white buttons */
.button-white:focus {
background: var(--orange-dark);
color: var(--white);
border: 1px solid var(--white);
}

main {
display: flex;
flex-direction: column;
}
Expand All @@ -120,8 +154,12 @@ p {
/* hero */

.hero {
background-image: url("header-bike.jpg");
background-image: url("../images/header-bike.jpg");
background-color: var(--grey-light);
background-size: cover;
background-position: center;
color: var(--white);
padding: 9rem 1.5rem ; /* padding: Top/bottom & Left/right */
}

.hero h1 {
Expand All @@ -138,11 +176,21 @@ p {
/* Headings */

.heading-underline {
position: relative;
margin-bottom: 1rem;
padding-top: 3rem;
border-bottom: 2px solid var(--orange-light);
font-size: 1.2rem; /* Increased the font size slightly */
font-weight: 600;
text-transform: uppercase;
}

.heading-sidebar-underline {
position: relative;
margin-bottom: 2rem;
padding-bottom: 0.5rem;
padding-top: 0rem;
border-bottom: 2px solid var(--orange-light);
font-size: 1rem;
font-size: 1.2rem; /* Increased the font size slightly */
font-weight: 600;
text-transform: uppercase;
}
Expand All @@ -152,19 +200,38 @@ p {
position: absolute;
bottom: -2px;
left: 0;
width: 25%;
width: 30%;
height: 2px;
max-width: 100px;
background: var(--orange-dark);
}

.heading-sidebar-underline:before {
content: "";
position: absolute;
bottom: -2px;
left: 0;
width: 60%;
height: 2px;
max-width: 150px;
background: var(--orange-dark);
}


/* Article */

.article {
border: 1px solid var(--grey-light);
padding: 1rem;
margin-bottom: 1rem;
}

/* display: flex puts the two articles side by side, gap adds space between them */
.articles-container {
display: flex;
gap: 2rem;
}

.article__title {
margin-bottom: 0.5rem;
font-size: 1rem;
Expand All @@ -183,7 +250,8 @@ p {

.article__thumbnail {
object-fit: contain;
width: 5rem;
width: 7rem;
height: auto;
}

.article__read-more {
Expand All @@ -209,19 +277,29 @@ p {

.facebook-link {
color: var(--orange-dark);
text-align: end; /* Added text align to "end" got the option in dropdown menu,
looked it up and end we use mostly for multilingual site...
For flexible, direction-aware alignment .*/
}

/* Sidebar */

.sidebar {
aside {
display: flex;
flex-direction: column;
min-width: 350px;
}

aside .article { /* created a new class for our sidebar articles */
display: flex;
gap: 1rem;
margin-bottom: 2rem;
align-items: center;
}

/* Footer */

.footer {
footer {
margin-top: 2rem;
}

Expand All @@ -240,7 +318,7 @@ p {
/* Media queries */

@media screen and (min-width: 992px) {
.content {
main {
flex-direction: row;
}

Expand Down