add external_style attribute to wc to load external css

This commit is contained in:
lesion
2022-03-15 15:01:44 +01:00
parent 8657937607
commit 083a050a25
5 changed files with 410 additions and 231 deletions

View File

@@ -7,7 +7,7 @@
<title>Gancio Events Custom Element Demo</title>
</head>
<body>
<gancio-events baseurl='https://demo.gancio.org' title='demo' theme='light' show_recurrent='true'></gancio-events>
<gancio-events baseurl='https://demo.gancio.org' title='demo' theme='light' show_recurrent='true' external_style='gancio.css'></gancio-events>
<br/>
<gancio-events baseurl='https://gancio.cisti.org' title='La punta' theme='dark' show_recurrent='true'></gancio-events>
<br/>

View File

@@ -8,7 +8,9 @@
export let places = ''
export let theme = 'light'
export let show_recurrent=false
export let sidebar='true'
export let sidebar = 'true'
export let external_style = ''
let mounted = false
let events = []
@@ -71,6 +73,7 @@
</script>
<svelte:options tag="gancio-events"/>
{#if external_style}<link rel='stylesheet' href='{external_style}' />{/if}
{#if events.length}
<div id='gancioEvents'
class:dark="{theme === 'dark'}" class:light="{theme === 'light'}"
@@ -128,7 +131,6 @@
font-size: 1rem;
}
.nosidebar {
max-width: 1200px;
}