Frontend: Added mailto link, changing mail display, fixed sliding.
This commit is contained in:
parent
407200e2b8
commit
3b4a98b22f
4 changed files with 24 additions and 15 deletions
|
@ -1,20 +1,27 @@
|
||||||
<script>
|
<script>
|
||||||
import "$lib/css/sidebar-component.css";
|
import "$lib/css/sidebar-component.css";
|
||||||
import SvgIcon from '@jamescoyle/svelte-icon'
|
import SvgIcon from "@jamescoyle/svelte-icon";
|
||||||
import { mdiHelpCircle } from '@mdi/js';
|
import { mdiHelpCircle } from "@mdi/js";
|
||||||
|
|
||||||
export let icon = mdiHelpCircle;
|
export let icon = mdiHelpCircle;
|
||||||
export let title = "";
|
export let title = "";
|
||||||
export let description = "";
|
export let description = "";
|
||||||
const descriptionArray = description.split(";");
|
export let maito = false;
|
||||||
|
const descriptionArray = description.split(";");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="sc-container">
|
<div class="sc-container">
|
||||||
<div class="sc-icon">
|
<div class="sc-icon">
|
||||||
<SvgIcon size="45" path={icon} type="mdi"/>
|
<SvgIcon size="45" path={icon} type="mdi" />
|
||||||
</div>
|
</div>
|
||||||
<h1 class="text sc-title">{title}</h1>
|
<h1 class="text sc-title">{title}</h1>
|
||||||
|
{#if maito}
|
||||||
|
<a class="text sc-description" href={`mailto:${description}`}
|
||||||
|
>{description.replace("@", "[at]")}</a
|
||||||
|
>
|
||||||
|
{:else}
|
||||||
{#each descriptionArray as text}
|
{#each descriptionArray as text}
|
||||||
<h2 class="text sc-description">{text}</h2>
|
<h2 class="text sc-description">{text}</h2>
|
||||||
{/each}
|
{/each}
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
|
@ -91,7 +91,7 @@
|
||||||
<SidebarComponent icon={mdiAccount} description={birth_year} />
|
<SidebarComponent icon={mdiAccount} description={birth_year} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if info.email != null}
|
{#if info.email != null}
|
||||||
<SidebarComponent icon={mdiEmailOutline} description={info.email} />
|
<SidebarComponent icon={mdiEmailOutline} description={info.email} maito="true"/>
|
||||||
{/if}
|
{/if}
|
||||||
{#if info.phone_number != null}
|
{#if info.phone_number != null}
|
||||||
<SidebarComponent icon={mdiPhone} description={info.phone_number} />
|
<SidebarComponent icon={mdiPhone} description={info.phone_number} />
|
||||||
|
|
|
@ -181,7 +181,7 @@
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="slideshow"
|
class="slideshow"
|
||||||
use:swipe={{ timeframe: 300, minSwipeDistance: 100, touchAction: "pan-y" }}
|
use:swipe={{ timeframe: 3000, minSwipeDistance: 10, touchAction: "pan-y" }}
|
||||||
on:swipe={mobileSwipe}
|
on:swipe={mobileSwipe}
|
||||||
bind:this={slideshow}
|
bind:this={slideshow}
|
||||||
>
|
>
|
||||||
|
|
|
@ -32,4 +32,6 @@
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
|
display: block;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue