examples changes

pull/2437/head
Achim Vedam 6 years ago
parent 3f8fa18443
commit 0b517eafda

@ -19,60 +19,57 @@
margin: 0 auto; margin: 0 auto;
} }
h1 { h1 { margin: 6rem 0 6rem -0.05em }
margin: 4rem 0 4rem -0.05em;
font-size: 4rem;
}
h2 { h2 {
margin: 0 0 1em 0; margin: 0 0 1em 0;
font-size: 18px; font: 600 var(--h6) var(--font);
border-bottom: 1px solid #eee; border-bottom: var(--border-w) solid #eee;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: .05em;
padding: 0 0 0.5em 0; padding: 0 0 0.5em 0;
} }
section { section { margin: 0 0 4rem 0 }
margin: 0 0 2em 0;
}
.example { .example {
position: relative;
display: flex; display: flex;
flex-wrap: wrap;
align-items: center; align-items: center;
padding: 0 0 0 85px; justify-content: center;
min-height: 50px; text-align: center;
font-weight: 300; font: 300 var(--h6) var(--font);
} }
.grid { .thumbnail {
grid-template-columns: repeat(1, 1fr); position: relative;
grid-gap: 0.5em; background: white 50% 50% no-repeat;
background-size: contain;
width: 5rem;
height: 5rem;
margin: .8rem 33%;
border: 1px solid #ccc;
border-radius: var(--border-r);
box-shadow: 1px 1px 2px rgba(0,0,0,0.13);
} }
@media (min-width: 720px) { .e-grid {
.grid { display: grid;
/* grid-gap: 2.4rem; */
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
} align-items: center;
} }
@media (min-width: 1080px) { @media (min-width: 720px) {
.grid { .e-grid {
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(4, 1fr);
} }
} }
.thumbnail { @media (min-width: 1080px) {
position: absolute; .e-grid {
background: white 50% 50% no-repeat; grid-template-columns: repeat(6, 1fr);
background-size: contain; }
width: 75px;
height: 50px;
left: 0;
top: 0;
border: 1px solid #ccc;
border-radius: 2px;
box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
} }
</style> </style>
@ -80,14 +77,14 @@
<h1>Examples</h1> <h1>Examples</h1>
{#each groups as group} {#each groups as group}
<section> <section class="">
<h2>{group.title}</h2> <h2>{group.title}</h2>
<div class="grid"> <div class="e-grid">
{#each group.examples as example} {#each group.examples as example}
<a class="example" href="repl?example={example.slug}"> <a class="example" href="repl?example={example.slug}">
<div class="thumbnail" style="background-image: url(examples/thumbnails/{example.slug}.png)"></div> <div class="thumbnail" style="background-image: url(examples/thumbnails/{example.slug}.png)"></div>
<span>{example.title}</span> <p>{example.title}</p>
</a> </a>
{/each} {/each}
</div> </div>

Loading…
Cancel
Save