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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# cssBayan
# cssBayan
https://allaprischepa.github.io/cssBayan/cssBayan/index.html
Binary file added cssBayan/assets/debugging.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cssBayan/assets/googling-stuff.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cssBayan/assets/website-is-done.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cssBayan/assets/working-in-it.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions cssBayan/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cssBayan</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Rubik&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>

<body>
<div class="accordion">
<h1>cssBayan</h1>
<div class="items">
<div class="item">
<input type="radio" id="chck1" name="accordion" checked="checked">
<label class="item-label" for="chck1">
<div class="item-label-header" >
<span class="item-text">Working in IT</span>
<i class="fa item-icon">&#xf067;</i>
</div>
<div class="item-content">
<img src="assets/working-in-it.jpg">
</div>
</label>
</div>
<div class="item">
<input type="radio" id="chck2" name="accordion">
<label class="item-label" for="chck2">
<div class="item-label-header">
<span class="item-text">Website is done</span>
<i class="fa item-icon">&#xf067;</i>
</div>
<div class="item-content">
<img src="assets/website-is-done.jpg">
</div>
</label>
</div>
<div class="item">
<input type="radio" id="chck3" name="accordion">
<label class="item-label" for="chck3">
<div class="item-label-header">
<span class="item-text">Debugging</span>
<i class="fa item-icon">&#xf067;</i>
</div>
<div class="item-content">
<img src="assets/debugging.jpg">
</div>
</label>
</div>
<div class="item">
<input type="radio" id="chck4" name="accordion">
<label class="item-label" for="chck4">
<div class="item-label-header">
<span class="item-text">Googling stuff</span>
<i class="fa item-icon">&#xf067;</i>
</div>
<div class="item-content">
<img src="assets/googling-stuff.jpg">
</div>
</label>
</div>
</div>
</div>
</body>

</html>
117 changes: 117 additions & 0 deletions cssBayan/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/* Mobile first */
body {
background: #ebe8e5;
color:#252525;
font-family: 'Rubik', sans-serif;
font-size: 3vw;
}
h1 {
margin: 0.5em 0;
}

.accordion {
max-width: 80vw;
padding: 0.5em;
margin:auto;
}
.accordion input {
display: none;
}
.accordion .item {
overflow: hidden;
}
.accordion .item .item-label {
cursor: pointer;
}
.accordion .item .item-label-header {
display: flex;
justify-content: space-between;
padding: 1em 0.5em;
font-weight: bold;
border-top: 1px gray solid;
}
.accordion .item-label-header {
color:#0300cf;
}

.accordion .item .item-content {
opacity: 0;
height: 0;
width: 0;
padding: 0;
margin: auto;
text-align: center;
}
.accordion .item .item-content img {
width: 80%;
}

/* When checked */
.accordion input:checked + .item-label .item-label-header {
color: inherit;
}
.accordion input:checked + .item-label .item-label-header .item-icon {
transform: rotate(45deg);
transition: all 0.2s;
}
.accordion input:checked ~ .item-label .item-content {
opacity: 1;
height: auto;
width: 100%;
padding-bottom: 1em;
transition: all 0.5s;
}

/* When cliked */
.accordion .item-label:active {
color: #0300cf;
opacity: 0.5;
}

/* Tablet */
@media only screen and (min-width: 768px) {
body {
font-size: 2vw;
}
.accordion {
max-width: 70vw;
}
}

/* Desktop */
@media only screen and (min-width: 992px) {
body {
font-size: 1.3vw;
}
.accordion {
max-width: 60vw;
}
.accordion .item .item-content img {
width: 60%;
}
}

/* Hover query*/
@media (hover:hover) {
.accordion .item-icon {
display: none;
}
.accordion .items:hover .item-icon {
display: block;
}
.accordion .items:hover .item-label-header {
color: inherit;
}

.accordion .item-label:hover .item-content {
opacity: 1;
height: auto;
width: 100%;
padding-bottom: 1em;
transition: all 0.5s;
}
.accordion .item-label:hover .item-label-header .item-icon {
transform: rotate(45deg);
transition: all 0.2s;
}
}