all repos — website @ 88b5f3367c0b0454020cc90cff5160be2447a355

personal website hosted at prithu.xyz, built using hugo

work on theme switcher
Prithu Goswami prithugoswami524@gmail.com
Sat, 30 Jan 2021 12:28:16 +0530
commit

88b5f3367c0b0454020cc90cff5160be2447a355

parent

41bd17cde30fefcb559fdcc097c1420f5c3847cc

M layouts/index.htmllayouts/index.html

@@ -1,6 +1,6 @@

{{ partial "head.html" . }} -<body> +<body class=theme-dark> {{ partial "nav.html" }}

@@ -102,12 +102,14 @@ <h1>Some of my works</h1>

<div class="shadow-box"> <div class="section-text"> {{ range .Site.Data.projects }} - <a href="{{ .url }}"> - <div class="section-item"> - <h2>{{ .title }}</h2> - <p class="section-sub-text">{{ .description }}</p> - </div> - </a> + <div class="section-item"> + <h2> + <a href="{{ .url }}"> + {{ .title }} + </a> + </h2> + <p class="section-sub-text">{{ .description }}</p> + </div> {{ end }} </div> <!-- <a href="/projects/"><div class=btn id=project-cta>View All</div></a> -->

@@ -121,13 +123,15 @@ <h1>I also write about stuff</h1>

<div class="shadow-box"> <div class="section-text"> {{ range sort (where .Site.RegularPages "Section" "posts") "Date" "desc" | first 3}} - <a href="{{ .RelPermalink }}"> - <div class=section-item> - <h2>{{ .Title }}</h2> - <p class="section-sub-text">{{ with .Params.description }}{{ . }}{{ else }}{{.Summary | truncate 110 }}{{ end }}</p> - <!-- <p>{{ .Date.Format "2 Jan 2006" }}<p> --> - </div> - </a> + <div class=section-item> + <h2> + <a href="{{ .RelPermalink }}"> + {{ .Title }} + </a> + </h2> + <p class="section-sub-text">{{ with .Params.description }}{{ . }}{{ else }}{{.Summary | truncate 110 }}{{ end }}</p> + <!-- <p>{{ .Date.Format "2 Jan 2006" }}<p> --> + </div> {{ end }} </div> <a href="/posts/"><div class=btn id=writeup-cta>View All</div></a>
M layouts/partials/footer.htmllayouts/partials/footer.html

@@ -1,7 +1,20 @@

<footer> <p> <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"> - <img alt="Creative Commons License" style="width:18px;transform:translateY(4px);margin-right:4px" src="/img/cc.svg" /> + <!-- <img alt="Creative Commons License" style="width:18px;transform:translateY(4px);margin-right:4px" src="/img/cc.svg" /> --> + <svg id=cc-logo version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="18px" height="18px"> + <path d="M31.957,0.311c-8.682,0-16.322,3.213-22.226,9.203 + C3.653,15.678,0.354,23.666,0.354,32c0,8.422,3.212,16.236,9.29,22.313c6.078,6.078,13.978,9.377,22.313,9.377 + c8.334,0,16.409-3.299,22.66-9.463c5.904-5.817,9.029-13.544,9.029-22.227c0-8.595-3.125-16.408-9.116-22.399 + C48.453,3.523,40.639,0.311,31.957,0.311z M32.043,6.041c7.12,0,13.458,2.691,18.406,7.641c4.862,4.861,7.466,11.286,7.466,18.318 + c0,7.119-2.518,13.371-7.379,18.146c-5.123,5.035-11.721,7.727-18.493,7.727c-6.858,0-13.283-2.691-18.232-7.641 + C8.862,45.283,6.084,38.772,6.084,32c0-6.858,2.778-13.369,7.727-18.406C18.673,8.646,24.924,6.041,32.043,6.041z"/> + <path id="c" d="M31.635,26.734c-1.79-3.264-4.844-4.563-8.389-4.563 + c-5.16,0-9.267,3.65-9.267,9.828c0,6.283,3.861,9.829,9.442,9.829c3.581,0,6.635-1.966,8.319-4.949l-3.931-2.001 + c-0.878,2.105-2.212,2.738-3.896,2.738c-2.914,0-4.248-2.422-4.248-5.617c0-3.193,1.124-5.616,4.248-5.616 + c0.842,0,2.527,0.456,3.51,2.563L31.635,26.734z"/> + <use xlink:href="#c" transform="translate(18.281)"/> + </svg> </a> <a href="https://i.prithu.xyz/resume.pdf">résumé</a> &bull; <a href="/gpg.txt">gpg</a> &bull;
M layouts/partials/nav.htmllayouts/partials/nav.html

@@ -3,8 +3,8 @@ <div class="nav-group">

<div> <a href="/"> <svg id=pg viewBox="0 0 15.89 19.05" xmlns="http://www.w3.org/2000/svg"> - <path d="M1.43 0L.88 3.05h1.56L1.8 6.72c-.08.42-.12.84-.12 1.24 0 1.22.35 2.2 1.06 2.95.71.74 1.72 1.3 2.96 1.12 1.71-.25 1.78-1.4 2.6-1.8.8-.58 1.78-1.1 4.1-.78l1.18-6.4h1.77L15.9 0zM8.3 3.05h1.6l-.66 3.82v-.02c-.11.63-.35 1.15-.73 1.54-.37.38-.84.57-1.43.57-.56 0-1-.15-1.28-.45A1.7 1.7 0 015.4 7.3c0-.17.02-.36.06-.57l.36-1.96c0-.03.5-1.65 2.5-1.71z" fill="#1a1a1a"/> - <path d="M8.02 13.32c-.25 1.52-1.06 2.28-2.41 2.28-.5 0-.9-.1-1.2-.3a1.1 1.1 0 01-.47-.86H.02l-.02.4c0 1.3.45 2.33 1.36 3.07.92.76 2.22 1.14 3.88 1.14 1.31 0 2.45-.26 3.4-.77.94-.52 1.7-1.2 2.25-2.07.56-1.27.7-1.92.88-2.94l.34-1.88c-2.16-.22-3.66.06-4.09 1.93z" fill="#4d4d4d"/> + <path id=top d="M1.43 0L.88 3.05h1.56L1.8 6.72c-.08.42-.12.84-.12 1.24 0 1.22.35 2.2 1.06 2.95.71.74 1.72 1.3 2.96 1.12 1.71-.25 1.78-1.4 2.6-1.8.8-.58 1.78-1.1 4.1-.78l1.18-6.4h1.77L15.9 0zM8.3 3.05h1.6l-.66 3.82v-.02c-.11.63-.35 1.15-.73 1.54-.37.38-.84.57-1.43.57-.56 0-1-.15-1.28-.45A1.7 1.7 0 015.4 7.3c0-.17.02-.36.06-.57l.36-1.96c0-.03.5-1.65 2.5-1.71z" fill="#1a1a1a"/> + <path id=bottom d="M8.02 13.32c-.25 1.52-1.06 2.28-2.41 2.28-.5 0-.9-.1-1.2-.3a1.1 1.1 0 01-.47-.86H.02l-.02.4c0 1.3.45 2.33 1.36 3.07.92.76 2.22 1.14 3.88 1.14 1.31 0 2.45-.26 3.4-.77.94-.52 1.7-1.2 2.25-2.07.56-1.27.7-1.92.88-2.94l.34-1.88c-2.16-.22-3.66.06-4.09 1.93z" fill="#4d4d4d"/> </svg> </a> </div>
M static/css/blog.cssstatic/css/blog.css

@@ -1,5 +1,6 @@

@import url('https://rsms.me/inter/inter.css'); + .bcontainer{ margin-top: 2rem; display: flex;
M static/css/main.cssstatic/css/main.css

@@ -14,13 +14,52 @@ outline: none;

text-decoration: none; color: black; } -a:hover{ - color: #B554E3; -} ::selection { background-color: #B554E3; color: whitesmoke; +} + +:root{ + --dark-bg: #171722; + --dark-text: #c5c5c5; + --dark-text-primary: white; + --dark-card-bg: #0F0E17; + --dark-card-head: white; + --dark-card-text: #d8d8d8; + --dark-logo-top: white; + --dark-logo-bottom: #eeeeee; + + --light-bg: #f3f3f3; + --light-text: #666666; + --light-text-primary: black; + --light-card-bg: white; + --light-card-head: #333333; + --light-card-text: #292929; + --light-logo-top: #1a1a1a; + --light-logo-bottom: #4d4d4d; +} + +body.theme-light{ + --bg: var(--light-bg); + --text: var(--light-text); + --text-primary: var(--light-text-primary); + --card-bg: var(--light-card-bg); + --card-head: var(--light-card-head); + --card-text: var(--light-card-text); + --logo-top: var(--light-logo-top); + --logo-bottom: var(--light-logo-bottom); +} + +body.theme-dark{ + --bg: var(--dark-bg); + --text: var(--dark-text); + --text-primary: var(--dark-text-primary); + --card-bg: var(--dark-card-bg); + --card-head: var(--dark-card-head); + --card-text: var(--dark-card-text); + --logo-top: var(--dark-logo-top); + --logo-bottom: var(--dark-logo-bottom); }

@@ -29,7 +68,7 @@ font-family: "Roboto Mono", "Lucida Console", Monaco, monospace;

} body{ - background-color: #f3f3f3; + background-color: var(--bg); } nav {

@@ -58,6 +97,14 @@ height: 30px ;

margin-bottom: -6px; } +#pg #top{ + fill: var(--logo-top); +} + +#pg #bottom{ + fill: var(--logo-bottom); +} + #pg:hover path { fill: #B554E3; }

@@ -66,7 +113,7 @@ nav a{

text-decoration: none; text-transform: uppercase; font-weight: 700; - color: black; + color: var(--text-primary); } footer {

@@ -79,7 +126,14 @@

footer p{ font-family: Inter; font-size: 14px; - color: rgba(0,0,0,0.7); + color: var(--text); +} + +footer svg{ + width:18px; + transform:translateY(4px); + margin-right:4px; + fill: var(--text); } footer p a{

@@ -115,6 +169,7 @@ margin-top: 4rem;

} #intro a{ + color: inherit; font-weight: 500; text-decoration: underline; }

@@ -127,7 +182,7 @@ max-width: 664px;

} .shadow-box{ - background-color: white; + background-color: var(--card-bg); border-radius: 24px; box-shadow: 0 10px 30px 3px rgba(0,0,0,0.15); margin: 0 auto;

@@ -166,7 +221,7 @@ #intro h1 {

position: absolute; top: -40px; right: -130px; - color: #414141; + color: var(--card-head); line-height: 1; font-size: 4rem; font-weight: 700;

@@ -174,6 +229,7 @@ text-shadow: 0 4px 7px rgba(0,0,0,0.2);

} #intro-text{ + color: var(--card-text); padding: 6rem; font-weight: 300; font-size: 1.1rem;

@@ -297,13 +353,9 @@ flex-flow: column;

margin-bottom: 10rem; } -#writeups a:hover{ - color: inherit; -} - .page-section h1 { position: absolute; - color: rgba(0,0,0,0.8); + color: var(--card-head); font-size: 2.4rem; text-shadow: 0 4px 7px rgba(0,0,0,0.2); z-index: 1;

@@ -342,7 +394,7 @@ .page-section .section-sub-text{

margin-left: 0.6rem; margin-top: 0.3rem; margin-bottom: 1rem; - color: rgba(0,0,0,0.7); + color: var(--card-text); } .section-item {

@@ -350,9 +402,12 @@ border-radius: 0.4rem;

padding: 0.2rem 0.8rem; } -.section-item:hover { - background-color: #eeeeee; - border-radius: 0.4rem; +.section-item a:hover { + text-decoration: underline; +} + +.section-item a { + color: inherit; }