-
Notifications
You must be signed in to change notification settings - Fork 27
final countries pages without bonus #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
LiadLati
wants to merge
2
commits into
ColmanDevClubORG:main
Choose a base branch
from
LiadLati:liad
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -202,4 +202,6 @@ | |
| "region": "Europe", | ||
| "capital": "Luxembourg" | ||
| } | ||
| ] | ||
| ] | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,80 +1,70 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <meta | ||
| name="description" | ||
| content="This is a simple project to display countries of the world with the ability to search for the country you want, be side the ability to show countries by continent." | ||
| /> | ||
| <meta name="author" content="Mohamed Aridah" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <!-- Google Fonts --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;600;800&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| <!-- Fontawesome Library --> | ||
| <link | ||
| rel="stylesheet" | ||
| href="https://site-assets.fontawesome.com/releases/v6.0.0/css/all.css" | ||
| /> | ||
| <!-- Shared CSS Styles File --> | ||
| <link rel="stylesheet" href="./css/common.css" /> | ||
| <!-- Page Custom CSS File --> | ||
| <link rel="stylesheet" href="./css/details.css" /> | ||
| <title>Details Page</title> | ||
| </head> | ||
| <body> | ||
| <!-- Loader --> | ||
| <div class="loader"> | ||
| <div class="spinner"> | ||
| <i class="fa-regular fa-circle-notch fa-spin icon"></i> | ||
|
|
||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
| <meta name="description" | ||
| content="This is a simple project to display countries of the world with the ability to search for the country you want, be side the ability to show countries by continent." /> | ||
| <meta name="author" content="Mohamed Aridah" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <!-- Google Fonts --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;600;800&display=swap" rel="stylesheet" /> | ||
| <!-- Fontawesome Library --> | ||
| <link rel="stylesheet" href="https://site-assets.fontawesome.com/releases/v6.0.0/css/all.css" /> | ||
| <!-- Shared CSS Styles File --> | ||
| <link rel="stylesheet" href="./css/common.css" /> | ||
| <!-- Page Custom CSS File --> | ||
| <link rel="stylesheet" href="./css/details.css" /> | ||
| <title>Details Page</title> | ||
| </head> | ||
|
|
||
| <body class="body"> | ||
| <!-- Scroll Top --> | ||
| <button type="button" aria-label="Scroll Top Button" class="button scroll-top flex flex-ai-c flex-jc-c scale-effect"> | ||
| <i class="fa-regular fa-chevron-up icon"></i> | ||
| </button> | ||
| <!-- Header --> | ||
| <header class="header"> | ||
| <div class="container flex flex-jc-sb flex-ai-c"> | ||
| <div class="logo"> | ||
| <a href="index.html"> | ||
| <h1>Where in the world?</h1> | ||
| </a> | ||
| </div> | ||
| <button onclick="makeDarkModePage()" type="button" aria-label="Theme Switcher Button" class="theme-toggle flex flex-jc-sb flex-ai-c"> | ||
| <i class="fa-regular fa-moon theme-icon"></i> | ||
| <span class="theme-text">Dark Mode</span> | ||
| </button> | ||
| </div> | ||
| </header> | ||
| <!-- Back Button --> | ||
| <div class="back-button"> | ||
| <div class="container"> | ||
| <a href="index.html" class="btn btn-back btn-with-icon"> | ||
| <i class="fa-regular fa-arrow-left icon"></i> | ||
| back | ||
| </a> | ||
| </div> | ||
| <!-- Scroll Top --> | ||
| <button | ||
| type="button" | ||
| aria-label="Scroll Top Button" | ||
| class="button scroll-top flex flex-ai-c flex-jc-c scale-effect" | ||
| > | ||
| <i class="fa-regular fa-chevron-up icon"></i> | ||
| </button> | ||
| <!-- Header --> | ||
| <header class="header"> | ||
| <div class="container flex flex-jc-sb flex-ai-c"> | ||
| <div class="logo"> | ||
| <a href="index.html"> | ||
| <h1>Where in the world?</h1> | ||
| </a> | ||
| </div> | ||
| <main class="main"> | ||
| <div class="country-container"> | ||
| <section class="country-details"> | ||
| <div class="main-country-flag"></div> | ||
| <div class="country-info"> | ||
| <div class="country-name"></div> | ||
| <div class="country-population"></div> | ||
| <div class="country-region"></div> | ||
| <div class="country-capital"></div> | ||
| </div> | ||
| <button | ||
| type="button" | ||
| aria-label="Theme Switcher Button" | ||
| class="theme-toggle flex flex-jc-sb flex-ai-c" | ||
| > | ||
| <i class="fa-regular fa-moon theme-icon"></i> | ||
| <span class="theme-text">Dark Mode</span> | ||
| </button> | ||
| </div> | ||
| </header> | ||
| <!-- Back Button --> | ||
| <div class="back-button"> | ||
| <div class="container"> | ||
| <a href="index.html" class="btn btn-back btn-with-icon"> | ||
| <i class="fa-regular fa-arrow-left icon"></i> | ||
| back | ||
| </a> | ||
| </div> | ||
| </section> | ||
| </div> | ||
| <main class="main"> | ||
| <div class="container"> | ||
| <section class="country-details"></section> | ||
| </div> | ||
| </main> | ||
| <script src="./js/common.js"></script> | ||
| <script src="./js/details.js"></script> | ||
| </body> | ||
| </html> | ||
| </main> | ||
| <!-- <script src="./js/common.js"></script> --> | ||
| <script src="details.js"></script> | ||
| <script src="index.js"></script> | ||
| </body> | ||
|
|
||
| </html> |
This file contains hidden or 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,18 @@ | ||
| const getDetailsOfCountry = () => { | ||
| document.addEventListener("DOMContentLoaded", () => { | ||
| const countryDetails = JSON.parse(localStorage.getItem("countryDetails")); | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same concepts should be extracted into a service so you wont repeat your logic again and again |
||
| if (countryDetails) { | ||
| console.log("Country Details on details.html:", countryDetails); | ||
| document.querySelector(".main-country-flag").innerHTML = `<img class="country-flag" src="${countryDetails.flag}" alt="${countryDetails.name} flag" />`; | ||
| document.querySelector(".country-name").textContent = `${countryDetails.name}`; | ||
| document.querySelector(".country-population").textContent = `Population: ${countryDetails.population}`; | ||
| document.querySelector(".country-region").textContent = `Region: ${countryDetails.region}`; | ||
| document.querySelector(".country-capital").textContent = `Capital: ${countryDetails.capital}`; | ||
| } else { | ||
| console.error("No country details found in localStorage."); | ||
| } | ||
| }); | ||
|
|
||
| } | ||
| getDetailsOfCountry() | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will want to save your colors into a css variables