Skip to content

Commit

Permalink
BREAKING CHANGE: v3.0.0 (complete refactor)
Browse files Browse the repository at this point in the history
  • Loading branch information
6eDesign committed Sep 16, 2021
1 parent 25465c0 commit e94da3e
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.png" />
<link rel="icon" href="/svelte-calendar/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://fonts.googleapis.com/css?family=Rajdhani:400,700" rel="stylesheet">
%svelte.head%
Expand Down
3 changes: 2 additions & 1 deletion src/lib/docs/examples/CustomTheme.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script>
import { InlineCalendar } from '../../../../index';
import { base } from '$app/paths';
const theme = {
calendar: {
Expand All @@ -16,5 +17,5 @@

<!-- Example Notes -->
<p>
See <a href="/docs/theme-editor/light">theme-editor page</a> to design your own theme.
See <a href="{base}/docs/theme-editor/light">theme-editor page</a> to design your own theme.
</p>
3 changes: 2 additions & 1 deletion src/lib/docs/examples/DarkTheme.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<script>
import { base } from '$app/paths';
import { InlineCalendar, themes } from '../../../../index';
const { dark: theme } = themes;
</script>

<InlineCalendar {theme} />

<!-- Example Notes -->
<p>Not your cup of tea? <a href="/docs/theme-editor/light">Design your own theme.</a></p>
<p>Not your cup of tea? <a href="{base}/docs/theme-editor/light">Design your own theme.</a></p>
19 changes: 9 additions & 10 deletions src/routes/__layout.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script>
import { page, navigating } from '$app/stores';
import Swappable from '$lib/components/generic/Swappable.svelte';
import { navigating } from '$app/stores';
import { base } from '$app/paths';
import Theme from '$lib/components/generic/Theme.svelte';
import ToggleSwitch from '$lib/components/generic/ToggleSwitch.svelte';
Expand All @@ -11,13 +10,13 @@
import { spring } from 'svelte/motion';
const links = [
{ href: '/', text: 'Home' },
{ href: '/docs/quick-start', text: 'Quick-Start' },
{ href: '/docs/props', text: 'Props' },
{ href: '/docs/examples', text: 'Examples' },
{ href: `${base}/`, text: 'Home' },
{ href: `${base}/docs/quick-start`, text: 'Quick-Start' },
{ href: `${base}/docs/props`, text: 'Props' },
{ href: `${base}/docs/examples`, text: 'Examples' },
{
href: '/docs/theme-editor/light',
isActive: (p) => p.startsWith('/docs/theme-editor'),
href: `${base}/docs/theme-editor/light`,
isActive: (p) => p.startsWith(`${base}/docs/theme-editor`),
text: 'Theme Editor'
}
];
Expand All @@ -39,7 +38,7 @@
<div {style} class="container">
<div class="header">
<div class="stage">
<img src="/logo.png" alt="6eDesign" style="transform: rotate({$rotation}deg);" />
<img src="{base}/logo.png" alt="6eDesign" style="transform: rotate({$rotation}deg);" />
</div>
<h1>svelte-calendar</h1>
<div class="header-right">
Expand Down
4 changes: 2 additions & 2 deletions src/routes/docs/props.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script>
import Code from '$lib/docs/Code.svelte';
import DocPage from '$lib/docs/DocPage.svelte';
import { base } from '$app/paths';
const props = [
{
Expand Down Expand Up @@ -42,8 +43,7 @@
{
name: 'theme',
defaultVal: '{}',
description:
'An object containing theme/style overrides for the component. See <a href="/docs/theme-editor/light">theme-editor documentation</a>'
description: `An object containing theme/style overrides for the component. See <a href="${base}/docs/theme-editor/light">theme-editor documentation</a>`
}
];
</script>
Expand Down
4 changes: 3 additions & 1 deletion src/routes/docs/quick-start.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script>
import Code from '$lib/docs/Code.svelte';
import DocPage from '$lib/docs/DocPage.svelte';
import { base } from '$app/paths';
// @example(quickStart, QuickStart.svelte)
Expand All @@ -24,7 +25,8 @@
</li>
<li>
<h3>
See <a href="/docs/props">props</a> &amp; <a href="/docs/examples">examples</a> for more information
See <a href="{base}/docs/props">props</a> &amp; <a href="{base}/docs/examples">examples</a> for
more information
</h3>
</li>
</ol>
Expand Down
5 changes: 3 additions & 2 deletions src/routes/docs/theme-editor/[slug].svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import NavBarItem from '$lib/docs/NavBarItem.svelte';
import { setContext } from 'svelte';
import { writable } from 'svelte/store';
import { base } from '$app/paths';
const focused = writable(false);
Expand Down Expand Up @@ -50,8 +51,8 @@
>
<JsonEditor bind:json={theme} bind:this={jsonEditor} />
<NavBar>
<NavBarItem href="/docs/theme-editor/light">Light</NavBarItem>
<NavBarItem href="/docs/theme-editor/dark">Dark</NavBarItem>
<NavBarItem href="{base}/docs/theme-editor/light">Light</NavBarItem>
<NavBarItem href="{base}/docs/theme-editor/dark">Dark</NavBarItem>
</NavBar>
</div>
<div class="results-panel">
Expand Down
3 changes: 2 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const config = {
paths: !process.env.DEPLOY
? {}
: {
base: '/svelte-calendar'
base: '/svelte-calendar',
assets: '/svelte-calendar'
},
appDir: 'internal',
adapter: static_adapter({
Expand Down

0 comments on commit e94da3e

Please sign in to comment.