Reorganise functions, Use custom Format Date/Relative Time over dayjs

This commit is contained in:
2020-03-06 14:14:17 +01:00
parent 46488146d0
commit adf2563eb8
11 changed files with 128 additions and 72 deletions

View File

@@ -1,6 +1,6 @@
<script>
import { stores } from '@sapper/app'
import * as fn from '../utils/functions'
import { randomString } from '../utils/functions'
const { page } = stores()
// Props
@@ -9,7 +9,7 @@
export let animated = false
// Generate a random ID for the mask
const randomId = fn.randomString(6, 'A')
const randomId = randomString(6, 'A')
</script>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"

View File

@@ -1,6 +1,6 @@
<script>
import { stores } from '@sapper/app'
import * as fn from '../utils/functions'
import { randomString } from '../utils/functions'
const { page } = stores()
// Props
@@ -9,7 +9,7 @@
export let animated = false
// Generate a random ID for the mask
const randomId = fn.randomString(6, 'A')
const randomId = randomString(6, 'A')
</script>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"

View File

@@ -1,6 +1,4 @@
<script>
import * as fn from '../utils/functions'
export let href = '/'
export let text = ''
export let target = null

View File

@@ -1,11 +1,11 @@
<script>
import * as fn from '../utils/functions'
import { lettersToSpan } from '../utils/functions'
</script>
<div class="title-location title-location--inline">
<div role="heading" aria-level="1" aria-label="Houses" data-aos="letters-translate-bottom">
<div class="anim-mask">
{@html fn.lettersToSpan('Houses')}
{@html lettersToSpan('Houses')}
</div>
</div>
@@ -13,7 +13,7 @@
<div aria-label="World" data-aos="letters-translate-bottom">
<div class="anim-mask">
{@html fn.lettersToSpan('World')}
{@html lettersToSpan('World')}
</div>
</div>
</div>