Skip to content

Commit f2ab43c

Browse files
Website improvements
1 parent 20006b1 commit f2ab43c

File tree

4 files changed

+86
-37
lines changed

4 files changed

+86
-37
lines changed

src/app.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<link rel="preconnect" href="https://fonts.googleapis.com" />
2323
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
2424
<link
25-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
25+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"
2626
rel="stylesheet"
2727
/>
2828
%svelte.head%

src/routes/__layout.svelte

Lines changed: 74 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,43 @@
3737

3838
<div class="layout">
3939
<header>
40-
<h2><a href="/">Date Picker Svelte</a></h2>
41-
<a class="nav-link" href="/demo">Demo</a>
42-
<a class="nav-link" href="/docs">Docs</a>
43-
<a class="nav-link" href="https://svelte.dev/repl/044911429c4b4e659362518d9a5deaae?version=3"
44-
>REPL</a
45-
>
46-
<div class="spacer" />
47-
<a class="nav-link" href="https://github.com/probablykasper/date-picker-svelte">GitHub</a>
48-
<button class="theme-toggle" on:click={toggleTheme}>
49-
<svg
50-
xmlns="http://www.w3.org/2000/svg"
51-
enable-background="new 0 0 24 24"
52-
viewBox="0 0 24 24"
53-
height="22px"
54-
width="22px"
55-
><rect fill="none" height="24" width="24" /><path
56-
d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"
57-
/></svg
58-
>
59-
</button>
40+
<div class="left">
41+
<a class="header-title" href="/">Date Picker Svelte</a>
42+
<div class="links">
43+
<a class="nav-link" href="/demo">Demo</a>
44+
<a class="nav-link" href="/docs">Docs</a>
45+
<a
46+
class="nav-link"
47+
href="https://svelte.dev/repl/044911429c4b4e659362518d9a5deaae?version=3">REPL</a
48+
>
49+
</div>
50+
</div>
51+
<div class="icons">
52+
<a class="icon github" href="https://github.com/probablykasper/date-picker-svelte">
53+
<svg height="24" viewBox="-2 -2 28 28" width="24" xmlns="http://www.w3.org/2000/svg"
54+
><path
55+
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"
56+
fill="none"
57+
stroke="#000"
58+
stroke-linecap="round"
59+
stroke-linejoin="round"
60+
stroke-width="2"
61+
/></svg
62+
>
63+
</a>
64+
<button class="icon theme-toggle" on:click={toggleTheme}>
65+
<svg
66+
xmlns="http://www.w3.org/2000/svg"
67+
enable-background="new 0 0 24 24"
68+
viewBox="0 0 24 24"
69+
height="24px"
70+
width="24px"
71+
><rect fill="none" height="24" width="24" /><path
72+
d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"
73+
/></svg
74+
>
75+
</button>
76+
</div>
6077
</header>
6178
<div class="page">
6279
<slot />
@@ -66,7 +83,7 @@
6683
<style lang="sass">
6784
@import url('./_prism-holi-theme.css')
6885
:global(:root)
69-
--primary: #0269f7
86+
--primary: #1a79ff
7087
--input-highlight-border: rgb(2, 105, 247)
7188
--input-highlight-shadow: rgba(2, 105, 247, 0.5)
7289
--input-width: 150px
@@ -99,29 +116,49 @@
99116
font-family: Inter, sans-serif
100117
margin: 0px
101118
:global(a)
102-
color: #1257f8
119+
color: #3370ff
103120
text-decoration: none
104121
.layout
105122
transition: all 80ms cubic-bezier(0.4, 0.0, 0.2, 1)
106123
min-height: 100vh
107124
header
108125
display: flex
109126
align-items: center
110-
height: 60px
111-
max-width: 800px
112-
padding: 0px 30px
113-
padding-top: 10px
114-
margin: auto
127+
height: 80px
128+
padding: 5px 30px
129+
margin-bottom: 25px
130+
background-color: hsla(234, 20%, 70%, 0.07)
131+
border-bottom: 1px solid hsla(234, 10%, 50%, 0.1)
132+
@media screen and (min-width: 560px)
133+
height: 60px
134+
.left
135+
display: flex
136+
flex-direction: column
137+
@media screen and (min-width: 560px)
138+
flex-direction: row
139+
.links
140+
display: flex
141+
align-items: center
142+
.icons
143+
display: flex
144+
margin-left: auto
145+
align-items: center
115146
.page
116147
max-width: 800px
117148
margin: auto
118149
padding: 0px 30px
119150
padding-bottom: 100px
120-
h2
151+
.header-title
121152
color: var(--primary)
153+
font-weight: 500
154+
font-size: 1.5em
122155
margin-right: 20px
156+
padding: 2px 0px
123157
:global(h1)
124-
font-size: 3.5em
158+
font-size: 2em
159+
:global(h1, h2)
160+
margin-block-start: 0.9em
161+
margin-block-end: 0.9em
125162
:global(::selection)
126163
background: var(--primary)
127164
color: #ffffff
@@ -135,21 +172,23 @@
135172
opacity: 0.7
136173
a.nav-link
137174
padding: 5px 2px
138-
margin: 0px 8px
175+
margin-right: 16px
139176
transition: all 80ms cubic-bezier(0.4, 0.0, 0.2, 1)
140-
.spacer
141-
margin: auto
142-
button.theme-toggle
177+
.icon
143178
display: block
144179
border: none
145180
background-color: transparent
146181
padding: 5px 2px
147-
margin: 5px
182+
margin: 0px 5px
148183
cursor: pointer
149184
svg
150-
fill: var(--foreground)
151185
display: block
152186
transition: all 80ms cubic-bezier(0.4, 0.0, 0.2, 1)
187+
&.theme-toggle svg
188+
fill: var(--foreground)
189+
&.github svg > path
190+
transition: all 80ms cubic-bezier(0.4, 0.0, 0.2, 1)
191+
stroke: var(--foreground)
153192
:global(table)
154193
border-collapse: collapse
155194
:global(td), :global(th)

src/routes/docs.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Docs
1+
# Documentation
2+
3+
## Install
4+
```
5+
npm install -D date-picker-svelte
6+
```
27

38
## Usage
49

src/routes/index.svelte

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
<li>Keyboard shortcuts</li>
1818
</ul>
1919

20+
<h2>Install</h2>
21+
<pre class="language-">
22+
npm install -D date-picker-svelte
23+
</pre>
24+
2025
<h2>DateInput</h2>
2126
<DateInput />
2227

0 commit comments

Comments
 (0)