From: Ruben Beltran del Rio Date: Thu, 15 Apr 2021 21:06:26 +0000 (+0200) Subject: Port to sveltekit X-Git-Url: https://git.r.bdr.sh/rbdr/forum/commitdiff_plain/58f7d52150456713d3132408668a92d0f6f3d084?hp=63c3da2af27fcfb1a9893ade03543e3a30949c8d Port to sveltekit --- diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..55df7f3 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,20 @@ +module.exports = { + root: true, + extends: ['@hapi/eslint-config-hapi'], + plugins: ['svelte3'], + overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }], + parserOptions: { + sourceType: 'module', + ecmaVersion: 2019 + }, + env: { + browser: true, + es2017: true, + node: true + }, + rules: { + indent: [2, 2], + 'no-undef': 2, + 'require-yield': 0 + } +}; diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/src/animations/blink.js b/src/animations/blink.js index eeed3de..5515bb6 100644 --- a/src/animations/blink.js +++ b/src/animations/blink.js @@ -14,10 +14,10 @@ export const blink = function whoosh(node, params) { const halfWidth = originalWidth / 2; const halfHeight = originalHeight / 2; // const padding = t < 0.8 ? halfWidth * (1 - t) / 0.8 : halfWidth / 2 + 1; - const height = t <= 0.2 ? (originalHeight * t / 0.2) : originalHeight; - const marginY = t <= 0.2 ? (halfHeight * (1 - t / 0.2)) : 0; + const height = t <= 0.2 ? (originalHeight * t) / 0.2 : originalHeight; + const marginY = t <= 0.2 ? halfHeight * (1 - t / 0.2) : 0; const width = t > 0.2 ? ((t - 0.2) / 0.8) * originalWidth : 0; - const marginX = t > 0.2 ? (1 - ((t - 0.2) / 0.8)) * halfWidth : halfWidth; + const marginX = t > 0.2 ? (1 - (t - 0.2) / 0.8) * halfWidth : halfWidth; return `width: ${width}px; height: ${height}px; margin: ${marginY}px ${marginX}px`; } diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..1d7e288 --- /dev/null +++ b/src/app.css @@ -0,0 +1,4 @@ +:root { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, + 'Open Sans', 'Helvetica Neue', sans-serif; +} diff --git a/src/app.html b/src/app.html new file mode 100644 index 0000000..062ed0f --- /dev/null +++ b/src/app.html @@ -0,0 +1,23 @@ + + + + + + + + + + + %svelte.head% + + + + + + +
%svelte.body%
+ + diff --git a/src/components/error_block/error_block.svelte b/src/components/error_block/error_block.svelte index b85a2ea..3a43a1e 100644 --- a/src/components/error_block/error_block.svelte +++ b/src/components/error_block/error_block.svelte @@ -1,38 +1,40 @@
-

{$_('error.generic.title')}

-

{message || $_('error.generic.message')}

+

{$_('error.generic.title')}

+

{message || $_('error.generic.message')}

- diff --git a/src/components/footer/footer.svelte b/src/components/footer/footer.svelte index 317319e..2d5f8ff 100644 --- a/src/components/footer/footer.svelte +++ b/src/components/footer/footer.svelte @@ -1,36 +1,30 @@ -