a few tweaks

pull/2272/head
Rich Harris 6 years ago
parent d71393a377
commit ad2924acb3

@ -1,7 +1,7 @@
<script> <script>
import { quintOut } from 'svelte/easing'; import { quintOut } from 'svelte/easing';
import { fade, draw, fly } from 'svelte/transition'; import { fade, draw, fly } from 'svelte/transition';
import { expand, blur } from './custom-transitions.js'; import { expand } from './custom-transitions.js';
import { inner, outer } from './shape.js'; import { inner, outer } from './shape.js';
let visible = true; let visible = true;
@ -60,7 +60,7 @@
<div class="centered" out:fly="{{y: -20, duration: 800}}"> <div class="centered" out:fly="{{y: -20, duration: 800}}">
{#each 'SVELTE' as char, i} {#each 'SVELTE' as char, i}
<span <span
in:blur="{{delay: 1000 + i * 150, duration: 800}}" in:fade="{{delay: 1000 + i * 150, duration: 800}}"
>{char}</span> >{char}</span>
{/each} {/each}
</div> </div>

@ -16,19 +16,3 @@ export function expand(node, params) {
css: t => `opacity: ${t}; stroke-width: ${t * w}` css: t => `opacity: ${t}; stroke-width: ${t * w}`
}; };
} }
export function blur(node, params) {
const {
b = 10,
delay = 0,
duration = 400,
easing = cubicOut
} = params;
return {
delay,
duration,
easing,
css: (t, u) => `opacity: ${t}; filter: blur(${u * b}px);`
};
}

@ -20,7 +20,8 @@
main { main {
position: relative; position: relative;
margin: 0 auto; margin: 0 auto;
padding: var(--nav-h) var(--side-nav) 0 var(--side-nav); /* padding: var(--nav-h) var(--side-nav) 0 var(--side-nav); */
padding: var(--nav-h) 0 0 0;
overflow-x: hidden; overflow-x: hidden;
} }
</style> </style>

@ -30,7 +30,7 @@
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
grid-gap: 1em; grid-gap: 1em;
min-height: calc(100vh - var(--nav-h)); min-height: calc(100vh - var(--nav-h));
padding: var(--top-offset) 0; padding: var(--top-offset) var(--side-nav) 0 var(--side-nav);
max-width: var(--main-width); max-width: var(--main-width);
margin: 0 auto; margin: 0 auto;
} }

@ -15,6 +15,7 @@
<style> <style>
.content { .content {
max-width: 120rem; max-width: 120rem;
padding: 0 var(--side-nav);
margin: 0 auto; margin: 0 auto;
} }

@ -10,6 +10,7 @@
.container { .container {
position: relative; position: relative;
margin: 10rem auto; margin: 10rem auto;
padding: 0 var(--side-nav);
max-width: 120rem; max-width: 120rem;
} }
@ -107,15 +108,22 @@
top: 0.6em; top: 0.6em;
} }
.example { .examples {
background: var(--second); background: var(--second);
color: white; color: white;
/* padding: 2em 0; */
overflow: hidden;
}
.example {
/* background: var(--second);
color: white;
padding: 0.8rem; padding: 0.8rem;
border-radius: var(--border-r); border-radius: var(--border-r); */
} }
.example > div:first-child { .example > div:first-child {
padding: 0.8rem; /* padding: 0.8rem; */
} }
iframe { iframe {
@ -226,7 +234,8 @@ npm run dev & open http://localhost:5000
</div> </div>
</section> </section>
<section class="container example linkify"> <div class="examples">
<section class="container example linkify">
<div> <div>
<p>Svelte components are written in HTML files. Just add data.</p> <p>Svelte components are written in HTML files. Just add data.</p>
</div> </div>
@ -236,9 +245,9 @@ npm run dev & open http://localhost:5000
src="/repl/embed?example=hello-world" src="/repl/embed?example=hello-world"
scrolling="no" scrolling="no"
></iframe> ></iframe>
</section> </section>
<section class="container example linkify"> <section class="container example linkify">
<div> <div>
<p>CSS is component-scoped by default — no more style collisions or specificity wars. Or you can <a href="TODO-blog-post-on-css-in-js">use your favourite CSS-in-JS library</a>.</p> <p>CSS is component-scoped by default — no more style collisions or specificity wars. Or you can <a href="TODO-blog-post-on-css-in-js">use your favourite CSS-in-JS library</a>.</p>
</div> </div>
@ -248,9 +257,9 @@ npm run dev & open http://localhost:5000
src="/repl/embed?example=nested-components" src="/repl/embed?example=nested-components"
scrolling="no" scrolling="no"
></iframe> ></iframe>
</section> </section>
<section class="container example linkify"> <section class="container example linkify">
<div> <div>
<p>Trigger efficient, granular updates by assigning to local variables. The compiler does the rest.</p> <p>Trigger efficient, granular updates by assigning to local variables. The compiler does the rest.</p>
</div> </div>
@ -260,9 +269,9 @@ npm run dev & open http://localhost:5000
src="/repl/embed?example=reactive-assignments" src="/repl/embed?example=reactive-assignments"
scrolling="no" scrolling="no"
></iframe> ></iframe>
</section> </section>
<section class="container example linkify"> <section class="container example linkify">
<div> <div>
<p>Build beautiful UIs with a powerful, performant transition engine built right into the framework.</p> <p>Build beautiful UIs with a powerful, performant transition engine built right into the framework.</p>
</div> </div>
@ -272,7 +281,8 @@ npm run dev & open http://localhost:5000
src="/repl/embed?example=svg-transitions" src="/repl/embed?example=svg-transitions"
scrolling="no" scrolling="no"
></iframe> ></iframe>
</section> </section>
</div>
<section class="container linkify"> <section class="container linkify">
<h3>Who's using Svelte?</h3> <h3>Who's using Svelte?</h3>

@ -122,7 +122,7 @@
overflow: hidden; overflow: hidden;
background-color: var(--back); background-color: var(--back);
padding: var(--app-controls-h) 0 0 0; padding: var(--app-controls-h) 0 0 0;
margin: 0 calc(var(--side-nav) * -1); /* margin: 0 calc(var(--side-nav) * -1); */
box-sizing: border-box; box-sizing: border-box;
} }

@ -102,7 +102,7 @@
height: calc(100vh - var(--nav-h)); height: calc(100vh - var(--nav-h));
overflow: hidden; overflow: hidden;
padding: 0; padding: 0;
margin: 0 calc(var(--side-nav) * -1); /* margin: 0 calc(var(--side-nav) * -1); */
box-sizing: border-box; box-sizing: border-box;
display: grid; display: grid;
grid-template-columns: minmax(33.333%, 480px) auto; grid-template-columns: minmax(33.333%, 480px) auto;
@ -118,14 +118,6 @@
color: white; color: white;
} }
.tutorial-repl {
}
.table-of-contents {
}
.chapter-markup { .chapter-markup {
padding: 1em; padding: 1em;
overflow: auto; overflow: auto;
@ -153,11 +145,6 @@
color: white; color: white;
} }
/* .chapter-markup::-webkit-scrollbar-track {
background-color: var(--second);
width: 4px;
} */
.chapter-markup::-webkit-scrollbar { .chapter-markup::-webkit-scrollbar {
background-color: var(--second); background-color: var(--second);
width: 8px; width: 8px;
@ -177,10 +164,6 @@
white-space: nowrap; white-space: nowrap;
} }
.chapter-markup :global(pre) :global(code) {
/* color: var(--text); */
}
.controls { .controls {
border-top: 1px solid rgba(255,255,255,0.1); border-top: 1px solid rgba(255,255,255,0.1);
padding: 1em 0 0 0; padding: 1em 0 0 0;

Loading…
Cancel
Save