Skip to content

Commit

Permalink
Merge pull request #22 from PiXeL99-eng/pixel-branch-modify
Browse files Browse the repository at this point in the history
Made the header responsive with CSS, HTML
  • Loading branch information
Rishit30G authored Oct 9, 2022
2 parents b394802 + 709c0bc commit 6a291a4
Show file tree
Hide file tree
Showing 8 changed files with 8,859 additions and 31 deletions.
20 changes: 19 additions & 1 deletion dist/assets/styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ body {
header {
background: #47bae7;
width: 100%;
height: 4rem;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.26);
padding: 0.8rem;
}

header h1 {
Expand Down Expand Up @@ -120,3 +120,21 @@ button:disabled:active {
width: 30rem;
}
}

#tglBtn{
position: absolute;
right: 4rem;
padding: 7px;
margin: 0;
}

@media (max-width: 550px) {
#tglBtn{
display: block;
position: relative;
right: 0px
}
header {
flex-direction: column;
}
}
3 changes: 2 additions & 1 deletion dist/assets/styles/dark-my-place.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#selected-place {
position: relative;
width: 40rem;
height: 25rem;
max-width: 90%;
Expand All @@ -17,7 +18,7 @@

#menu {
position: absolute;
top: 97px;
top: 1px;
padding-left: 4px;
flex: 100%;
display: flex;
Expand Down
7 changes: 6 additions & 1 deletion dist/assets/styles/dark-share-place.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ input:focus {
}

#selected-place {
position: relative;
width: 40rem;
height: 25rem;
max-width: 90%;
Expand All @@ -43,7 +44,7 @@ input:focus {

#menu {
position: absolute;
top: 97px;
top: 1px;
padding-left: 4px;
flex: 100%;
display: flex;
Expand Down Expand Up @@ -78,3 +79,7 @@ input:focus {
padding: 1rem;
text-align: center;
}
.box-border-custom {
border: 1.5px solid rgb(194, 194, 194);
border-radius: 9px;
}
20 changes: 19 additions & 1 deletion dist/assets/styles/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
header {
background: #212121;
width: 100%;
height: 4rem;
display: flex;
justify-content: center;
align-items: center;
padding: 0.8rem;
}

header h1 {
Expand Down Expand Up @@ -120,4 +120,22 @@
width: 30rem;
}
}

#tglBtn{
position: absolute;
right: 4rem;
padding: 7px;
margin: 0;
}

@media (max-width: 550px) {
#tglBtn{
display: block;
position: relative;
right: 0px
}
header {
flex-direction: column;
}
}

10 changes: 7 additions & 3 deletions dist/assets/styles/share-place.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ input:focus {
}

#selected-place {
position: relative;
width: 40rem;
height: 25rem;
max-width: 90%;
Expand All @@ -42,7 +43,7 @@ input:focus {

#menu {
position: absolute;
top: 97px;
top: 1px;
padding-left: 4px;
flex: 100%;
display: flex;
Expand All @@ -59,7 +60,6 @@ input:focus {
width: 40rem;
max-width: 90%;
margin: 2rem auto;
border: 1px solid #ccc;
padding: 1rem;
text-align: center;
}
Expand All @@ -72,7 +72,11 @@ input:focus {
width: 40rem;
max-width: 90%;
margin: 2rem auto;
border: 1px solid #ccc;
padding: 1rem;
text-align: center;
}

.box-border-custom {
border: 1.5px solid black;
border-radius: 9px;
}
15 changes: 7 additions & 8 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@

<header>
<h1>Share a Place!</h1>
<button id="tglBtn" class="btn-toogle" type="button"
style="padding: 5px; position: relative; left: 200px;">Dark</button>
<button id="tglBtn" class="btn-toogle" type="button">Dark Mode</button>
</header>

<section id="selected-place">
Expand All @@ -52,15 +51,15 @@ <h1>Share a Place!</h1>
</div>
</section>

<section id="share-controls">
<input id="share-link" type="text" readonly value="Select a place to get a sharable link." />
<section id="share-controls" class="box-border-custom">
<input id="share-link" type="text" readonly value="Select a place to get a sharable link." class="box-border-custom"/>
<button id="share-btn" disabled>Share Place</button>
</section>

<section id="place-data">
<section id="place-data" class="box-border-custom">
<form>
<label for="address" style="font-size: 25px; color: grey;">Address</label>
<input type="text" />
<input type="text" class="box-border-custom"/>
<button type="submit">Find Place</button>
</form>
<button id="locate-btn">Get Current Location</button>
Expand All @@ -79,12 +78,12 @@ <h1>Share a Place!</h1>
console.log("DARK");
theme.href = "assets/styles/app.css";
sharePlaceTheme.href = "assets/styles/share-place.css";
document.querySelector(".btn-toogle").innerHTML = "Dark";
document.querySelector(".btn-toogle").innerHTML = "Dark Mode";
} else {
console.log("LIGHT");
theme.href = "assets/styles/dark.css";
sharePlaceTheme.href = "assets/styles/dark-share-place.css"
document.querySelector(".btn-toogle").innerHTML = "Light";
document.querySelector(".btn-toogle").innerHTML = "Light Mode";
}
}
</script>
Expand Down
3 changes: 1 addition & 2 deletions dist/my-place/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
<body>
<header>
<h1></h1>
<button id="tglBtn" class="btn-toogle" type="button"
style="padding: 5px; position: relative; left: 200px;">Dark</button>
<button id="tglBtn" class="btn-toogle" type="button">Dark Mode</button>
</header>

<section id="selected-place">
Expand Down
Loading

0 comments on commit 6a291a4

Please sign in to comment.