Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add Learn Pseudo-classes workshops #569

Merged
merged 5 commits into from
Sep 18, 2024
Merged
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
34 changes: 34 additions & 0 deletions frontend-cert/css-projects/pseudo-classes-workshop/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Greeting Card</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>

<div class="card" id="greeting-card">
<h1>Happy Birthday!</h1>
<p class="message">
Wishing you all the happiness and joy on your special day!
</p>

<div class="card-links">
<a href="#send" class="send-link">Send Card</a>
<a href="#share" class="share-link">Share on Social Media</a>
</div>
</div>

<section id="send">
<h2>Sending your card...</h2>
<p>Card successfully sent to your recipient!</p>
</section>

<section id="share">
<h2>Sharing your card...</h2>
<p>Your card was shared on social media!</p>
</section>

</body>
</html>
87 changes: 87 additions & 0 deletions frontend-cert/css-projects/pseudo-classes-workshop/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
body {
font-family: 'Arial', sans-serif;
background-color: brown;
padding: 40px;
text-align: center;
}

.card {
background-color: white;
border-radius: 10px;
padding: 40px;
box-shadow: 0 4px 8px gray;
transition: transform 0.3s, background-color 0.3s ease;
max-width: 400px;
margin: 0 auto;
}

.card:hover {
transform: scale(1.1);
background-color: khaki;
}

h1::before {
content: "🥳 ";
}

h1::after {
content: " 🥳";
}

.message {
font-size: 1.2em;
color: grey;
margin-bottom: 20px;
}

.card-links {
display: flex;
justify-content: space-around;
margin-top: 20px;
}

.card-links a {
text-decoration: none;
font-size: 1em;
padding: 10px 20px;
border-radius: 5px;
color: white;
background-color: midnightblue;
transition: background-color 0.3s ease;
}

.card-links a:hover {
background-color: orangered;
}

.card-links a:active {
background-color: midnightblue;
}

.card-links a:focus {
outline: 2px solid yellow;
}

.card-links a:visited {
color: crimson;
}

section {
display: none;
margin-top: 40px auto;
max-width: 600px;
margin: 20px auto;
}

section:hover{
transform: skewX(10deg);
}

section:target {
display: block;
margin: 40px auto;
background-color: whitesmoke;
padding: 20px;
border-radius: 10px;
}