From 7d7012eec64356ae658a4dd0c962c6609ac5be9b Mon Sep 17 00:00:00 2001 From: Luke Else Date: Tue, 5 Sep 2023 22:53:56 +0100 Subject: [PATCH] Made more reactive styling on main page and template --- rollup.config.js | 10 ---------- src/app.html | 8 +++++++- src/main.svelte | 34 +++++++++++++++++++++------------- src/routes/+layout.svelte | 30 ++++++++++++++++++++++++++---- static/json/me.json | 3 ++- 5 files changed, 56 insertions(+), 29 deletions(-) delete mode 100644 rollup.config.js diff --git a/rollup.config.js b/rollup.config.js deleted file mode 100644 index f9251a1..0000000 --- a/rollup.config.js +++ /dev/null @@ -1,10 +0,0 @@ -import json from '@rollup/plugin-json'; - -export default { - input: 'src/index.js', - output: { - dir: 'output', - format: 'cjs' - }, - plugins: [json()] -}; \ No newline at end of file diff --git a/src/app.html b/src/app.html index e714fcc..148f9c7 100644 --- a/src/app.html +++ b/src/app.html @@ -20,7 +20,7 @@ --purple: #C678DD; --cyan: #56B6C2; - --font: Consolas, 'Cascadia Code'; + --font: Consolas, 'Cascadia Code', Monaco, 'SF Mono', 'DejaVu Sans Mono', 'Roboto Mono'; background: var(--bg); color: var(--fg); @@ -29,6 +29,12 @@ margin: 2rem; } + @media (max-width: 800px) { + .not-required { + display: none; + } + } + a { text-decoration: none; position: relative; diff --git a/src/main.svelte b/src/main.svelte index 9e23912..02f1179 100644 --- a/src/main.svelte +++ b/src/main.svelte @@ -1,5 +1,5 @@
{#await getJson('/json/me.json')}

Loading...

{:then info} -

{info.name}

+ +
+

{info.name}

+

{info.job_title}

+
- {info.name}'s Profile Photo -

{info.about}

+ {info.name}'s Profile Photo +

{@html info.about}

- {:catch error} -

{error.message}

+ {:catch} +

Unable to load portfolio overview data

{/await}
\ No newline at end of file diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index b7a4abf..b34ff8e 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -6,7 +6,14 @@ .main-container { margin-left: 10%; margin-right: 10%; - padding-top: 3em; + padding-top: 2em; + } + + @media (max-width: 800px) { + .main-container { + margin: 0em; + padding-top: 1em; + } } nav { @@ -20,15 +27,30 @@ height: 1.5em; border-radius: 4px; } + + .fade { + -webkit-animation: fadeinout 1s linear forwards; + animation: fadeinout 1s linear forwards; + } + + @-webkit-keyframes fadeinout { + 0% { opacity: 0; } + 100% { opacity: 1; } + } + + @keyframes fadeinout { + 0% { opacity: 0; } + 100% { opacity: 1; } + } -
+
diff --git a/static/json/me.json b/static/json/me.json index 0dff3e7..0df92ab 100644 --- a/static/json/me.json +++ b/static/json/me.json @@ -1,5 +1,6 @@ { "name": "Luke Else", + "job_title": "Software Engineer", "profile_photo": "/profile.jpg", "skills" : [ { @@ -18,5 +19,5 @@ "mastery": 10 } ], - "about": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Vivamus at augue eget arcu dictum varius duis at consectetur. Enim lobortis scelerisque fermentum dui. Eu mi bibendum neque egestas congue quisque egestas. Tincidunt tortor aliquam nulla facilisi cras fermentum odio eu feugiat. Eget est lorem ipsum dolor. Massa sapien faucibus et molestie ac feugiat sed lectus vestibulum. Risus quis varius quam quisque id diam vel quam. Arcu non sodales neque sodales ut. Malesuada fames ac turpis egestas integer eget aliquet nibh. Commodo nulla facilisi nullam vehicula ipsum a arcu cursus." + "about": "Hello! I'm a enthusiastic, dedicated software engineer passionate about backend development, networking, and embedded systems. I am currently employed at Thales UK and thrive on architecting robust backend solutions, optimizing data transmission, and crafting efficient embedded software. I love tackling complex challenges, collaborating with fellow professionals, and staying up-to-date with tech trends such as my current venture in learning Rust-Lang." } \ No newline at end of file