Change profile pic

This commit is contained in:
Michal Vanko 2020-09-26 15:49:50 +02:00
parent 46195dc3d3
commit f34e72c53e
7 changed files with 42 additions and 33 deletions

7
package-lock.json generated
View File

@ -2497,10 +2497,9 @@
"integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==" "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw=="
}, },
"@types/node": { "@types/node": {
"version": "12.6.2", "version": "14.11.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.2.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz",
"integrity": "sha512-gojym4tX0FWeV2gsW4Xmzo5wxGjXGm550oVUII7f7G5o4BV6c7DBdiG1RRQd+y1bvqRyYtPfMK85UM95vsapqQ==", "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA=="
"dev": true
}, },
"@types/parse-json": { "@types/parse-json": {
"version": "4.0.0", "version": "4.0.0",

View File

@ -12,9 +12,10 @@
"test": "run-p --race dev cy:run" "test": "run-p --race dev cy:run"
}, },
"dependencies": { "dependencies": {
"@rollup/plugin-typescript": "^6.0.0",
"@types/node": "^14.11.2",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"compression": "^1.7.4", "compression": "^1.7.4",
"@rollup/plugin-typescript": "^6.0.0",
"date-fns": "^2.16.1", "date-fns": "^2.16.1",
"feed": "^4.2.1", "feed": "^4.2.1",
"front-matter": "^4.0.2", "front-matter": "^4.0.2",

View File

@ -1,34 +1,35 @@
<script> <script lang="typescript">
export let status; export let status
export let error; export let error
const dev = process.env.NODE_ENV === 'development'; const dev = process.env.NODE_ENV === 'development'
</script> </script>
<style> <style>
h1, p { h1,
margin: 0 auto; p {
} margin: 0 auto;
}
h1 { h1 {
font-size: 2.8em; font-size: 2.8em;
font-weight: 700; font-weight: 700;
margin: 0 0 0.5em 0; margin: 0 0 0.5em 0;
} }
p { p {
margin: 1em auto; margin: 1em auto;
} }
@media (min-width: 480px) { @media (min-width: 480px) {
h1 { h1 {
font-size: 4em; font-size: 4em;
} }
} }
</style> </style>
<svelte:head> <svelte:head>
<title>{status}</title> <title>{status}</title>
</svelte:head> </svelte:head>
<h1>{status}</h1> <h1>{status}</h1>
@ -36,5 +37,5 @@
<p>{error.message}</p> <p>{error.message}</p>
{#if dev && error.stack} {#if dev && error.stack}
<pre>{error.stack}</pre> <pre>{error.stack}</pre>
{/if} {/if}

View File

@ -1,16 +1,16 @@
<script context="module"> <script context="module" lang="typescript">
import { take } from 'ramda' import { take } from 'ramda'
export function preload({ params, query }) { export function preload({ params, query }) {
return this.fetch(`blog.json`) return this.fetch(`blog.json`)
.then(r => r.json()) .then((r) => r.json())
.then(posts => { .then((posts) => {
return { latestPosts: take(5, posts) } return { latestPosts: take(5, posts) }
}) })
} }
</script> </script>
<script> <script lang="typescript">
import Nav from '../components/Nav.svelte' import Nav from '../components/Nav.svelte'
import Footer from '../components/Footer.svelte' import Footer from '../components/Footer.svelte'
export let segment export let segment
@ -19,7 +19,10 @@
<style> <style>
.app-content { .app-content {
display: grid;
grid-template-rows: auto 1fr auto;
background: #f2f6f6; background: #f2f6f6;
min-height: 100vh;
} }
main { main {

View File

@ -17,7 +17,6 @@
img { img {
width: 100%; width: 100%;
max-width: 420px;
margin: 0 0 1em 0; margin: 0 0 1em 0;
border-radius: 5px; border-radius: 5px;
box-shadow: 0px 0px 8px 1px #2d3935; box-shadow: 0px 0px 8px 1px #2d3935;
@ -38,7 +37,10 @@
<header class="index-header"> <header class="index-header">
<figure class="profile-pic"> <figure class="profile-pic">
<img alt="My eye" src="eye.png" /> <picture>
<source srcset="images/profile-picture.webp" type="image/webp" />
<img alt="My profile picture" src="image/profil-picture.jpg" />
</picture>
</figure> </figure>
<p class="motto"> <p class="motto">

BIN
static/images/profile-picture.jpg (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB