adjust sidebar-styles of docs and examples

pull/2642/head
Achim Vedam 7 years ago
parent 9f82d67af1
commit 610f8373eb

@ -48,19 +48,12 @@
a { a {
position: relative; position: relative;
opacity: 0.75; transition: color 0.2s;
transition: opacity 0.2s;
border-bottom: none; border-bottom: none;
padding: 0; padding: 0;
color: var(--second); color: var(--second);
} }
@media (min-width: 832px) {
a {
color: white;
}
}
.section { .section {
display: block; display: block;
padding: 0 0 .8rem 0; padding: 0 0 .8rem 0;
@ -78,22 +71,33 @@
} }
.section:hover, .section:hover,
.subsection:hover { .subsection:hover,
.active {
color: var(--flash); color: var(--flash);
opacity: 1
} }
.subsection[data-level="4"] { .subsection[data-level="4"] {
padding-left: 1.2rem; padding-left: 1.2rem;
} }
.active { opacity: 1 }
.icon-container { .icon-container {
position: absolute; position: absolute;
top: -.2rem; top: -.2rem;
right: 2.4rem; right: 2.4rem;
} }
@media (min-width: 832px) {
a {
color: var(--sidebar-text);
}
a:hover,
.section:hover,
.subsection:hover,
.active {
color: white
}
}
</style> </style>
<ul <ul

@ -22,7 +22,7 @@
.section-title { .section-title {
display: block; display: block;
padding: 0 0 .8rem 0; padding: 0 0 0.8rem 0;
font: 400 var(--h6) var(--font); font: 400 var(--h6) var(--font);
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.12em; letter-spacing: 0.12em;
@ -32,7 +32,7 @@
a { a {
display: flex; display: flex;
position: relative; position: relative;
color: white; color: var(--sidebar-text);
border-bottom: none; border-bottom: none;
padding: 0.2rem 3rem; padding: 0.2rem 3rem;
margin: 0 -3rem; margin: 0 -3rem;
@ -42,17 +42,19 @@
} }
a:hover { a:hover {
color: var(--flash); color: white;
} }
a.active { a.active {
background: rgba(255, 255, 255, 0.1) calc(100% - 3rem) 50% no-repeat url(/icons/arrow-right.svg); background: rgba(0, 0, 0, 0.15) calc(100% - 3rem) 50% no-repeat
url(/icons/arrow-right.svg);
background-size: 1em 1em; background-size: 1em 1em;
color: white; color: white;
} }
a.active.loading { a.active.loading {
background: rgba(255, 255, 255, 0.1) calc(100% - 3rem) 50% no-repeat url(/icons/loading.svg); background: rgba(0, 0, 0, 0.1) calc(100% - 3rem) 50% no-repeat
url(/icons/loading.svg);
background-size: 1em 1em; background-size: 1em 1em;
color: white; color: white;
} }
@ -63,34 +65,34 @@
width: 5rem; width: 5rem;
height: 5rem; height: 5rem;
border-radius: 2px; border-radius: 2px;
box-shadow: 1px 1px 3px rgba(0,0,0,0.13); box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.13);
margin: 0.2em 0.5em 0.2em 0; margin: 0.2em 0.5em 0.2em 0;
} }
</style> </style>
<ul class="examples-toc"> <ul class="examples-toc">
{#each sections as section} {#each sections as section}
<li> <li>
<span class="section-title"> <span class="section-title">
{section.title} {section.title}
</span> </span>
{#each section.examples as example} {#each section.examples as example}
<a <a
href="examples#{example.slug}" href="examples#{example.slug}"
class="row" class="row"
class:active="{example.slug === active_section}" class:active="{example.slug === active_section}"
class:loading="{isLoading}" class:loading="{isLoading}"
> >
<img <img
class="thumbnail" class="thumbnail"
alt="{example.title} thumbnail" alt="{example.title} thumbnail"
src="examples/thumbnails/{example.slug}.jpg" src="examples/thumbnails/{example.slug}.jpg"
> />
<span>{example.title}</span> <span>{example.title}</span>
</a> </a>
{/each} {/each}
</li> </li>
{/each} {/each}
</ul> </ul>

Loading…
Cancel
Save