Add table styling and color pallets (#30)

* Add table styling

* Add light color pallet

* Add pallet for dark theme

* Add font size to post page wrapper

* Remove footer border color variable
This commit is contained in:
Avijit Gupta
2021-07-10 14:13:11 +02:00
committed by GitHub
parent 950b3528db
commit 81ee72eb46
3 changed files with 79 additions and 37 deletions

View File

@@ -23,6 +23,15 @@ Yo yo yo
> And this is a really really really really really long blockquote which spans across multple lines > And this is a really really really really really long blockquote which spans across multple lines
One importnant thing to keep in mind is that using multi-stage will not impact the build time of your container, the time difference between the build times is negligible
| Language | Normal | Multi-Stage |
|-------|----------------|-------|
| Python | 274 MB | 84.5 MB |
| Golang | 829 MB | 15.3MB |
Multi-stage builds are useful where space is a constraint, and whilst it is always better to build small concise containers, it is easy to get carried away trying to shave off a few megabytes. Even though they are great to use, they shouldnt be abused, the effort should always spent be towards improving the workflow.
```py ```py
# Codeblocks look like this # Codeblocks look like this

View File

@@ -1,47 +1,54 @@
html { :root {
background: #121212 !important; /* dark theme colors */
color: white !important; --dark-bg-color: #121212;
--dark-text-color: white;
--dark-header-bg-color: #1f1f1f;
--dark-header-divider-color: #484848;
} }
a { html {
color: white; background-color: var(--dark-bg-color);
color: var(--dark-text-color);
} }
.header { .header {
box-shadow: rgba(102, 102, 102, 0.5) 0px 1px 2px 0px; box-shadow: rgba(102, 102, 102, 0.5) 0px 1px 2px 0px;
background-color: #1f1f1f !important; background-color: var(--dark-header-bg-color);
color: white !important;
} }
.nav-links .nav-icons-divider { .nav-links .nav-icons-divider {
color: #484848; color: var(--dark-header-divider-color);
}
.post-tags .post-tag {
border: 1px solid white;
color: white;
} }
.post-tags .post-tag:hover { .post-tags .post-tag:hover {
background-color: white; background-color: var(--dark-text-color);
color: black; color: var(--dark-bg-color);
} }
.tags-list .post-tags .post-tag a .tag-posts-count { .tags-list .post-tags .post-tag a .tag-posts-count {
background-color: #1f1f1f; background-color: var(--dark-header-bg-color);
} }
.tags-list .post-tags .post-tag:hover a .tag-posts-count { .tags-list .post-tags .post-tag:hover a .tag-posts-count {
background-color: white; background-color: var(--dark-text-color);
color: black; color: var(--dark-bg-color);
} }
.footer { .footer {
border-top-color: #333 !important; border-top-color: var(--dark-header-bg-color);
} }
blockquote { blockquote {
border-left-color: #333 !important; border-left-color: var(--dark-header-divider-color);
}
table thead {
background-color: var(--dark-header-bg-color);
}
table td,
table th {
border-bottom-color: var(--dark-header-divider-color);
} }
/* TODO: Check if this is needed or not */ /* TODO: Check if this is needed or not */

View File

@@ -1,11 +1,16 @@
:root { :root {
--accent-color: #ff4d4d; --accent-color: #ff4d4d;
--content-width: 810px; --content-width: 810px;
/* light theme colors */
--light-bg-color: white;
--light-text-color: black;
--light-header-bg-color: #f0f0f0;
--light-header-divider-color: #dfdfdf;
} }
html { html {
background: white; background-color: var(--light-bg-color);
color: black; color: var(--light-text-color);
font-family: "Jost", sans-serif; font-family: "Jost", sans-serif;
font-weight: 400; font-weight: 400;
letter-spacing: 0.5px; letter-spacing: 0.5px;
@@ -18,7 +23,7 @@ body {
} }
a { a {
color: black; color: inherit;
} }
a:hover { a:hover {
@@ -26,20 +31,20 @@ a:hover {
} }
main#content { main#content {
width: var(--content-width);
margin: 90px auto 0; margin: 90px auto 0;
width: var(--content-width);
} }
img { img {
width: var(--content-width);
height: auto; height: auto;
width: var(--content-width);
} }
/* HEADER */ /* HEADER */
.header { .header {
background-color: rgb(240, 240, 240); background-color: var(--light-header-bg-color);
box-shadow: rgba(170, 170, 170, 0.5) 0px 1px 2px 0px; box-shadow: rgba(170, 170, 170, 0.5) 0px 1px 2px 0px;
color: black; color: inherit;
font-size: 1.05rem; font-size: 1.05rem;
height: 50px; height: 50px;
left: 0; left: 0;
@@ -100,8 +105,8 @@ img {
.nav-links .nav-icons-divider { .nav-links .nav-icons-divider {
border-color: inherit; border-color: inherit;
border-left: 1.5px solid; border-left: 1.5px solid;
color: var(--light-header-divider-color);
margin: 0 10px; margin: 0 10px;
color: #dfdfdf;
} }
.nav-links #dark-theme-toggle:hover { .nav-links #dark-theme-toggle:hover {
cursor: pointer; cursor: pointer;
@@ -116,7 +121,7 @@ img {
/* FOOTER */ /* FOOTER */
.footer { .footer {
bottom: 0; bottom: 0;
border-top: 1px solid #eee; border-top: 1px solid var(--light-header-bg-color);
color: inherit; color: inherit;
left: 0; left: 0;
overflow: hidden; overflow: hidden;
@@ -152,16 +157,16 @@ img {
padding: 0; padding: 0;
} }
.post-tags .post-tag { .post-tags .post-tag {
border: 1px solid black; border: 1px solid;
border-radius: 4px; border-radius: 4px;
box-sizing: border-box; box-sizing: border-box;
color: black; color: inherit;
display: inline-block; display: inline-block;
font-size: 14px; font-size: 14px;
} }
.post-tags .post-tag:hover { .post-tags .post-tag:hover {
background-color: black; background-color: var(--light-text-color);
color: white; color: var(--light-bg-color);
} }
.post-tag a { .post-tag a {
color: inherit; color: inherit;
@@ -190,9 +195,29 @@ code {
} }
blockquote { blockquote {
border-left: 2px solid #e0e0e0; border-left: 2px solid var(--light-header-divider-color);
padding-left: 1rem;
color: grey; color: grey;
padding-left: 1rem;
}
table {
border-collapse: collapse;
font-size: 1.05rem;
margin: 30px 0;
text-align: left;
}
table thead {
background-color: var(--light-header-bg-color);
}
table td,
table th {
padding: 1.4rem;
}
table td {
border-bottom: 1px solid var(--light-header-divider-color);
} }
/* HOME PAGE */ /* HOME PAGE */
@@ -232,11 +257,13 @@ blockquote {
} }
/* SINGLE */ /* SINGLE */
main#content .post {
font-size: 1.2rem;
}
.post .post-date { .post .post-date {
color: gray; color: gray;
} }
.post .post-content { .post .post-content {
font-size: 1.2rem;
line-height: 1.7; line-height: 1.7;
margin-top: 50px; margin-top: 50px;
} }
@@ -273,7 +300,6 @@ blockquote {
border-radius: inherit; border-radius: inherit;
padding: 0; padding: 0;
} }
.tags-list .post-tags .post-tag a div { .tags-list .post-tags .post-tag a div {
display: inline-block; display: inline-block;
} }