parent
01d69949d0
commit
dba2c885a9
@ -0,0 +1,5 @@
|
|||||||
|
<script context="module" lang="ts">
|
||||||
|
export interface SubComponentArgs {}
|
||||||
|
|
||||||
|
export const globals = {} as const;
|
||||||
|
</script>
|
@ -0,0 +1,26 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { Social } from '$lib/types/cv_types';
|
||||||
|
|
||||||
|
export let socials: Social[] = [
|
||||||
|
{ icon: '', url: 'www.google.com', description: 'Test' }
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
{#each socials as social}
|
||||||
|
<tr>
|
||||||
|
<td>{social.icon}</td>
|
||||||
|
<td>
|
||||||
|
<a href="{social.url.toString()}">{social.description}</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{/each}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
table {
|
||||||
|
grid-area: d;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,6 @@
|
|||||||
|
<script context="module" lang="ts">
|
||||||
|
export type Arg = { argKey: string; argValue: any };
|
||||||
|
export let args: Arg[] = [];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss"></style>
|
@ -1 +0,0 @@
|
|||||||
export const infoBodyPadding: string = '56px' as const;
|
|
@ -1,13 +1,20 @@
|
|||||||
|
<script context="module" lang="ts">
|
||||||
|
export interface InfoArticle {
|
||||||
|
title: string;
|
||||||
|
bodyText: string;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export let title: string;
|
import type { SubComponentArgs } from '$lib/components/info/info.component.svelte';
|
||||||
export let bodyText: string;
|
export let args: SubComponentArgs;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<h2>
|
<h2>
|
||||||
<span>{title}</span>
|
<span>{args.title}</span>
|
||||||
</h2>
|
</h2>
|
||||||
<p>{bodyText}</p>
|
<p>{args.bodyText}</p>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
@ -1,17 +1,35 @@
|
|||||||
|
<script context="module" lang="ts">
|
||||||
|
export interface SubComponentArgs {
|
||||||
|
title: string;
|
||||||
|
bodyText: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const globals = {
|
||||||
|
infoBodyPadding: '56px' as const
|
||||||
|
} as const;
|
||||||
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import InfoArticleComponent from './info.article.component.svelte';
|
import InfoArticleComponent from './info.article.svelte';
|
||||||
import { infoBodyPadding } from './info.component';
|
|
||||||
|
|
||||||
import type { InfoArticleList } from '$lib/types/cv_types';
|
const topBorderStyle = (): string => {
|
||||||
|
return subComponents === undefined ? '' : 'no-top';
|
||||||
|
};
|
||||||
|
|
||||||
export let infoArticles: InfoArticleList;
|
export let subComponents: SubComponentArgs[];
|
||||||
|
|
||||||
let hasTopBorder: string = infoArticles === undefined ? '' : 'no-top';
|
let locals = {
|
||||||
|
hasTopBorder: topBorderStyle()
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="infoBody" class="{hasTopBorder}" style="--padding: {infoBodyPadding};">
|
<div
|
||||||
{#each infoArticles as { title, bodyText }, _}
|
id="infoBody"
|
||||||
<InfoArticleComponent title="{title}" bodyText="{bodyText}" />
|
class="{locals.hasTopBorder}"
|
||||||
|
style="--padding: {globals.infoBodyPadding};"
|
||||||
|
>
|
||||||
|
{#each subComponents as article}
|
||||||
|
<InfoArticleComponent args="{article}" />
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in new issue