Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
PAVAN507-STAR authored Oct 24, 2024
2 parents 9d7238b + 2d9a293 commit 90b29e8
Show file tree
Hide file tree
Showing 7 changed files with 350 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

## ⭐️ Star History

![Star History Chart](https://api.star-history.com/svg?repos=jollyjolli/HacktoberWall&type=Date)](https://star-history.com/#jollyjolli/HacktoberWall&Date)
[![Star History Chart](https://api.star-history.com/svg?repos=JollyJolli/HacktoberWall&type=Timeline)](https://star-history.com/#JollyJolli/HacktoberWall&Timeline)

## 🎁 Contributors

Expand Down
33 changes: 33 additions & 0 deletions src/css/modal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.modal-pumpkin {
position: absolute;
top: -30px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 60px;
animation: float 3s ease-in-out infinite;
}

@keyframes float {
0% {
transform: translateX(-50%) translateY(0px);
}

50% {
transform: translateX(-50%) translateY(-10px);
}

100% {
transform: translateX(-50%) translateY(0px);
}
}

@media (max-width: 480px) {
.hacktoberfest-modal-title {
font-size: 2rem;
}

.hacktoberfest-modal-body {
font-size: 1rem;
}
}
140 changes: 140 additions & 0 deletions src/css/modal.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
.hacktoberfest-modal-container {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, .7);
z-index: 1000;
animation: modalFadeIn .3s ease-in-out
}

.hacktoberfest-modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #1a1a1a;
padding: 2rem;
border-radius: 12px;
box-shadow: 0 0 20px rgba(255, 107, 0, .3);
max-width: 500px;
width: 90%;
border: 2px solid #ff6b00
}

.hacktoberfest-modal-header {
text-align: center;
margin-bottom: 1.5rem
}

.hacktoberfest-modal-title {
font-family: Creepster, cursive;
font-size: 2.5rem;
color: #ff6b00;
text-shadow: 2px 2px 4px rgba(0, 0, 0, .3);
margin: 0;
line-height: 1.2
}

.hacktoberfest-modal-body {
text-align: center;
color: #fff;
margin-bottom: 1.5rem;
font-family: Poppins, sans-serif;
font-size: 1.1rem;
line-height: 1.6
}

.hacktoberfest-modal-close {
position: absolute;
top: 1rem;
right: 1rem;
background: 0 0;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: #ff6b00;
padding: .5rem;
line-height: 1;
transition: color .2s
}

.hacktoberfest-modal-close:hover {
color: #ff8533
}

.hacktoberfest-modal-footer {
text-align: center
}

.hacktoberfest-close-button {
background-color: #ff6b00;
color: #fff;
border: none;
padding: .75rem 2rem;
border-radius: 4px;
cursor: pointer;
font-weight: 700;
font-family: Poppins, sans-serif;
transition: background-color .2s;
font-size: 1rem;
text-transform: uppercase;
letter-spacing: 1px
}

.hacktoberfest-close-button:hover {
background-color: #ff8533;
transform: translateY(-2px)
}

@keyframes modalFadeIn {
from {
opacity: 0;
transform: translate(-50%, -48%)
}

to {
opacity: 1;
transform: translate(-50%, -50%)
}
}

.hacktoberfest-modal-container.show {
display: block
}

.modal-pumpkin {
position: absolute;
top: -30px;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 60px;
animation: float 3s ease-in-out infinite
}

@keyframes float {
0% {
transform: translateX(-50%) translateY(0)
}

50% {
transform: translateX(-50%) translateY(-10px)
}

100% {
transform: translateX(-50%) translateY(0)
}
}

@media (max-width:480px) {
.hacktoberfest-modal-title {
font-size: 2rem
}

.hacktoberfest-modal-body {
font-size: 1rem
}
}
21 changes: 20 additions & 1 deletion src/data/contributors.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
{
"name": "JollyJolli"
},
{
"name": "Ishan Sawai"
},
{
"name": "Nidhi"
},
Expand Down Expand Up @@ -107,6 +110,7 @@
{
"name": "Jakob Joas"
},

{
"name": "DevyRuxpin"
},
Expand Down Expand Up @@ -199,5 +203,20 @@
},
{
"name": "Aditya Chandel"
},
{
"name": "Heshan Maduwantha"
},
{
"name": "Jisha Jacob"
},
{
"name": "Abhishek Rout"
},
{
"name": "mwango"
},
{
"name": "Shiva Karthik"
}
]
]
43 changes: 26 additions & 17 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<link href="https://fonts.googleapis.com/css2?family=Creepster&display=swap" rel="stylesheet">


<link rel="stylesheet" href="css/modal.min.css" />

</head>

Expand Down Expand Up @@ -130,6 +131,7 @@
</div>
</div>


<main class="container">
<section class="wall-section">
<h2>Participants</h2>
Expand Down Expand Up @@ -181,28 +183,34 @@ <h2 class="modal-title">Fun Facts</h2>
</div>

<section id="about-us-section" class="about-us">
<h2>About Us</h2>
<p>HacktoberWall was created to help beginner contributors in the open-source community participate in the Hacktoberfest event.</p>

<div class="owners">
<div id="owner-jolly" class="owner-card">
<img src="" alt="Jolly's Profile Picture" class="profile-picture" />
<div class="owner-info">
<h3>Jolly (Owner)</h3>
<p>Jolly is the creator of HacktoberWall and is passionate about open-source contributions. This project marks his first participation in Hacktoberfest!</p>
<div class="aboutus-container">
<h2>About Us</h2>
<p>HacktoberWall was created to help beginner contributors in the open-source community participate in the
Hacktoberfest event.</p>

<div class="owners">
<div id="owner-jolly" class="owner-card">
<img src="" alt="Jolly's Profile Picture" class="profile-picture" />
<div class="owner-info">
<h3>Jolly (Owner)</h3>
<p>Jolly is the creator of HacktoberWall and is passionate about open-source contributions. This project
marks his first participation in Hacktoberfest!</p>
</div>
</div>
</div>

<div id="owner-phanty" class="owner-card">
<img src="" alt="Phanty78's Profile Picture" class="profile-picture" />
<div class="owner-info">
<h3>Phanty78 (Co-Owner)</h3>
<p>Phanty78 joined Jolly to co-manage HacktoberWall and has made significant contributions to the project.</p>

<div id="owner-phanty" class="owner-card">
<img src="" alt="Phanty78's Profile Picture" class="profile-picture" />
<div class="owner-info">
<h3>Phanty78 (Co-Owner)</h3>
<p>Phanty78 joined Jolly to co-manage HacktoberWall and has made significant contributions to the project.
</p>
</div>
</div>
</div>
</div>

</section>

</main>

<footer>
Expand All @@ -224,6 +232,7 @@ <h3>Phanty78 (Co-Owner)</h3>
<script src="https://cdnjs.cloudflare.com/ajax/libs/smoothscroll/1.4.10/SmoothScroll.min.js"
integrity="sha256-huW7yWl7tNfP7lGk46XE+Sp0nCotjzYodhVKlwaNeco=" crossorigin="anonymous"></script>
<script src="js/app.min.js"></script>
<script src="js/modal.min.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
const navToggle = document.getElementById('navToggle');
Expand Down
75 changes: 75 additions & 0 deletions src/js/modal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
class HacktoberfestModal {
constructor() {
this.modalShown = false; // Use boolean instead of !1
this.init();
}

init() {
const lastShown = localStorage.getItem("hacktoberfestModalLastShown");
const today = new Date().toDateString();
if (!lastShown || lastShown !== today) {
this.createModal();
this.showModal();
localStorage.setItem("hacktoberfestModalLastShown", today);
}
}

createModal() {
const modalHTML = `
<div class="hacktoberfest-modal-container" id="hacktoberfestModal">
<div class="hacktoberfest-modal">
<img src="img/Pumpkin.webp" alt="Halloween Pumpkin" class="modal-pumpkin">
<button class="hacktoberfest-modal-close">×</button>
<div class="hacktoberfest-modal-header">
<h2 class="hacktoberfest-modal-title">HACKTOBERFEST IS ALMOST ENDING 🎃</h2>
</div>
<div class="hacktoberfest-modal-body">
<p>Thank you for your participation this year! It was an amazing experience and we hope to be here again next year!</p>
</div>
<div class="hacktoberfest-modal-footer">
<button class="hacktoberfest-close-button">Close</button>
</div>
</div>
</div>
`;

document.body.insertAdjacentHTML("beforeend", modalHTML);

// Add event listener for the "X" button
const closeButtonX = document.querySelector(".hacktoberfest-modal-close");
closeButtonX.addEventListener("click", () => this.hideModal());

// Add event listener for the "Close" button
const closeButton = document.querySelector(".hacktoberfest-close-button");
closeButton.addEventListener("click", () => this.hideModal());

// Add event listener for the modal container
document
.getElementById("hacktoberfestModal")
.addEventListener("click", (e) => {
if (e.target.className === "hacktoberfest-modal-container") {
this.hideModal();
}
});
}

showModal() {
const modal = document.getElementById("hacktoberfestModal");
if (modal) {
modal.classList.add("show");
this.modalShown = true;
}
}

hideModal() {
const modal = document.getElementById("hacktoberfestModal");
if (modal) {
modal.classList.remove("show");
this.modalShown = false;
}
}
}

document.addEventListener("DOMContentLoaded", () => {
new HacktoberfestModal();
});
Loading

0 comments on commit 90b29e8

Please sign in to comment.