Skip to content
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

dashboard structure has been styled and city list links are fixed. :o… #23

Merged
merged 1 commit into from
Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions scripts/script.js
Expand Up @@ -274,7 +274,6 @@ app.smoothScroll = function () {
scrollTop: $(`#dashboard`).offset().top
}, 900, function () {
window.location.hash = `#dashboard`;
$(`header`).css(`display`, `none`);
});
});
}
Expand All @@ -285,8 +284,6 @@ app.smoothScrollOneChoice = function () {
scrollTop: $(`#dashboard`).offset().top
}, 900, function () {
window.location.hash = `#dashboard`;

$(`header`).css(`display`, `none`);
});

}
Expand All @@ -311,7 +308,7 @@ app.displayNewsDashboard = function (news) {
articleImage = `https://www.nytimes.com/` + `${article.multimedia[0].url}`
}

$(`.news`).append(`<a href="${articleLink}" class="singleArticle"><img src="${articleImage}" alt=""><h3>${articleTitle}</h3><p>${articleDate.toDateString()}</p><p>${articleAbstract}</p></a>`);
$(`.news`).append(`<a href="${articleLink}" title="click to read more" class="singleArticle"><img src="${articleImage}" alt=""><h3>${articleTitle}</h3><p>${articleDate.toDateString()}</p><p>${articleAbstract}</p></a>`);
});
}

Expand Down
12 changes: 6 additions & 6 deletions styles/sass/_cityList.scss
Expand Up @@ -72,7 +72,8 @@
}
}

li {
li,
a {
width: 100%;
color: transparent;
font-family: "Campton Semibold", sans-serif;
Expand All @@ -84,10 +85,6 @@
opacity: 1;
-webkit-text-stroke: 1.4px $black;

&.fadeOutCity {
opacity: 0;
}

&.selectedCity {
color: $white;
transform: scale(1.08);
Expand All @@ -102,8 +99,11 @@
cursor: default;
}
}


&.fadeOutCity {
opacity: 0;
}

&:hover {
cursor: pointer;
transform: scale(1.05);
Expand Down
64 changes: 40 additions & 24 deletions styles/sass/_dashboard.scss
@@ -1,69 +1,85 @@
.dashboard {
background: white;
color: $black;
height: 100vh;
}

.dashboardWrapper {
display: flex;
width: 95%;
height: 100vh;
margin: 0 auto;
border: 1px solid purple;

a {
text-decoration: none;
color: $black;
padding: 10px;
}
}

.dashboardLeft, .dashboardRight {
.dashboardLeft,
.dashboardRight {
margin: 40px 20px 0;
width: 50%;
height: 100vh;
height: calc(100% - 40px);
border: 2px solid tomato;
}

.dashboardRight {
display: flex;
flex-wrap: wrap;
}

.dashSection {
border: 2px solid green;
padding: 5%;

}

.cityName {
height: 20%;
margin-bottom: 40px;
}

// NEWS SECTION STYLING STARTS HERE
.news {
overflow-y: auto;
height: 80%;
height: calc(80% - 40px);
border: 2px solid blue;
display: flex;
flex-wrap: wrap;
.singleArticle {
width: 50%;
border-top: 1px solid black;
img {
filter: grayscale(100%);
}
width: 50%;
border-top: 1px solid black;

img {
filter: grayscale(100%);
}
}
}

// WEATHER SECTION STYLING STARTS HERE

.weather,
.dateTime {
width: calc(50% - 20px);
height: calc(50% - 20px);
margin-bottom: 40px;
background: $lightGrey;
}

.weather {
height: 30%;
display: flex;
margin-right: 40px;
div {
width: calc(100% / 3);
}
}

.dateTime {
height: 20%;
}

.cityPhoto {
height: 50%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

// .dashboardDisplayNone {
// display: none;
// }
width: 100%;
height: calc(50% - 20px);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
25 changes: 22 additions & 3 deletions styles/sass/_generalStyling.scss
@@ -1,15 +1,20 @@
// GLOBAL VARIABLES
$black: #000;
$grey: #565656;
$lightGrey: #DBDBDB;
$darkGrey: #c9c9c9;
$white: #E7E6E6;
$teal: #A7D6CB;
$teal: #BAD8CA;

// FONTS
$med: "Campton Medium", sans-serif;
$semibold: "Campton Semibold", sans-serif;
$bold: "Campton Bold", sans-serif;

// MIXINS
@mixin wrapper($max-width: 1280px, $width: 85%, $margin: 0 auto) {
max-width: $max-width;
width: $width;
margin: $margin;
// border: 1px solid red;
}

@mixin flexCenter($wrap: wrap, $justify-content: center, $align-items: center) {
Expand All @@ -27,7 +32,21 @@ $teal: #A7D6CB;
right: 0;
}

h1,
h2,
h3,
div,
ul,
p {
margin: 0;
padding: 0;
}

img {
width: 100%;
display: block;
}

a {
text-decoration: none;
}
10 changes: 0 additions & 10 deletions styles/sass/_setup.scss
Expand Up @@ -40,14 +40,4 @@ article,aside,details,figcaption,figure,footer,header,hgroup,nav,section,summary

html {
font-size: 62.5%;
}

h1,
h2,
h3,
div,
ul,
p {
margin: 0;
padding: 0;
}
65 changes: 47 additions & 18 deletions styles/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion styles/styles.css.map

Large diffs are not rendered by default.