Skip to content

Commit

Permalink
responsiveness improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
srishti023 committed Nov 10, 2024
1 parent 2edcbcd commit 277b27f
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 12 deletions.
16 changes: 14 additions & 2 deletions Alien.css
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,12 @@ body.dark-theme .footer-links a:hover {
flex-direction: column;
gap: 10px;
}
.navbar{
gap: 10px;
padding: 20px 0px;
justify-content: center;
align-items: start;
}
}

/* Responsive Breakpoints */
Expand Down Expand Up @@ -609,6 +615,7 @@ body.dark-theme #gameInfo {
/* Instructions */
#instructions {
margin-top: 30px;
padding: 1rem;
}

#instructionsTitle {
Expand Down Expand Up @@ -670,7 +677,7 @@ body.dark-theme #instructionsTitle {
}

.controls {
margin-right: 45%;
margin-right: 35%;
display: flex;
justify-content: center;
align-items: center;
Expand Down Expand Up @@ -739,7 +746,7 @@ body.dark-theme #instructionsTitle {
}
.navbar {
flex-direction: column;
padding: 20px;
padding: 20px 0;
}

.navbar a {
Expand All @@ -753,6 +760,11 @@ body.dark-theme #instructionsTitle {
width: auto;
}

.logoImage{
height: 65px;
margin-left: 25px;
}

.navbar .faq-btn {
font-size: 0.6em;
padding: 5px 8px;
Expand Down
12 changes: 12 additions & 0 deletions Contributors/contributor.css
Original file line number Diff line number Diff line change
Expand Up @@ -553,4 +553,16 @@ a{
transform: scale(1.02);
background-color: #fff;
color: black;
}
@media (max-width : 768px) {
.contributor-stats h2{
font-size: 2rem;
}
.title{
font-size: 2rem;
}
.contributor-card{
max-width: calc(80% - 16px);
width: 100%;
}
}
11 changes: 11 additions & 0 deletions FAQs.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,14 @@ ul li:hover {
color: #f72585;
transition: color 0.3s ease;
}
@media (max-width:768px) {
h1{
margin-top: 5rem;
}
h2{
font-size: 1.3em;
}
.title{
font-size: 1.5em;
}
}
5 changes: 5 additions & 0 deletions donation_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@
gap: 2rem;
margin: 2rem 0;
}
@media (max-width:786px) {
.donation-stats{
flex-direction: column;
}
}

.stat-card {
background: rgba(255, 255, 255, 0.1);
Expand Down
24 changes: 14 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,18 @@
/* 4:3 aspect ratio */
}
}
@media (max-width: 768px){
.logoImage{
height: 65px;
}
}

/* Small screens (up to 480px) */
@media (max-width: 480px) {
#gameCanvas {
height: 240px;
/* 4:3 aspect ratio */
width: 320px;
width: 100%;
/* 4:3 aspect ratio */
}
}
Expand All @@ -434,7 +439,6 @@
height: 80px;
/* Adjust to fit the header */
width: auto;
margin-right: 15px;
cursor: pointer;
transition: transform 0.3s, box-shadow 0.3s, filter 0.3s;
}
Expand Down Expand Up @@ -680,7 +684,7 @@ <h2 class="uppercase">What power-up do you find most helpful?</h2>
<div class="controlGroup">
<span id="displayName" class="playerName"></span>
</div>
<button id="pauseBtn">Pause</button>
<button id="pauseBtn" style="transform: translate(0px, 0px);">Pause</button>
<div class="controlGroup">
<button id="startButton"><i class="fas fa-play"></i> Start Game</button>
<button id="pauseButton" style="display: none"><i class="fas fa-play"></i> Game paused</button>
Expand All @@ -704,6 +708,12 @@ <h2 class="uppercase">What power-up do you find most helpful?</h2>
<div id="nextLevelMessage" class="hidden"></div>


</div>
<!-- Control buttons for mobile -->
<div class="controls" style="margin-bottom: 3vh;">
<button id="leftButton"></button>
<button id="fireButton">🔫</button>
<button id="rightButton"></button>
</div>
<!-- Congratulatory Popup -->
<div id="congratsPopup" style="display: none;">
Expand Down Expand Up @@ -934,7 +944,6 @@ <h2 class="primary-btn" id="instructionsTitle">Player Instructions</h2>
</div>
<style>
.visitor-counter {
position: absolute;
background-color: #ffffff00;
color: #1d4ed8;
/* top: auto; */
Expand Down Expand Up @@ -1014,12 +1023,7 @@ <h2 class="primary-btn" id="instructionsTitle">Player Instructions</h2>



<!-- Control buttons for mobile -->
<div class="controls" style="margin-bottom: 3vh;">
<button id="leftButton"></button>
<button id="fireButton">🔫</button>
<button id="rightButton"></button>
</div>


<!-- <div id="gameControls" class="button-container">
<div id="faqbtn">
Expand Down

0 comments on commit 277b27f

Please sign in to comment.