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

View File

@@ -3,7 +3,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<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"
integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="

View File

@@ -22,18 +22,6 @@
</div>
{{ 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>
<div class="nav-link" id="dark-theme-toggle">
<a>

View File

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

View File

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