Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Card layout #197

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
ec74fac
Put team members into card layout
joaquinkunkel Aug 28, 2017
6eb25ea
Created card layout for team page
joaquinkunkel Aug 28, 2017
aefa992
Polished card layout
joaquinkunkel Aug 28, 2017
91dfec9
Fixed a line length error
joaquinkunkel Aug 31, 2017
81af336
Second attempt
joaquinkunkel Aug 31, 2017
91622c1
Refined code style
joaquinkunkel Sep 7, 2017
2c80089
imported team-page-load
Sep 25, 2017
8742fab
imported TeamPageLoad
Sep 25, 2017
c85e75c
included background-grey variable
Sep 25, 2017
2a8b713
created team page load transition
Sep 25, 2017
8ba840b
fixed lint error
Sep 25, 2017
478dc07
Enhanced card based layout
joaquinkunkel Oct 1, 2017
b2c4f07
Deleted conflicting unused line in IssueController
joaquinkunkel Oct 1, 2017
45da349
Merge branch 'master' into card-layout
joaquinkunkel Oct 1, 2017
0cfc70c
Syntax fix
joaquinkunkel Oct 1, 2017
4ab919b
Merge branch 'card-layout' of https://github.com/thegazelle-ad/gazell…
joaquinkunkel Oct 1, 2017
79fdc57
Fixed things
joaquinkunkel Oct 1, 2017
0d80b1c
Author preview on small width
joaquinkunkel Oct 1, 2017
b0e197e
added extra column of team members
Oct 1, 2017
34ee3d5
Further card implementations
joaquinkunkel Oct 8, 2017
b4bede6
fixed page responsiveness
Oct 8, 2017
49077ef
Refined cards for different article lists
joaquinkunkel Nov 12, 2017
f22615b
article instant load transition -- still need to fix responsiveness
Nov 26, 2017
a6315c6
fixed lint error
Nov 26, 2017
ffd9894
uploading article load
Dec 3, 2017
fce6501
final modifications
Dec 3, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/components/ArticleController.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { viewArticle, isArticleViewed } from 'lib/utilities';
import Article from 'components/Article';
import FalcorController from 'lib/falcor/FalcorController';
import NotFound from 'components/NotFound';
import ArticleLoad from 'transitions/ArticleLoad';

export default class ArticleController extends FalcorController {
static getFalcorPathSets(params) {
Expand Down Expand Up @@ -131,11 +132,6 @@ export default class ArticleController extends FalcorController {
</div>
);
}

return (
<div>
Loading
</div>
);
return <ArticleLoad />;
}
}
2 changes: 1 addition & 1 deletion src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class Header extends BaseComponent {
<div className="header__title">
{/* TODO: change link to proper Gazelle icon uploaded to server*/}
<Link to="/" className="header__title__content">
<img src="https://thegazelle.s3.amazonaws.com/gazelle/2016/02/header-logo.png" alt="logo" />
<img src="https://s3.amazonaws.com/thegazelle/gazelle/2017/09/header-logo-transparent-200.png" alt="logo" />
<h1 className="header__title__content__site-name">{this.props.appName}</h1>
</Link>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/IssueController.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import React from 'react';
import _ from 'lodash';
import FalcorController from 'lib/falcor/FalcorController';
import { Link } from 'react-router';
// import { Link } from 'react-router';
import Helmet from 'react-helmet'; // Add meta tags for pre-Ghost release
import { mapLegacyIssueSlugsToIssueNumber } from 'lib/utilities';

Expand Down Expand Up @@ -117,9 +117,6 @@ export default class IssueController extends FalcorController {
// Render nothing if this.props.articles is empty
_.map((issueData.categories || []), category => (
<div key={category.name} className="issue__category">
<Link to={`/category/${category.slug}`}>
<h2 className="section-header">{category.name}</h2>
</Link>
<ArticleList articles={category.articles} />
</div>
))
Expand Down Expand Up @@ -160,7 +157,10 @@ export default class IssueController extends FalcorController {
<EditorsPicks articles={issueData.picks} />
<Trending articles={trendingData} />
</div>
<div className="categories"> {/* CSS rule in _issue.scss*/}
<h2 className="divider"></h2>
{renderCategories}
</div>
<MailingListButton />
</div>
</div>
Expand Down
8 changes: 6 additions & 2 deletions src/components/TeamMembersList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ export default class TeamMembersList extends BaseComponent {
alt="Team Member"
className="team-page__team__members__member__image"
/>
<h2 className="team-page__team__members__member__name">{member.name}</h2>
<h3 className="team-page__team__members__member__job-title">{member.job_title}</h3>
<div className="team-page__team__members__member__text">
<h2 className="team-page__team__members__member__text__name">{member.name}</h2>
<h3 className="team-page__team__members__member__text__job-title">
{member.job_title}
</h3>
</div>
</Link>
);
});
Expand Down
3 changes: 2 additions & 1 deletion src/components/TeamPageController.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import Helmet from 'react-helmet'; // Add meta tags for pre-Ghost release
// Import components
import TeamPage from 'components/TeamPage';
import NotFound from 'components/NotFound';
import TeamPageLoad from 'transitions/TeamPageLoad';

export default class TeamPageController extends FalcorController {
static getFalcorPathSets() {
Expand Down Expand Up @@ -53,6 +54,6 @@ export default class TeamPageController extends FalcorController {
</div>
);
}
return <div>Loading</div>;
return <TeamPageLoad />;
}
}
19 changes: 9 additions & 10 deletions src/styles/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,26 @@
max-width: $column-1;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
border-bottom: 1px solid #E8E8E8;
justify-content: left;
margin-bottom: 1rem;
flex-grow: 1;
max-width: 100%; // Keeps articles with short titles/teasers centered
&:last-child {
margin-bottom: 0;
border-bottom: none;
padding-bottom: 0;
}

&__featured-image {
object-fit: cover;
width: 450px;
height: 250px;
height: 300px;
width: 30em;
}

&__content {
max-width: 20%;
min-width: 250px;
padding-left: 1.3rem;
margin: 0;
//max-width: 60em;
//min-width: 250px;
padding: 1.7rem;
&__title {
font-size: 1.2rem;
line-height: 1.5rem;
Expand Down Expand Up @@ -118,7 +117,7 @@

&__content {
max-width: $column-1;
padding-left: 0;
padding: 0.8rem;
font-size: inherit;
&__teaser {
display: block !important;
Expand Down
1 change: 1 addition & 0 deletions src/styles/abstracts/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/
$dark-grey: #595959;
$lighter-grey: #ECECEC;
$background-grey: #FCFCFC;
$light-grey: #ACACAC;
$border-grey: #C6C6C6;
$link-blue: #1b7ab0;
Expand Down
1 change: 1 addition & 0 deletions src/styles/base/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

body {
overflow-x: hidden;
background-color: $background-grey;
}

.app-container {
Expand Down
5 changes: 3 additions & 2 deletions src/styles/components/_article-list.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.article-list {
display: flex;
flex-wrap: wrap;
padding: 0.5rem 0.5rem 0.5rem 0.5rem;
//padding: 0.5rem;
//margin: 0.5rem 0;
justify-content: space-between;
align-content: center;

&:last-child {
padding: 0 0 1rem 0;
//padding: 0 0 1rem 0;
}
}
53 changes: 38 additions & 15 deletions src/styles/components/_article-preview.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
.article-preview {

//Card

background-color: white;
border-radius: 2px;
box-shadow: 0 1px 2px rgba(0,0,0,0.12);
transition: box-shadow 0.2s cubic-bezier(.25,.8,.25,1);
&:hover {
box-shadow: 0 3px 4px rgba(0,0,0,0.16);
}
margin: 0.5rem;


min-width: 220px;
max-width: $column-3-1;
flex-shrink: 1;
padding: 0 0.75rem 1.25rem 0.75rem;

@media (max-width: $medium) {
max-width: $column-2
}
padding: 0;

@media (max-width: $small) {
max-width: $column-1;
}

&__featured-image {
object-fit: cover;
width: 100%;
height: 170px;
padding-bottom: 0.5rem;
margin-bottom: -4px;
}

&__content {
padding: 0.8rem 0.6rem;
&__category-header {
display: none;
//display: none;
margin: 0 0 0.3rem 0;
@include uppercase;
font-size: $authors-large;
Expand Down Expand Up @@ -56,18 +63,34 @@
}
}

.issue__category .article-list .article-preview{
padding: 0 !important;
}

@media (max-width: $medium) {
&__content {
&__category-header {
margin: 0;
.article-preview{
&__content {
padding: 0.6rem;
&__category-header {
margin: 0;
}
}
max-width: $column-2
}

.issue__category .article-list .article-preview__content,
.editors-picks .article-list .article-preview__content{
padding: 0.6rem !important;
}

}

@media (max-width: $small) {
.article-preview {
max-width: $column-1;
padding: 0 0.3rem 0.6rem 0.3rem;
border-bottom: 1px solid $lighter-grey;
max-width: $column-1;
//padding: 0 0.3rem 0.6rem 0.3rem;
//border-bottom: 1px solid $lighter-grey;
&:first-child {
.article-preview__content__title {
padding-top: 0.2rem;
Expand Down
10 changes: 7 additions & 3 deletions src/styles/components/_article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
}
}
&__related-articles {
padding-bottom: 0;
&__header {
margin: .3rem 0 !important;
@include section-header;
}
@include vertical-article-list;
Expand All @@ -110,12 +112,14 @@
border-right: 1px solid $border-grey;
.article-preview {
width: 100%;
margin-bottom: 0.3rem !important;
&__featured-image {
width: 240px;
height: 150px;
width: 250px;
height: 180px;
}
&__content {
min-width: 50%;
min-width: 45%;
padding: 0.8rem;
.sharing-buttons {
display: none;
}
Expand Down
11 changes: 7 additions & 4 deletions src/styles/components/_editors-picks.scss
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
.editors-picks {
max-width: 70%;
margin-right: 0.75rem;
margin-right: .75rem;
.section-header {
// Extend line beyond .editors-picks div
margin-right: -30px;
}
.article-list {
padding: 0;
padding: 0 .75rem 0 0;

&:last-child {
// Divider between Editor's Picks and Trending
border-right: 1px solid $border-grey;
}
.article-preview {
max-width: $column-2;
&__content__category-header {
display: block;
&__content{
&__category-header {
display: block;
}
}
}
}
Expand All @@ -27,6 +29,7 @@
margin-right: 0;
}
.article-list {
padding: 0;
&:last-child {
border-right: none;
}
Expand Down
6 changes: 4 additions & 2 deletions src/styles/components/_featured-article.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.featured-article {
max-width: $column-1;
.article-preview {
margin-bottom: 0.5rem;
max-width: $column-1;
display: flex;
// Center featured article content vertically and horizontally
Expand All @@ -16,7 +17,7 @@

&__content {
max-width: $column-3-1;
padding-left: 1.3rem;
padding: 1.1rem;
&__category-header {
display: block;
}
Expand Down Expand Up @@ -48,7 +49,8 @@

&__content {
max-width: $column-1;
padding-left: 0;
padding: 0.6rem;
//padding-left: 0;
font-size: inherit;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/styles/components/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.footer {
margin-top: 0.3rem;
display: flex;
justify-content: center;
align-items: center;
Expand Down
12 changes: 11 additions & 1 deletion src/styles/components/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@
&__content {
img {
position: absolute;
background: linear-gradient(
to right,
transparent 0%,
transparent 20%,
$background-grey 20%,
$background-grey 80%,
transparent 80%,
transparent 100%
);
width: 50px;
height: 50px;
margin: -0.1rem 0 0 0;
Expand Down Expand Up @@ -153,7 +162,7 @@
}

@media only screen and (max-width: $small) {
background-color: #FFF;
background: white;
align-items: center;
position: fixed;
z-index: 5;
Expand All @@ -177,6 +186,7 @@
padding-top: 0.32rem;
width: 35px;
height: 35px;
background: white;
}
}
}
Expand Down
Loading