Finish color and styling settings

This commit is contained in:
Michal Vanko 2021-05-05 20:31:52 +02:00
parent 84ac7b011e
commit 2a432588f9
11 changed files with 207 additions and 179 deletions

View File

@ -14,6 +14,7 @@
<link rel="stylesheet" href="/print.css" media="print" /> <link rel="stylesheet" href="/print.css" media="print" />
<link rel="stylesheet" href="/fonts.css" /> <link rel="stylesheet" href="/fonts.css" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />
<link rel="stylesheet" href="/prism.css" />
<link rel="icon" type="image/svg+xml" href="/m-logo.svg" /> <link rel="icon" type="image/svg+xml" href="/m-logo.svg" />
<link rel="icon" type="image/png" href="/m-logo-192.png" /> <link rel="icon" type="image/png" href="/m-logo-192.png" />

View File

@ -4,7 +4,7 @@
export let segment export let segment
</script> </script>
<nav class="navigation-theme"> <nav>
<section class="nav-main"> <section class="nav-main">
<ul> <ul>
<li> <li>
@ -39,22 +39,32 @@
</a> </a>
</aside> </aside>
</section> </section>
</nav>
{#if segment === 'portfolio'} {#if segment === '/portfolio'}
<!-- Move to portfolio layout -->
<section class="page-navigation"> <section class="page-navigation">
<a href="portfolio#personal-information">About</a> <div class="page-navigation-links">
<a href="portfolio#skills">Skills</a> <a href="/portfolio#personal-information">About</a>
<a href="portfolio#work-history">Work History</a> <a href="/portfolio#skills">Skills</a>
<a href="portfolio#projects">Projects</a> <a href="/portfolio#work-history">Work History</a>
<a href="portfolio#education">Education</a> <a href="/portfolio#projects">Projects</a>
<a href="/portfolio#education">Education</a>
</div>
</section> </section>
{/if} {/if}
</nav>
<style> <style>
@import '../styles/variables.module.less'; @import '../styles/variables.module.less';
a {
color: @menu-link-color;
padding: 0.4em 0.5em;
&:hover {
color: @menu-link-hover-color;
}
}
nav { nav {
padding: 0.5em 0.5em 1em; padding: 0.5em 0.5em 1em;
@ -65,18 +75,7 @@
); );
color: @menu-color; color: @menu-color;
} text-shadow: @menu-link-text-shadow;
a {
color: @menu-link-color;
&:hover {
color: @menu-link-hover-color;
}
}
nav a {
padding: 0.4em 0.5em;
} }
.nav-main { .nav-main {
@ -111,14 +110,22 @@
} }
a.selected { a.selected {
text-shadow: 0px 0px 1px; text-shadow: @menu-active-link-text-shadow;
} }
.page-navigation { .page-navigation {
position: sticky;
top: 0px;
z-index: 1;
width: 100%;
font-size: 0.86em; font-size: 0.86em;
border-top: 1px solid #65624f; padding: 0.3em;
padding-top: 0.4em; background: @bg-color;
max-width: 900px; box-shadow: 0px 0.5em 0.5em @bg-color;
margin: 0.3em auto 0; }
.page-navigation-links {
max-width: @media-l;
margin: 0 auto;
} }
</style> </style>

View File

@ -1,41 +1,10 @@
<script lang="typescript"> <script lang="typescript">
import { format } from 'date-fns' import { format } from 'date-fns'
import type { PostContent } from '../../routes/blog/_content'; import type { PostContent } from '../../routes/blog/_content'
export let post: PostContent export let post: PostContent
</script> </script>
<style>
.tags-list {
list-style: none;
margin: 0;
padding: 0;
display: inline;
}
.tags-list li {
display: inline;
font-style: italic;
}
.lighten {
color: #595a8f;
}
time {
font-style: italic;
}
footer {
display: flex;
font-size: 0.85em;
justify-content: space-between;
padding-top: 0.2em;
margin-top: 0.4em;
border-top: 1px solid #c0c1e1;
}
</style>
<footer> <footer>
<div class="article-tags"> <div class="article-tags">
{#if post.tags.length > 0} {#if post.tags.length > 0}
@ -56,3 +25,37 @@
</time> </time>
</div> </div>
</footer> </footer>
<style>
@import '../../styles/variables.module.less';
.tags-list {
list-style: none;
margin: 0;
padding: 0;
display: inline;
}
.tags-list li {
display: inline;
font-style: italic;
}
.lighten {
color: tint(@article-text-color, 25%);
}
time {
white-space: nowrap;
font-style: italic;
}
footer {
display: flex;
font-size: 0.8em;
justify-content: space-between;
padding-top: 0.6em;
margin-top: 1em;
border-top: 1px solid fade(desaturate(@tearkiss, 50%), 40%);
}
</style>

View File

@ -43,12 +43,8 @@
main { main {
position: relative; position: relative;
max-width: calc(100vw - 1em); max-width: 100vw;
padding: 1.4em; padding: 1.2em;
@media (min-width: @media-l) {
/* max-width: 34em; */
}
h1, h1,
h2, h2,
@ -61,7 +57,9 @@
ol, ol,
figure, figure,
img, img,
blockquote { blockquote,
iframe,
footer {
max-width: 42rem; max-width: 42rem;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@ -82,5 +80,19 @@
figure { figure {
max-width: @max-image-size; max-width: @max-image-size;
} }
iframe {
max-width: 46rem;
display: block;
}
footer {
max-width: 52rem;
}
img {
width: 100%;
margin: 0 0 1em 0;
border-radius: 5px;
box-shadow: @content-box-shadow;
}
} }
</style> </style>

View File

@ -33,7 +33,6 @@
<svelte:head> <svelte:head>
<title>{post.title}</title> <title>{post.title}</title>
<link rel="stylesheet" href="/prism.css" />
</svelte:head> </svelte:head>
<h1>{post.title}</h1> <h1>{post.title}</h1>
@ -44,6 +43,8 @@
<ArticleFooter {post} /> <ArticleFooter {post} />
<style> <style>
@import '../../styles/variables.module.less';
/* /*
By default, CSS is locally scoped to the component, By default, CSS is locally scoped to the component,
and any unused styles are dead-code-eliminated. and any unused styles are dead-code-eliminated.
@ -52,18 +53,6 @@
so we have to use the :global(...) modifier to target so we have to use the :global(...) modifier to target
all elements inside .content all elements inside .content
*/ */
.content :global(pre) {
background-color: #f9f9f9;
box-shadow: inset 1px 1px 5px rgba(0, 0, 0, 0.05);
padding: 0.5em;
border-radius: 4px;
overflow-x: auto;
}
.content :global(pre) :global(code) {
background-color: transparent;
/* padding: 0; */
}
.content :global(ul) { .content :global(ul) {
line-height: 1.5; line-height: 1.5;
@ -74,10 +63,7 @@
} }
.content :global(img) { .content :global(img) {
max-width: 100%;
max-height: 640px; max-height: 640px;
border-radius: 5px;
box-shadow: 0px 0px 8px 1px #2d3935;
} }
.content :global(img:only-child) { .content :global(img:only-child) {

View File

@ -73,7 +73,7 @@
} }
.post-list > li:not(:last-child) { .post-list > li:not(:last-child) {
margin-bottom: 2em; margin-bottom: 3em;
} }
.see-all { .see-all {

View File

@ -35,13 +35,6 @@
margin: 0 auto; margin: 0 auto;
} }
img {
width: 100%;
margin: 0 0 1em 0;
border-radius: 5px;
box-shadow: 0px 0px 8px 1px #2d3935;
}
p { p {
margin: 1em auto; margin: 1em auto;
} }

View File

@ -81,10 +81,6 @@
margin-top: 2em; margin-top: 2em;
} }
h1 {
text-shadow: 2px 2px 1px #c8c4b7; // TODO
}
.name-tag { .name-tag {
text-align: center; text-align: center;
} }

View File

@ -24,7 +24,7 @@ h5,
h6 { h6 {
margin: 1em 0 0.5em 0; margin: 1em 0 0.5em 0;
line-height: 1.2; line-height: 1.2;
// text-shadow: 1px 1px 1px #c6c4b7; text-shadow: @header-text-shadow;
color: @header-color; color: @header-color;
letter-spacing: -0.01em; letter-spacing: -0.01em;
font-weight: 500; font-weight: 500;
@ -50,7 +50,7 @@ h4 {
a { a {
text-decoration: none; text-decoration: none;
transition: color 2.2s; transition: color 0.2s;
&:link { &:link {
color: @link-color; color: @link-color;
@ -70,29 +70,24 @@ a {
} }
} }
main {
code, code,
pre { pre,
code[class*='language-'],
pre[class*='language-'],
:not(pre) > code[class*='language-'] {
font-family: menlo, inconsolata, monospace; font-family: menlo, inconsolata, monospace;
font-size: 0.92em; background-color: tint(@bg-color, 20%);
line-height: 1.24em;
background-color: #f0f0f0;
padding: 0.2em 0.4em; padding: 0.2em 0.4em;
color: #464646; color: lighten(@article-text-color, 15%);
text-shadow: 0 1px white; text-shadow: 0 1px white;
text-align: left; line-height: 1.4em;
white-space: pre; }
word-spacing: normal;
word-break: normal;
word-wrap: normal;
-moz-tab-size: 4; code,
-o-tab-size: 4; code[class*='language-'] {
tab-size: 4; font-size: 0.84em;
}
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
} }
code { code {
@ -114,12 +109,13 @@ figcaption {
} }
blockquote { blockquote {
line-height: 1.5em;
margin: 0.2em; margin: 0.2em;
border-left: 2px solid #2d3935; //TODO border-left: 2px solid @tearkiss;
padding: 0.2em 0.4em 0.2em 0.8em; padding: 0.2em 0.4em 0.2em 0.8em;
background: darken(@bg-color, 3%, relative); background: darken(@bg-color, 2%, relative);
border-radius: 3px; border-radius: 3px;
box-shadow: 1px 1px 2px #d4dbdb; box-shadow: @content-box-shadow;
font-size: 0.9em; font-size: 0.9em;
overflow: auto; overflow: auto;
@ -130,6 +126,7 @@ blockquote {
p { p {
margin: 0.8em 0; margin: 0.8em 0;
// text-shadow: @text-shadow;
} }
b, b,
@ -137,14 +134,6 @@ strong {
font-weight: 600; font-weight: 600;
} }
.tearkiss {
color: #16d0e7;
}
.tearkiss-new {
color: #16d0e7;
}
::selection { ::selection {
background: #0dd0d0; background: #0dd0d0;
} }

View File

@ -5,8 +5,10 @@
@french-violet: #7332c3; @french-violet: #7332c3;
@sacramento-green: #003d2d; @sacramento-green: #003d2d;
@rose-bonbon: #ff499e; @rose-bonbon: #ff499e;
@midnight: #660066;
@article-text-color: @midnight-blue; @article-text-color: desaturate(@midnight-blue, 30%);
@text-shadow: 0.02em 0.02em 0.03em fade(@tearkiss, 20%);
@link-color: #127aff; @link-color: #127aff;
@link-hover-color: @tearkiss; @link-hover-color: @tearkiss;
@link-visited-color: saturate(@french-violet, 30%, relative); @link-visited-color: saturate(@french-violet, 30%, relative);
@ -15,15 +17,19 @@
@menu-color: @sacramento-green; @menu-color: @sacramento-green;
@menu-link-color: #660066; @menu-link-color: @midnight;
@menu-link-hover-color: lighten(@menu-link-color, 10%); @menu-link-hover-color: lighten(@menu-link-color, 10%);
@menu-link-text-shadow: 0.02em 0.02em 0.03em fade(@french-violet, 30%);
@menu-active-link-text-shadow: 0.01em 0.01em 0.05em fade(@french-violet, 90%);
@header-color: darken(@french-violet, 35%, relative); @header-color: darken(@french-violet, 35%, relative);
@header-text-shadow: 0.015em 0.015em 0.02em fade(@midnight, 40%);
@footer-visited-link-color: darken(@pinky, 70%, relative); @footer-visited-link-color: darken(@pinky, 70%, relative);
@bg-color: tint(@light-cyan, 70%); @bg-color: tint(@light-cyan, 70%);
@menu-bg-color: fade(@pinky, 45%); @menu-bg-color: fade(@tearkiss, 40%);
@content-box-shadow: 0px 0px 2px 1px desaturate(@tearkiss, 50%);
@media-l: 1000px; @media-l: 1000px;
@media-m: 700px; @media-m: 700px;

View File

@ -1,50 +1,70 @@
/* PrismJS 1.17.1 /* PrismJS 1.23.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+typescript&plugins=autolinker */ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+diff+rust+typescript+yaml&plugins=autolinker+diff-highlight */
/** /**
* prism.js default theme for JavaScript, CSS and HTML * prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com) * Based on dabblet (http://dabblet.com)
* @author Lea Verou * @author Lea Verou
*/ */
pre[class*='language-']::-moz-selection, code[class*="language-"],
pre[class*='language-'] ::-moz-selection, pre[class*="language-"] {
code[class*='language-']::-moz-selection, color: black;
code[class*='language-'] ::-moz-selection { background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none; text-shadow: none;
background: #b3d4fc; background: #b3d4fc;
} }
pre[class*='language-']::selection, pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
pre[class*='language-'] ::selection, code[class*="language-"]::selection, code[class*="language-"] ::selection {
code[class*='language-']::selection,
code[class*='language-'] ::selection {
text-shadow: none; text-shadow: none;
background: #b3d4fc; background: #b3d4fc;
} }
@media print { @media print {
code[class*='language-'], code[class*="language-"],
pre[class*='language-'] { pre[class*="language-"] {
text-shadow: none; text-shadow: none;
} }
} }
/* Code blocks */ /* Code blocks */
pre[class*='language-'] { pre[class*="language-"] {
padding: 1em; padding: 1em;
margin: 0.5em 0; margin: .5em 0;
overflow: auto; overflow: auto;
} }
:not(pre) > code[class*='language-'], :not(pre) > code[class*="language-"],
pre[class*='language-'] { pre[class*="language-"] {
background: #f5f2f0; background: #f5f2f0;
} }
/* Inline code */ /* Inline code */
:not(pre) > code[class*='language-'] { :not(pre) > code[class*="language-"] {
padding: 0.1em; padding: .1em;
border-radius: 0.3em; border-radius: .3em;
white-space: normal; white-space: normal;
} }
@ -59,8 +79,8 @@ pre[class*='language-'] {
color: #999; color: #999;
} }
.namespace { .token.namespace {
opacity: 0.7; opacity: .7;
} }
.token.property, .token.property,
@ -88,7 +108,8 @@ pre[class*='language-'] {
.language-css .token.string, .language-css .token.string,
.style .token.string { .style .token.string {
color: #9a6e3a; color: #9a6e3a;
background: hsla(0, 0%, 100%, 0.5); /* This background color was intended by the author of this theme. */
background: hsla(0, 0%, 100%, .5);
} }
.token.atrule, .token.atrule,
@ -99,7 +120,7 @@ pre[class*='language-'] {
.token.function, .token.function,
.token.class-name { .token.class-name {
color: #dd4a68; color: #DD4A68;
} }
.token.regex, .token.regex,
@ -123,3 +144,17 @@ pre[class*='language-'] {
.token a { .token a {
color: inherit; color: inherit;
} }
pre.diff-highlight > code .token.deleted:not(.prefix),
pre > code.diff-highlight .token.deleted:not(.prefix) {
background-color: rgba(255, 0, 0, .1);
color: inherit;
display: block;
}
pre.diff-highlight > code .token.inserted:not(.prefix),
pre > code.diff-highlight .token.inserted:not(.prefix) {
background-color: rgba(0, 255, 128, .1);
color: inherit;
display: block;
}