-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
277 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
@import "colors"; | ||
@import "fonts"; | ||
@import "sizes"; | ||
|
||
.selected-item-body { | ||
padding: $medium; | ||
display: flex; | ||
min-height: 100vh; | ||
} | ||
|
||
.selected-item-main { | ||
background-color: $green1; | ||
align-items: stretch; | ||
width: 100%; | ||
top: 0; | ||
margin: 0; | ||
border-radius: $medium; | ||
padding: $medium; | ||
} | ||
|
||
#close-button { | ||
position: absolute; | ||
right: $small; | ||
top: $small; | ||
width: $larger; | ||
height: $larger; | ||
border-radius: 50%; | ||
background-color: $orange1; | ||
color: $white; | ||
font-size: $large; | ||
display: flex; | ||
align-items: center; | ||
cursor: pointer; | ||
transition: transform 0.5s ease; | ||
} | ||
|
||
.close-icon { | ||
width: 100%; | ||
padding: $small; | ||
} | ||
|
||
#close-button:hover { | ||
transform: scale(1.1, 1.1); | ||
} | ||
|
||
.single-page-button { | ||
cursor: pointer; | ||
width: 100%; | ||
height: $large; | ||
background-color: $orange1; | ||
border-radius: $medium; | ||
font-size: $medium; | ||
font-family: $main-text; | ||
font-weight: 500; | ||
color: $white; | ||
margin-top: $large; | ||
} | ||
|
||
.challenge-page { | ||
margin-bottom: $godzilla; | ||
} | ||
|
||
.action-section { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding-top: $large; | ||
margin: auto; | ||
text-align: center; | ||
} | ||
|
||
.acceptBtn, | ||
.complBtn { | ||
margin-top: 0; | ||
} | ||
|
||
.header-img { | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.selected-item-img { | ||
height: 50%; | ||
border-radius: $large; | ||
} | ||
|
||
.selected-item-title { | ||
text-align: center; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
// wooooo go dom | ||
|
||
function openCity(evt, cityName) { | ||
// Declare all variables | ||
|
||
let i, tabcontent, tablinks; | ||
// Declare all variables | ||
|
||
// Get all elements with class="tabcontent" and hide them | ||
tabcontent = document.getElementsByClassName("tabcontent"); | ||
for (i = 0; i < tabcontent.length; i++) { | ||
tabcontent[i].style.display = "none"; | ||
} | ||
let i, tabcontent, tablinks; | ||
|
||
// Get all elements with class="tablinks" and remove the class "active" | ||
tablinks = document.getElementsByClassName("tablinks"); | ||
for (i = 0; i < tablinks.length; i++) { | ||
tablinks[i].className = tablinks[i].className.replace(" active", ""); | ||
} | ||
// Get all elements with class="tabcontent" and hide them | ||
tabcontent = document.getElementsByClassName("tabcontent"); | ||
for (i = 0; i < tabcontent.length; i++) { | ||
tabcontent[i].style.display = "none"; | ||
} | ||
|
||
// Show the current tab, and add an "active" class to the button that opened the tab | ||
document.getElementById(cityName).style.display = "block"; | ||
evt.currentTarget.className += " active"; | ||
// Get all elements with class="tablinks" and remove the class "active" | ||
tablinks = document.getElementsByClassName("tablinks"); | ||
for (i = 0; i < tablinks.length; i++) { | ||
tablinks[i].className = tablinks[i].className.replace(" active", ""); | ||
} | ||
|
||
// Show the current tab, and add an "active" class to the button that opened the tab | ||
document.getElementById(cityName).style.display = "block"; | ||
evt.currentTarget.className += " active"; | ||
} | ||
// To show first tab by default // | ||
|
||
document.getElementById("defaultOpen").click(); | ||
// | ||
|
||
function goBack() { | ||
window.history.back(); | ||
} | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
const topics = require('../model/topics') | ||
const topics = require("../model/topics"); | ||
|
||
exports.get = (req, res) => { | ||
const { singleTopic } = req.params; | ||
for (let i = 0; i < topics.length; i++) { | ||
if (topics[i].title.includes(singleTopic)) { | ||
const topicDetails = topics[i]; | ||
return res.render('singletopic', { topicDetails }); | ||
return res.render("singletopic", { | ||
layout: "content-selected", | ||
topicDetails | ||
}); | ||
} | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.