From 0b5846e0300609956baaed329ef73bc2c2ee2f48 Mon Sep 17 00:00:00 2001 From: Bobby Date: Sat, 27 Nov 2021 00:42:22 +0000 Subject: [PATCH] Add knight mode styling to home page --- src/app.css | 4 + src/lib/footer/Footer.svelte | 15 + src/lib/header/Header.svelte | 446 +++++++++++++++++++++++++---- src/lib/home/ProjectSummary.svelte | 170 +++++++++-- src/routes/__layout.svelte | 27 ++ src/routes/index.svelte | 16 ++ src/routes/todos/index.svelte | 410 +++++++++++++------------- 7 files changed, 817 insertions(+), 271 deletions(-) diff --git a/src/app.css b/src/app.css index 1803087..2d22617 100644 --- a/src/app.css +++ b/src/app.css @@ -31,6 +31,9 @@ /* Night theme hover states */ --night-hover-light: #707993; --night-hover-dark: #10161d; + + /* Knight theme */ + --knight-off-white: #f8e098; } body { @@ -43,6 +46,7 @@ body { background-attachment: fixed; background-position: center center; padding: 20px; + box-sizing: border-box; } p { diff --git a/src/lib/footer/Footer.svelte b/src/lib/footer/Footer.svelte index 97c433d..6cd9776 100644 --- a/src/lib/footer/Footer.svelte +++ b/src/lib/footer/Footer.svelte @@ -36,6 +36,21 @@ background: var(--night-light); color: var(--neutral-white); } + &.knight { + background: var(--knight-off-white); + box-shadow: none; + &::before { + content: ""; + display: inline-block; + position: absolute; + top: 100%; + left: 0px; + width: 100%; + height: 20px; + background-image: url(/static/parchment-edge.svg); + transform: rotate(180deg); + } + } .social-icons { width: 300px; diff --git a/src/lib/header/Header.svelte b/src/lib/header/Header.svelte index 94f4f62..33afc46 100644 --- a/src/lib/header/Header.svelte +++ b/src/lib/header/Header.svelte @@ -35,10 +35,10 @@ > setActiveTab("home")} >HOME -
+
-
+
  • setActiveTab("about")} >ABOUT -
    +
    -
    +
  • setActiveTab("work")} >WORK -
    +
    -
    +
  • setActiveTab("blog")} >BLOG -
    +
    -
    +
    • @@ -94,8 +94,8 @@
      -
      -
      +
      +
    • -
      -
      +
      +
    • -
      -
      +
      +
    @@ -195,6 +195,18 @@ &.active::after { transform: translateY(3px); } + &.home { + background: var(--postit-green); + } + &.about { + background: var(--postit-yellow); + } + &.work { + background: var(--postit-blue); + } + &.blog { + background: var(--postit-pink); + } &.night { background-color: var(--night-light); color: #fdfdfd; @@ -208,6 +220,218 @@ box-shadow: -2px 2px 0 var(--night-light); } } + &.knight { + border-radius: 0; + font-size: 1.2rem; + &::before, + &::after { + content: ""; + display: inline-block; + position: absolute; + top: -15px; + width: 0px; + height: 0px; + border-top: 15px solid transparent; + border-bottom: 0px solid transparent; + border-radius: 0; + } + &::before { + left: 0px; + } + &::after { + left: 50px; + z-index: -1; + } + &:hover, + &.active { + &::before, + &::after { + transform: translateY(0px); + } + } + &.home { + &::before { + border-left: 50px solid var(--postit-green); + } + &::after { + border-right: 50px solid var(--postit-green); + } + } + &.about { + &::before { + border-left: 50px solid var(--postit-yellow); + } + &::after { + border-right: 50px solid var(--postit-yellow); + } + } + &.work { + &::before { + border-left: 50px solid var(--postit-blue); + } + &::after { + border-right: 50px solid var(--postit-blue); + } + } + &.blog { + &::before { + border-left: 50px solid var(--postit-pink); + } + &::after { + border-right: 50px solid var(--postit-pink); + } + } + a { + padding: 25px 10px 15px; + &:before { + display: inline-block; + position: absolute; + left: 50px; + top: -15px; + content: ""; + width: 0px; + height: 0px; + border-top: 15px solid #7c7c7c; + border-bottom: 15px solid transparent; + border-right: 50px solid transparent; + z-index: 5; + } + &:after { + display: inline-block; + position: absolute; + left: 0px; + top: -15px; + content: ""; + width: 0px; + height: 0px; + border-top: 15px solid #7c7c7c; + border-bottom: 15px solid transparent; + border-left: 50px solid transparent; + z-index: 5; + } + } + + .tabRibbonStylingOuter { + &::before { + display: inline-block; + position: absolute; + left: 5px; + top: -8px; + content: ""; + width: 0px; + height: 0px; + border-top: 15px solid transparent; + border-bottom: 0px solid transparent; + border-left: 50px solid white; + } + &::after { + display: inline-block; + position: absolute; + left: 45px; + top: -8px; + content: ""; + width: 0px; + height: 0px; + border-top: 15px solid transparent; + border-bottom: 0px solid transparent; + border-right: 50px solid white; + } + } + + .tabRibbonStylingInner { + &::before { + display: inline-block; + position: absolute; + left: 10px; + top: -1px; + content: ""; + width: 0px; + height: 0px; + border-top: 15px solid transparent; + border-bottom: 0px solid transparent; + } + &::after { + display: inline-block; + position: absolute; + left: 40px; + top: -1px; + content: ""; + width: 0px; + height: 0px; + border-top: 15px solid transparent; + border-bottom: 0px solid transparent; + } + &.home { + &::before { + border-left: 50px solid var(--postit-green); + } + &::after { + border-right: 50px solid var(--postit-green); + } + } + &.about { + &::before { + border-left: 50px solid var(--postit-yellow); + } + &::after { + border-right: 50px solid var(--postit-yellow); + } + } + &.work { + &::before { + border-left: 50px solid var(--postit-blue); + } + &::after { + border-right: 50px solid var(--postit-blue); + } + } + &.blog { + &::before { + border-left: 50px solid var(--postit-pink); + } + &::after { + border-right: 50px solid var(--postit-pink); + } + } + } + .tabRibbonStylingBottom { + &::before { + display: inline-block; + position: absolute; + left: 5px; + top: 50px; + content: ""; + width: 90px; + height: 40px; + border-left: 5px solid white; + border-right: 5px solid white; + box-sizing: border-box; + } + &::after { + content: ""; + display: inline-block; + position: absolute; + left: 0; + top: 0; + z-index: -1; + width: 100px; + height: 90px; + // box-shadow: 5px 10px 10px 0px #000000; + } + &.home::before { + background: var(--postit-green); + } + &.about::before { + background: var(--postit-yellow); + } + &.work::before { + background: var(--postit-blue); + } + &.blog::before { + background: var(--postit-pink); + } + } + } } &.pages { li { @@ -226,6 +450,32 @@ } } } + &.knight { + font-family: "MedievalSharp", cursive; + display: inline; + vertical-align: middle; + position: relative; + top: 3px; + margin: 0 2px; + padding: 0 0 0 0; + width: 100px; + box-sizing: border-box; + box-shadow: inset 0px 0px 0px 10px white; + outline: 5px solid; + outline-offset: -5px; + &.home { + outline-color: var(--postit-green); + } + &.about { + outline-color: var(--postit-yellow); + } + &.work { + outline-color: var(--postit-blue); + } + &.blog { + outline-color: var(--postit-pink); + } + } } } &.displayModes { @@ -242,6 +492,106 @@ box-shadow: -2px 2px 0 var(--night-medium); } } + &.knight { + display: block; + position: relative; + top: 3px; + margin: 0px 2px 0px 2px; + padding: 20px 20px 20px 20px; + background: #afec6a; + border-top-left-radius: 0px; + border-top-right-radius: 0px; + cursor: pointer; + // box-shadow: 5px 0px 10px 1px #000000; + box-sizing: border-box; + box-shadow: inset 0px 0px 0px 10px white; + outline: 5px solid; + outline-offset: -5px; + &::before { + border-left-width: 35px; + } + &::after { + left: 35px; + border-right-width: 35px; + } + &.home { + outline-color: var(--postit-green); + } + &.about { + outline-color: var(--postit-yellow); + } + &.work { + outline-color: var(--postit-blue); + } + &.blog { + outline-color: var(--postit-pink); + } + + .tabRibbonStylingInner { + &::after { + left: 25px; + } + &.home { + &::before { + border-left: 35px solid var(--postit-green); + } + &::after { + border-right: 35px solid var(--postit-green); + } + } + &.about { + &::before { + border-left: 35px solid var(--postit-yellow); + } + &::after { + border-right: 35px solid var(--postit-yellow); + } + } + &.work { + &::before { + border-left: 35px solid var(--postit-blue); + } + &::after { + border-right: 35px solid var(--postit-blue); + } + } + &.blog { + &::before { + border-left: 35px solid var(--postit-pink); + } + &::after { + border-right: 35px solid var(--postit-pink); + } + } + } + + .tabRibbonStylingOuter { + &::before { + border-left: 35px solid white; + } + &::after { + left: 30px; + border-right: 35px solid white; + } + } + .tabRibbonStylingBottom { + &::before { + width: 60px; + } + &.home::before { + background: var(--postit-green); + } + &.about { + background: var(--postit-yellow); + } + &.work { + background: var(--postit-blue); + } + &.blog { + background: var(--postit-pink); + } + } + } } li:nth-child(3) { margin-right: 6px; @@ -251,7 +601,7 @@ display: block; color: inherit; text-decoration: none; - padding: 15px 10px 15px 10px; + padding: 15px 10px; line-height: inherit; } svg { @@ -290,49 +640,41 @@ padding: 10px 25px 10px 25px; z-index: 0; box-shadow: 5px 10px 10px 0px #000000; - &.night { - background-color: var(--night-medium); - } - } - - .home { - background-color: var(--postit-green); - color: var(--postit-green); - &::before { - box-shadow: 2px 2px 0 var(--postit-green); - } - &::after { - box-shadow: -2px 2px 0 var(--postit-green); - } - } + position: relative; - .about { - background-color: var(--postit-yellow); - &::before { - box-shadow: 2px 2px 0 var(--postit-yellow); + &.home { + background-color: var(--postit-green); } - &::after { - box-shadow: -2px 2px 0 var(--postit-yellow); + &.about { + background-color: var(--postit-yellow); } - } - - .work { - background-color: var(--postit-blue); - &::before { - box-shadow: 2px 2px 0 var(--postit-blue); + &.work { + background-color: var(--postit-blue); } - &::after { - box-shadow: -2px 2px 0 var(--postit-blue); + &.blog { + background-color: var(--postit-pink); } - } - - .blog { - background-color: var(--postit-pink); - &::before { - box-shadow: 2px 2px 0 var(--postit-pink); + &.night { + background-color: var(--night-medium); } - &::after { - box-shadow: -2px 2px 0 var(--postit-pink); + &.knight { + background-color: var(--knight-off-white); + border-radius: 0; + box-shadow: none; + z-index: 1; + &:before { + content: ""; + display: inline-block; + position: absolute; + top: -15px; + left: 0; + width: 100%; + height: 20px; + background: transparent; + background-image: url(/static/parchment-edge.svg); + background-position: bottom; + box-shadow: none; + } } } diff --git a/src/lib/home/ProjectSummary.svelte b/src/lib/home/ProjectSummary.svelte index fb3aa0d..c0d2c3f 100644 --- a/src/lib/home/ProjectSummary.svelte +++ b/src/lib/home/ProjectSummary.svelte @@ -26,39 +26,54 @@ const img_url = image.url; -
    +
    -
    -
    -

    {type}

    -

    {title}

    -

    {description}

    -

    {tech_stack}

    +
    +
    +
    +
    +

    {type}

    +

    {title}

    +

    + {description} +

    +

    {tech_stack}

    {cta_text}{cta_text}
    diff --git a/src/routes/__layout.svelte b/src/routes/__layout.svelte index 7fe56bb..594537c 100644 --- a/src/routes/__layout.svelte +++ b/src/routes/__layout.svelte @@ -50,6 +50,7 @@ } } &.knight { + background-color: #7c7c7c; background-image: url(/static/desk_background_knight.svg); } &.sprite { @@ -72,6 +73,32 @@ background-color: var(--night-light); color: var(--neutral-white); } + &.knight { + background: var(--knight-off-white); + box-shadow: none; + font-family: MedievalSharp, cursive; + &:before, + &:after { + content: ""; + display: inline-block; + position: absolute; + width: 20px; + height: calc(100% + 160px); + background-image: url(/static/parchment-edge-side.svg); + background-size: 100% auto; + } + &:before { + top: -22px; + left: 100%; + z-index: 10; + } + &:after { + top: -20px; + left: -20px; + transform: rotate(180deg); + z-index: 5; + } + } &.sprite { font-family: "VT323", monospace; } diff --git a/src/routes/index.svelte b/src/routes/index.svelte index b44a1a4..ecbac8f 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -113,5 +113,21 @@ &.night { border: 1px solid var(--neutral-white); } + &.knight { + overflow: visible; + border: none; + border-top: double #5d5d60; + color: #5d5d60; + text-align: center; + &::after { + content: "ยง"; + display: inline-block; + position: relative; + top: -0.7em; + font-size: 1.5em; + padding: 0 0.25em; + background: var(--knight-off-white); + } + } } diff --git a/src/routes/todos/index.svelte b/src/routes/todos/index.svelte index bdf12af..0725333 100644 --- a/src/routes/todos/index.svelte +++ b/src/routes/todos/index.svelte @@ -1,220 +1,234 @@ - Todos + Todos
    -

    Todos

    - -
    { - const created = await res.json(); - todos = [...todos, created]; - - form.reset(); - } - }} - > - -
    - - {#each todos as todo (todo.uid)} -
    -
    { - todo.done = !!data.get('done'); - }, - result: patch - }} - > - -
    - {/each} +

    Todos

    + +
    { + const created = await res.json(); + todos = [...todos, created]; + + form.reset(); + }, + }} + > + +
    + + {#each todos as todo (todo.uid)} +
    +
    { + todo.done = !!data.get("done"); + }, + result: patch, + }} + > + +
    + {/each}