Skip to content

Commit

Permalink
Issue #990
Browse files Browse the repository at this point in the history
Redesgining wrapper section
-> shortened counter time
-> improved the font sizes color and background of the section
  • Loading branch information
Jasleen1210 committed Jul 9, 2024
1 parent 44acf84 commit d003a1b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 32 deletions.
48 changes: 26 additions & 22 deletions counter.css
Original file line number Diff line number Diff line change
@@ -1,70 +1,74 @@


/* counter */
/* counter */
.wrapper {

width: 80%;

background-image: url('./img/img1.jpeg');
/* background: no-repeat fill; */
width: 100vw;
margin-left: auto;
margin-right: auto;
align-items: center;
display: flex;
justify-content: space-between;
justify-content: space-evenly;

}
.countitem {
width: 28vmin;
height: 28vmin;
height: 33vmin;
display: flex;
flex-direction: column;
justify-content: space-around;
padding: 1em 0;
font-size: 16px;
border-width: 0.5px ;
border-color: solid purple;
border-radius: 0.5em;
background: linear-gradient(white,rgb(153, 139, 251));
border-bottom: 10px solid #40349c;
/* border-color: solid purple; */
/* border-radius: 0.5em; */
/* background: linear-gradient(white,rgb(153, 139, 251)); */
/* border-bottom: 10px solid #40349c; */
}
.countitem i {
color: #06006e;
color: #052905;
font-size: 2.5em;
text-align: center;
}
span.num {
color: #32316a;
color: #052905;
display: grid;
place-items: center;
font-weight: 600;
font-size: 3em;
}
span.text {
color: #6c2121;
font-size: 1.2em;
font-weight: bold;
color: #0f0f0f;
font-size: 1.5rem;
text-align: center;
padding: 0em 00em;
font-weight: 400;
margin-bottom: 1em;
line-height: 0;
}

@media screen and (max-width: 1024px) {
.wrapper {
/* .wrapper {
width: 85vw;
}
} */
.countitem{
height: 26vmin;
width: 26vmin;
font-size: 12px;
}
}
@media screen and (max-width: 768px) {
@media screen and (max-width: 900px) {
.wrapper {
width: 90vw;
/* width: 90vw; */
background-image: none;
flex-direction: column;
flex-wrap: wrap;
gap: 30px;
gap: 10px;
}
.countitem {
background-color: antiquewhite;
width: calc(50% - 40px);
margin: 3px;
height: 30vmin;
font-size: 14px;
}
Expand All @@ -74,7 +78,7 @@
gap: 15px;
}
.countitem {
width: 100%;
width: 90%;
height: 25vmin;
font-size: 8px;
}
Expand Down
24 changes: 14 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,17 @@ <h2 data-max="30" id="test">+ Developers</h2>
<div class="wrapper">
<div class="countitem">
<i class="fa-solid fa-handshake-angle"></i>
<span class="num" data-val="25000">000</span>
<span class="num" data-val="25000">18000</span>
<span class="text">Guides</span>
</div>
<div class="countitem">
<i class="fa-solid fa-suitcase-rolling"></i>
<span class="num" data-val="20000">000</span>
<i class="fa-solid fa-suitcase-rolling"></i>
<span class="num" data-val="20000">10000</span>
<span class="text">Tours</span>
</div>
<div class="countitem">
<i class="fa-solid fa-location-dot"></i>
<span class="num" data-val="20000">000</span>
<span class="num" data-val="20000">10000</span>
<span class="text">Destinations</span>
</div>

Expand All @@ -446,18 +446,22 @@ <h2 data-max="30" id="test">+ Developers</h2>

<script>
let valueDisplays = document.querySelectorAll(".num");
let interval = 4000;
let interval = 100000;
valueDisplays.forEach((valueDisplay) => {
let startValue = 0;
let startValue = 17500;
let endValue = parseInt(valueDisplay.getAttribute("data-val"));
let duration = Math.floor(interval / endValue);
let duration = 0.05 ;
if (endValue== 25000){
startValue= 22500;
// duration= 3;
}
let counter = setInterval(function () {
startValue += 10;
valueDisplay.textContent = startValue;
if (startValue == endValue) {
clearInterval(counter);
}
}, duration);
}, duration)
});
</script>

Expand All @@ -469,7 +473,7 @@ <h2 data-max="30" id="test">+ Developers</h2>

<!-- Newsletter Modal -->

<div class="modal-container">
<!-- <div class="modal-container">
<div class="modal-wrapper">
<div class="cross-container">
<i class="fas fa-times close-btn" onclick="closeModal()"></i>
Expand Down Expand Up @@ -499,7 +503,7 @@ <h3 style="font-weight: 600;font-size: 24px;">Get Flat 15% OFF</h3>
<img src="./img/pexels-sam-kolder-2387871.jpg" class="modal-image" alt="maldives">
</div>
</div>
</div>
</div> -->

<section class="section__container destination__container" id="Destinations" data-aos="fade-up">
<div class="section__header">
Expand Down

0 comments on commit d003a1b

Please sign in to comment.