From 7f5c74086f40844c79cf4c8325329444983e8a13 Mon Sep 17 00:00:00 2001 From: Shelby Kay Date: Mon, 4 Oct 2021 22:04:38 +0200 Subject: [PATCH] Create Credits page --- src/routes/credits.svelte | 71 ++++++++++++++------------- src/style/pages/_credits.scss | 90 +++++++++++++++++++++++++++++++++++ src/style/style.scss | 1 + 3 files changed, 130 insertions(+), 32 deletions(-) create mode 100644 src/style/pages/_credits.scss diff --git a/src/routes/credits.svelte b/src/routes/credits.svelte index f73e0e1..a9a64c4 100644 --- a/src/routes/credits.svelte +++ b/src/routes/credits.svelte @@ -15,16 +15,42 @@
- +

{data.credits.text}

- {#each data.credits.list as { title, credits }} -
-

{title}

+
+ {#each data.credits.list as { title, credits }} +
+

{title}

+
    + {#each credits as { name, role, website }} +
  • +
    +
    + {#if website} +

    + {name} +

    + {:else} +

    {name}

    + {/if} +
    +
    + {role} +
    +
    +
  • + {/each} +
+
+ {/each} + +
+

Photography

    - {#each credits as { name, role, website }} + {#each data.credit as { name, website, location }}
  • @@ -37,40 +63,21 @@ {/if}
    - {role} +
      + {#each location as { location_id: { name, slug: slugLocation, country: { slug: slugCountry }}}, index} +
    • + {name} +
    • + {/each} +
  • {/each}
- {/each} - -
-

Photography

-
    - {#each data.credit as { name, website, location }} -
  • -
    -
    - {#if website} -

    - {name} -

    - {:else} -

    {name}

    - {/if} -
    -
    - {#each location as { location_id: { name, slug: slugLocation, country: { slug: slugCountry } } }, index} - {name}{#if location.length > index + 1}, {/if} - {/each} -
    -
    -
  • - {/each} -
+
diff --git a/src/style/pages/_credits.scss b/src/style/pages/_credits.scss new file mode 100644 index 0000000..38f1752 --- /dev/null +++ b/src/style/pages/_credits.scss @@ -0,0 +1,90 @@ +// Credits Page +.credits { + padding: 160px 0; + + // Intro Section + &__heading { + overflow: hidden; + margin-bottom: 72px; + color: $color-tertiary; + text-align: center; + + // Text + p { + max-width: 350px; + margin: 20px auto 56px; + font-weight: 300; + + @include bp (sm) { + margin: 72px auto 0; + max-width: 450px; + } + } + } + + // List + &__list { + margin-top: 160px; + } + + &__category { + --columns: 18; + grid-column: 4 / span var(--columns); + border-top: 1px solid $color-tertiary; + padding-top: 48px; + + h2 { + grid-column: 1 / span 8; + } + ul { + grid-column: 11 / span 8; + margin-bottom: 72px; + } + li { + display: block; + } + a { + color: $color-tertiary; + text-decoration: none; + transition: color 0.2s; + } + h3 { + font-size: rem(28px); + font-family: $font-serif; + } + + dl { + margin-bottom: 32px; + } + dt { + a:hover { + color: $color-secondary; + } + } + dd { + margin-top: 6px; + font-size: rem(16px); + + &, a { + color: rgba($color-tertiary, 0.6); + } + a:hover { + color: #fff; + } + li { + display: inline-block; + line-height: 1.5; + + &:after { + display: inline-block; + content: "•"; + margin: 0 0.35em 0 0.15em; + } + + &:last-child:after { + display: none; + } + } + } + } +} \ No newline at end of file diff --git a/src/style/style.scss b/src/style/style.scss index 4d08ef8..c894be5 100644 --- a/src/style/style.scss +++ b/src/style/style.scss @@ -23,6 +23,7 @@ @import "pages/homepage"; @import "pages/photos"; @import "pages/explore"; +@import "pages/credits"; // Modules @import "modules/globe";