Help Wanted
by enbette
HTML
<div class="main">
<div class="wrapper">
<div class="textDiv">
<br />
<img
src="https://i.ibb.co/Z1RLNgQN/Help-Wanted-Text.png"
alt="Help-Wanted-Text"
style="display: block; margin: auto"
/>
<p class="centered">
Do you miss the
<span style="color: #ed2450">Monthly Magazine</span> and
<span style="color: #ed2450">NewsTeam</span>?<br />
Want to be a part of making iconic VP magazine articles?<br />
Come join the group of volunteer VP users bringing back those
nostalgic vibes<br /><br />
We are looking for:
</p>
<div class="roleCard centered">
<span class="roleCardText writers deselectedTab">Writers</span>
</div>
<div class="tab closed" id="writers">
<p class="infoP">
As a writer you are expected to help out with writing articles for
the magazine, but also to proofread the texts you write and/or
help the other writers with proofreading.
</p>
<p class="infoP">
You are also expected to communicate with the layouter and coder
for your articles.
</p>
<p class="infoP">
There are no expectations to what you write about, we might have a
few pages that are expected to be in each magazine – such as this
application article. Other than that, you can write about whatever
your heart desires!
</p>
</div>
<div class="roleCard centered">
<span class="roleCardText layouters deselectedTab"
>Page Layouters</span
>
</div>
<div class="tab closed" id="layouters">
<p class="infoP">
As a layouter you are expected to...
CSS
canvas {
background-color: #f1f1f1;
}
.main {
background-image: url(https://i.ibb.co/3YzswQmG/Help-Wanted.png);
background-repeat: no-repeat;
width: 688px;
height: 500px;
}
body {
width: 688px;
height: 500px;
}
.wrapper {
position: absolute;
top: 8px;
left: 8px;
width: 680px;
background-color: #f8fdfdbd;
border-radius: 0px;
border-style: solid;
border-color: #ff94ba;
border-width: 5px;
overflow: hidden;
}
.textDiv::-webkit-scrollbar {
width: 8px;
}
.textDiv::-webkit-scrollbar-thumb:hover {
background-color: #ff94ba;
}
/* The area behind scrollbar */
.textDiv::-webkit-scrollbar-track {
background: transparent;
border-radius: 10px;
}
/* Customize the bar moving inside the tracker */
.textDiv::-webkit-scrollbar-thumb {
background-color: #a1e1ff;
border-radius: 0px;
}
.textDiv {
overflow-y: scroll;
min-height: 492px;
max-height: 492px;
}
.centered {
text-align: center;
}
p {
font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.roleCard {
font-family: serif;
font-size: 20px;
margin-bottom: 8px;
background: RGBA(235, 251, 255, 0.0);
background: linear-gradient(90deg,rgba(235, 251, 255, 0) 0%, rgba(242, 251, 255, 1) 30%, rgba(242, 251, 255, 1) 70%, rgba(235, 251, 255, 0) 100%);
}
.roleCardText {
color: #0e9db1;
transition: color 0.28s ease;
}
.roleCardText.unchecked {
-webkit-box-shadow: 0px 5px 0px 0px rgba(58, 148, 250, 1);
-moz-box-shadow: 0px 5px 0px 0px rgba(58, 148, 250, 1);
box-shadow: 0px 5px 0px 0px rgba(58, 148, 250, 1);
}
.roleCardText:hover {
cursor: pointer;
}
.writers:hover {
color: #ed2450;
}
.layouters:hover {
color: #ed2450;
}
.coders:hover {
color: #ed2450;
}
.general:hover {
color: #ed2450;
}
.application:hover {
color: #ed2450;
}
.deselectedTab {
animation: 0.5s 1 forwards slide-out;
}
.selectedTab {
animation: 0.5s 1 forwards slide-in;
}
@keyframes slide-in...
JavaScript
let btns = document.getElementsByClassName("roleCardText")
let panels = document.getElementsByClassName("panel")
let totalBtns = btns.length
Array.from(btns).forEach((tab) => tab.addEventListener("click", setActive))
function setActive(e) {
if (e.srcElement.classList.contains("deselectedTab")) {
e.srcElement.classList.replace("deselectedTab", "selectedTab")
document
.getElementById(e.srcElement.classList[1])
.classList.replace("closed", "opened")
} else {
e.srcElement.classList.replace("selectedTab", "deselectedTab")
document
.getElementById(e.srcElement.classList[1])
.classList.replace("opened", "closed")
}
}