Merge pull request #26 from 526avijitgupta/cosmetic-fixes

Cosmetic fixes
This commit is contained in:
Avijit Gupta
2021-07-08 14:03:05 +02:00
committed by GitHub
6 changed files with 66 additions and 78 deletions

View File

@@ -9,9 +9,6 @@
<h2 class="posts-year">{{ .Key }}</h2> <h2 class="posts-year">{{ .Key }}</h2>
<!-- TODO: @yash The month param should be optional -->
{{ range .Pages.GroupByDate "January" }}
<h4 class="posts-month">{{ .Key }}</h4>
{{- range .Pages -}} {{- range .Pages -}}
<article class="post-title"> <article class="post-title">
<a href="{{ .RelPermalink }}" class="post-link">{{ .Title }}</a> <a href="{{ .RelPermalink }}" class="post-link">{{ .Title }}</a>
@@ -20,7 +17,6 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }}
</div> </div>
{{ end }} {{ end }}

View File

@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Ubuntu|Quicksand-Medium" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Jost&family=Nunito&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w==" integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="

View File

@@ -22,18 +22,6 @@
</div> </div>
{{ end }} {{ end }}
<!-- TODO: Handle
<div class="nav-link icon">
<a href="http://example.com">
<span class="fa fa-github"></span>
</a>
</div>
<div class="nav-link icon">
<a href="http://example.com">
<span class="fa fa-linkedin"></span>
</a>
</div>
-->
<span class="nav-icons-divider"></span> <span class="nav-icons-divider"></span>
<div class="nav-link" id="dark-theme-toggle"> <div class="nav-link" id="dark-theme-toggle">
<a> <a>

View File

@@ -3,6 +3,14 @@ html {
color: #e2e2e2 !important; color: #e2e2e2 !important;
} }
a {
color: white;
}
.header {
box-shadow: rgba(102, 102, 102, 0.5) 0px 1px 2px 0px;
}
.header, .header,
code, code,
pre { pre {
@@ -10,6 +18,10 @@ pre {
color: #e2e2e2 !important; color: #e2e2e2 !important;
} }
.nav-links .nav-icons-divider {
color: #484848; !important
}
.footer { .footer {
border-top-color: #333 !important; border-top-color: #333 !important;
} }

View File

@@ -1,8 +1,13 @@
:root {
--color-blue: #0058b5;
--content-width: 810px;
}
html { html {
background: white; background: white;
color: black; color: black;
font-family: "Quicksand", sans-serif; font-family: "Jost", sans-serif;
font-weight: 300; font-weight: 400;
letter-spacing: 0.5px; letter-spacing: 0.5px;
min-height: 100%; min-height: 100%;
position: relative; position: relative;
@@ -12,54 +17,47 @@ body {
margin-bottom: 170px; margin-bottom: 170px;
} }
a {
color: black;
}
a:hover {
color: var(--color-blue) !important;
}
main#content { main#content {
width: 810px; width: var(--content-width);
margin: 120px auto 0; margin: 90px auto 0;
}
img {
width: var(--content-width);
height: auto;
} }
/* HEADER */ /* HEADER */
.header { .header {
background-color: rgb(255, 255, 255); background-color: rgb(240, 240, 240);
box-shadow: rgba(0, 0, 0, 0.5) 0px 1px 2px 0px; box-shadow: rgba(170, 170, 170, 0.5) 0px 1px 2px 0px;
color: black; color: black;
font-size: 1.04rem; font-size: 1.05rem;
height: 70px; height: 50px;
left: 0; left: 0;
opacity: 0.95; opacity: 0.95;
position: fixed; position: fixed;
top: 0; top: 0;
-ms-transition: height 0.5s ease-out;
-moz-transition: height 0.5s ease-out;
-webkit-transition: height 0.5s ease-out;
-o-transition: height 0.5s ease-out;
transition: height 0.5s ease-out;
width: 100%; width: 100%;
} }
.header.small {
height: 50px;
}
.header a { .header a {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
.header .header-nav { .header .header-nav {
height: 50px; height: 50px;
margin-top: 10px;
-ms-transition: margin 0.5s ease-out;
-moz-transition: margin 0.5s ease-out;
-webkit-transition: margin 0.5s ease-out;
-o-transition: margin 0.5s ease-out;
transition: margin 0.5s ease-out;
}
.header .header-nav.small {
margin-top: 0; margin-top: 0;
} }
.header-nav a {
transition: color 0.15s ease-in-out;
}
.header-nav a:hover {
color: teal;
}
.header-nav .avatar { .header-nav .avatar {
border-radius: 18px; border-radius: 18px;
float: left; float: left;
@@ -69,10 +67,10 @@ main#content {
.header-nav .avatar img { .header-nav .avatar img {
border-radius: 100%; border-radius: 100%;
display: block; display: block;
height: 40px; height: 38px;
margin-top: 4px; margin-top: 5px;
overflow: hidden; overflow: hidden;
width: 40px; width: 38px;
} }
.header-nav .nav-title { .header-nav .nav-title {
display: inline-block; display: inline-block;
@@ -87,22 +85,24 @@ main#content {
.header-nav .nav-links { .header-nav .nav-links {
float: right; float: right;
line-height: 50px; line-height: 50px;
margin-right: 15px; margin-right: 10px;
} }
.nav-links .nav-link { .nav-links .nav-link {
display: inline-block; display: inline-block;
padding: 0 4px;
} }
.nav-links .nav-link a { .nav-links .nav-link a {
display: block; display: block;
padding: 0 10px; padding: 0 6px;
} }
.nav-links .nav-link.icon a { .nav-links .nav-link.icon a {
padding: 0 8px; padding: 0 8px;
} }
.nav-links .nav-icons-divider { .nav-links .nav-icons-divider {
border-color: inherit; border-color: inherit;
border-left: 1px solid; border-left: 1.5px solid;
margin: 0 10px; margin: 0 10px;
color: #dfdfdf;
} }
.nav-links #dark-theme-toggle:hover { .nav-links #dark-theme-toggle:hover {
cursor: pointer; cursor: pointer;
@@ -139,16 +139,11 @@ main#content {
/** COMMON **/ /** COMMON **/
.header,
.footer {
font-family: "Ubuntu", sans-serif;
}
/* ICONS */ /* ICONS */
.feather { .feather {
height: 20px; height: 20px;
margin: -3px auto; margin: -3px auto;
stroke-width: 1.75; stroke-width: 1.25;
width: 20px; width: 20px;
} }
@@ -158,8 +153,8 @@ main#content {
padding: 0; padding: 0;
} }
.post-tags .post-tag { .post-tags .post-tag {
background-color: #0058b5; background-color: var(--color-blue);
border: 1px solid #0058b5; border: 1px solid var(--color-blue);
border-radius: 4px; border-radius: 4px;
box-sizing: border-box; box-sizing: border-box;
color: white; color: white;
@@ -197,6 +192,7 @@ code {
blockquote { blockquote {
border-left: 2px solid #e0e0e0; border-left: 2px solid #e0e0e0;
padding-left: 1rem; padding-left: 1rem;
color: grey;
} }
/* HOME PAGE */ /* HOME PAGE */
@@ -240,7 +236,7 @@ blockquote {
color: gray; color: gray;
} }
.post .post-content { .post .post-content {
font-size: 1.04rem; font-size: 1.2rem;
line-height: 1.7; line-height: 1.7;
margin-top: 50px; margin-top: 50px;
} }
@@ -250,13 +246,21 @@ blockquote {
text-align: center; text-align: center;
} }
.list-posts .posts-year { .list-posts .posts-year {
margin-top: 40px; margin-top: 70px;
} }
.list-posts .post-title { .list-posts .post-title {
margin: 10px 0; margin: 10px 0 0 15px;
} }
.list-posts a {
text-decoration: none;
}
.post-title .post-link,
.post-title .post-date { .post-title .post-date {
float: right; display: inline-block;
}
.post-title .post-link {
font-size: 1.2rem;
width: 80%;
} }
.tags-list .post-tags { .tags-list .post-tags {
margin-top: 50px; margin-top: 50px;

View File

@@ -25,18 +25,6 @@ function ready() {
}); });
} }
window.addEventListener('scroll', () => {
if (window.scrollY > 100) {
document.querySelectorAll('.header, .header-nav').forEach(function(item) {
item.classList.add('small')
})
} else {
document.querySelectorAll('.header, .header-nav').forEach(function(item) {
item.classList.remove('small')
})
}
});
function setTheme(themeToSet) { function setTheme(themeToSet) {
localStorage.setItem(THEME_PREF_STORAGE_KEY, themeToSet); localStorage.setItem(THEME_PREF_STORAGE_KEY, themeToSet);
darkThemeCss.disabled = themeToSet === 'light'; darkThemeCss.disabled = themeToSet === 'light';