Skip to content

Commit a0ca8ab

Browse files
committed
Copy index.html, App.svelte, global.css from rollup template
1 parent 074bfa4 commit a0ca8ab

File tree

3 files changed

+38
-16
lines changed

3 files changed

+38
-16
lines changed

public/index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
<!doctype html>
2-
<html>
1+
<!DOCTYPE html>
2+
<html lang="en">
33
<head>
4-
<meta charset='utf8'>
5-
<meta name='viewport' content='width=device-width'>
4+
<meta charset='utf-8'>
5+
<meta name='viewport' content='width=device-width,initial-scale=1'>
66

77
<title>Svelte app</title>
88

9-
<link rel='icon' type='image/png' href='favicon.png'>
10-
<link rel='stylesheet' href='build/bundle.css'>
9+
<link rel='icon' type='image/png' href='/favicon.png'>
10+
<link rel='stylesheet' href='/build/bundle.css'>
11+
12+
<script defer src='/build/bundle.js'></script>
1113
</head>
1214

1315
<body>
14-
<script src='build/bundle.js'></script>
1516
</body>
1617
</html>

src/App.svelte

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,29 @@
22
export let name;
33
</script>
44

5+
<main>
6+
<h1>Hello {name}!</h1>
7+
<p>Visit the <a href="https://svelte.dev/tutorial">Svelte tutorial</a> to learn how to build Svelte apps.</p>
8+
</main>
9+
510
<style>
11+
main {
12+
text-align: center;
13+
padding: 1em;
14+
max-width: 240px;
15+
margin: 0 auto;
16+
}
17+
618
h1 {
7-
color: purple;
19+
color: #ff3e00;
20+
text-transform: uppercase;
21+
font-size: 4em;
22+
font-weight: 100;
823
}
9-
</style>
1024
11-
<h1>Hello {name}!</h1>
25+
@media (min-width: 640px) {
26+
main {
27+
max-width: none;
28+
}
29+
}
30+
</style>

src/global.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ label {
3232
input, button, select, textarea {
3333
font-family: inherit;
3434
font-size: inherit;
35+
-webkit-padding: 0.4em 0;
3536
padding: 0.4em;
3637
margin: 0 0 0.5em 0;
3738
box-sizing: border-box;
@@ -43,19 +44,20 @@ input:disabled {
4344
color: #ccc;
4445
}
4546

46-
input[type="range"] {
47-
height: 0;
48-
}
49-
5047
button {
48+
color: #333;
5149
background-color: #f4f4f4;
5250
outline: none;
5351
}
5452

55-
button:active {
53+
button:disabled {
54+
color: #999;
55+
}
56+
57+
button:not(:disabled):active {
5658
background-color: #ddd;
5759
}
5860

5961
button:focus {
6062
border-color: #666;
61-
}
63+
}

0 commit comments

Comments
 (0)