From eff9fde69be892a4f682d2e99941666ea3647432 Mon Sep 17 00:00:00 2001 From: elisejakob Date: Tue, 7 May 2019 20:58:55 +0200 Subject: [PATCH] =?UTF-8?q?design=20progress=20on=20associations,=20events?= =?UTF-8?q?,=20page=20titles,=20etc=20=F0=9F=92=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/AssociationList.js | 11 ++--- src/components/PostList.js | 2 +- src/css/associations.scss | 42 ++++++++-------- src/css/base.scss | 7 +++ src/css/events.scss | 82 ++++++++++--------------------- src/css/page.scss | 9 ++++ src/templates/association.js | 2 +- src/templates/event.js | 2 +- src/templates/page.js | 2 +- src/templates/venue.js | 2 +- 10 files changed, 73 insertions(+), 88 deletions(-) diff --git a/src/components/AssociationList.js b/src/components/AssociationList.js index 888457e..b5edc98 100644 --- a/src/components/AssociationList.js +++ b/src/components/AssociationList.js @@ -6,7 +6,7 @@ import Img from 'gatsby-image' export default class AssociationList extends React.Component { render_association(association) { return ( -
+ {association.featured_media && association.featured_media.localFile && (
)}
- -

{association.title}

- +

{association.title}

-
+ ) } @@ -33,7 +31,8 @@ export default class AssociationList extends React.Component { return (
-

{title}

+

{title}

+

Her burde det være en generell tekst om foreningene. Hva er en forening? Hvordan kan man bli med i en forening? Hva gjør foreningene? Kan jeg se alt som arrangeres av Kulturutvalget, for eksempel?

{associations.map(({ node: association }) => this.render_association(association) diff --git a/src/components/PostList.js b/src/components/PostList.js index 72a313d..55b7b35 100644 --- a/src/components/PostList.js +++ b/src/components/PostList.js @@ -9,7 +9,7 @@ export default class PostList extends React.Component { return (
-

{title}

+

{title}

{posts.map(({ node: post }) => ( diff --git a/src/css/associations.scss b/src/css/associations.scss index 9669599..1799be3 100644 --- a/src/css/associations.scss +++ b/src/css/associations.scss @@ -4,29 +4,28 @@ } .association { - width: 29.333333%; - margin: 0 2% 1rem 2%; position: relative; + width: calc(50% - 1rem); + margin: 0 0.5rem 1rem; + border: 1px solid black; + padding: 1rem; @media (max-width: $media-m) { - width: 46%; - } - - @media (max-width: $media-s) { width: 100%; - margin-left: 0; - margin-right: 0; + margin: 0 0 1rem; } - @media (min-width: $media-xl) { - width: 21%; - } - - a { - text-decoration: none; - color: inherit; + width: calc(33.333333333% - 1rem); } + display: flex; + + text-decoration: none; + color: inherit; + &:hover { + color: inherit; + border-color: orange; + } &-title { font-size: 1.3rem; margin-bottom: 0.6rem; @@ -34,17 +33,20 @@ &-image { width: 100%; - padding-right: 2rem; - margin-bottom: 1rem; - img { - height: 20rem; - } + max-width: 200px; + height: 200px; + overflow: hidden; + margin: 0 auto 1rem; + padding-left: 2rem; + order: 2; } &-text { width: 100%; p { font-size: $font-s; + line-height: 1.4; + margin-left: 0; } } } diff --git a/src/css/base.scss b/src/css/base.scss index 404ad2a..2a8c9bb 100644 --- a/src/css/base.scss +++ b/src/css/base.scss @@ -46,6 +46,13 @@ a { p { max-width: $width-m; margin: 0 auto 2rem; + + &.lead { + font-size: 1.3rem; + text-align: center; + line-height: 1.3; + margin-bottom: 4rem; + } } h1, h2, h3, h4, h5, h6 { diff --git a/src/css/events.scss b/src/css/events.scss index d003098..e0bccde 100644 --- a/src/css/events.scss +++ b/src/css/events.scss @@ -4,38 +4,16 @@ } .events { - text-align: center; padding: 0; } -.event-group-header { - text-transform: uppercase; - font-weight: 700; - font-size: 1.3rem; - line-height: 1.2; - letter-spacing: 0.05em; - margin: 0; +.event-list { + display: flex; + flex-wrap: wrap; + justify-content: center; } .event-grouped-by-day { - display: inline-block; - //width: 29.333333%; - margin: 0 2% 1rem 2%; - - @media (max-width: $media-m) { - width: 46%; - } - - @media (max-width: $media-s) { - width: 100%; - margin-left: 0; - margin-right: 0; - } - - @media (min-width: $media-xl) { - width: 21%; - } - .event-types, .event-group-header { display: none; } @@ -49,47 +27,32 @@ .event-group-header { text-align: center; - background-color: $color-red; + background-color: $color-orange; color: $color-white; - margin: 0 -2rem; + margin: 0 -2rem 1rem; padding: 0.4rem 2rem; + text-transform: uppercase; + font-weight: 700; + font-size: 1.3rem; + line-height: 1.2; + letter-spacing: 0.05em; } - .event { - width: 47.2%; - margin: 0 1.4% 2rem 1.4%; - - @media (max-width: $media-m) { - width: 46%; - } - - @media (max-width: $media-s) { - width: 100%; - margin-left: 0; - margin-right: 0; - } - - @media (min-width: $media-xl) { - width: 21%; - } - } - - .event-types { display: none; } } -.event-list { - padding-top: 2rem; - display: flex; - flex-wrap: wrap; - justify-content: left; -} - .event { - width: 100%; - margin: 0 0 1.2rem 0; + width: calc(33.333333333% - 1rem); + margin: 0 0.5rem 1rem; + @media (max-width: $media-l) { + width: calc(50% - 1rem); + } + @media (max-width: $media-s) { + width: 100%; + margin: 0 0 1rem; + } position: relative; text-decoration: none; color: $color-black; @@ -97,15 +60,20 @@ text-align: left; display: flex; justify-content: space-between; + align-items: center; &-image { display: block; position: relative; width: 30%; + height: 100%; margin: 0; + overflow: hidden; + background: $color-black; } &-header { + width: 70%; padding: 0.6rem 0.8rem; line-height: 1.1; } diff --git a/src/css/page.scss b/src/css/page.scss index 52b5fe0..ef71c6b 100644 --- a/src/css/page.scss +++ b/src/css/page.scss @@ -18,6 +18,15 @@ h1.section-title { margin-top: 1rem; } +.page-title { + font-size: 3.6rem; + text-transform: uppercase; + letter-spacing: 0.025em; + font-weight: 400; + text-align: center; + margin-bottom: 2rem; +} + .wp-content { max-width: $width-m; margin: 0 auto; diff --git a/src/templates/association.js b/src/templates/association.js index cc9ba3e..85921d3 100644 --- a/src/templates/association.js +++ b/src/templates/association.js @@ -15,7 +15,7 @@ export const AssociationTemplate = data => { } = data return (
-

{title}

+

{title}

{hasFeaturedMedia && (
diff --git a/src/templates/event.js b/src/templates/event.js index 21062c5..9a7911a 100644 --- a/src/templates/event.js +++ b/src/templates/event.js @@ -80,7 +80,7 @@ export const EventTemplate = ({ Pris: {formatPrices(priceRegular, priceStudent)}
{ticketUrl && ( - + Kjøp billetter )} diff --git a/src/templates/page.js b/src/templates/page.js index 34fca8b..e384482 100644 --- a/src/templates/page.js +++ b/src/templates/page.js @@ -6,7 +6,7 @@ import Layout from '../components/Layout' export const PageTemplate = ({ title, content }) => { return (
-

{title}

+

{title}

-

{title}

+

{title}

{hasFeaturedMedia && (