From d96cc83b5c2b10455d415aa4cd98de9aae0603c2 Mon Sep 17 00:00:00 2001
From: Darshan Baral
Date: Thu, 14 May 2020 15:41:30 -0700
Subject: Added about page
---
exampleSite/config.toml | 6 +-
exampleSite/content/about/_index.md | 65 +++++++++++++++++++++
layouts/_default/about.html | 18 ++++++
layouts/index.html | 62 +++++---------------
layouts/partials/about/education.html | 16 ++++++
layouts/partials/about/publications.html | 27 +++++++++
layouts/partials/footer.html | 80 ++++++++++++++++++++++----
layouts/partials/header.html | 7 +++
layouts/partials/icons/book.html | 15 +++++
layouts/partials/icons/folder.html | 15 +++++
layouts/partials/icons/graduationCap.html | 15 +++++
layouts/partials/icons/portrait.html | 15 +++++
layouts/partials/intro.html | 55 +++++-------------
layouts/partials/menu.html | 29 ++++++++--
layouts/partials/social.html | 1 +
static/css/main.css | 96 ++++++++++++++-----------------
16 files changed, 360 insertions(+), 162 deletions(-)
create mode 100644 exampleSite/content/about/_index.md
create mode 100644 layouts/_default/about.html
create mode 100644 layouts/partials/about/education.html
create mode 100644 layouts/partials/about/publications.html
create mode 100644 layouts/partials/icons/book.html
create mode 100644 layouts/partials/icons/folder.html
create mode 100644 layouts/partials/icons/graduationCap.html
create mode 100644 layouts/partials/icons/portrait.html
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index d9dd309..818a7e6 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -11,11 +11,11 @@ theme = "ghazal"
author = "Darshan Baral"
description = "A hugo theme for personal blogs"
footer = "2020 Darshan Baral."
- about = "This is a short intro about me to describe some of the cool things I do."
- image = "https://i.stack.imgur.com/oI2SB.jpg?s=328&g=1"
+ shortAbout = "This is a short intro about me to describe some of the cool things I do."
+ mainimage = "https://i.stack.imgur.com/oI2SB.jpg?s=328&g=1"
+ profileImage = "https://i.stack.imgur.com/oI2SB.jpg?s=328&g=1"
[params.theme]
- profileImage = "/images/profile.jpg"
fontSize = "20px"
dateFormat = "2006/01/02"
paginateNum = 5
diff --git a/exampleSite/content/about/_index.md b/exampleSite/content/about/_index.md
new file mode 100644
index 0000000..30545ae
--- /dev/null
+++ b/exampleSite/content/about/_index.md
@@ -0,0 +1,65 @@
+---
+title: "About Me"
+icon: "portrait"
+weight: 10
+name: "ASasd LADSK"
+prefix: ""
+suffix: "PhD"
+profileImage: "https://i.stack.imgur.com/oI2SB.jpg?s=328&g=1"
+## Education
+education:
+ [
+ {
+ title: "PhD",
+ institution: "University of Awesome",
+ major: "Awesome Engineering",
+ date: 2020,
+ project: "The awesome thing that I did",
+ projectTitle: "Dissertation",
+ projectURL: "#",
+ },
+ {
+ title: "MS",
+ institution: "University of Awesome",
+ major: "Awesome Engineering and Cool minor",
+ date: 2018,
+ project: "The awesome thing that I did",
+ projectTitle: "Thesis",
+ projectURL: "",
+ },
+ ]
+## Publications
+publications:
+ [
+ Journals:
+ [
+ {
+ title: "sdfksahfjsadh fkjsadhf lkjdsahf kjsadhf lkjads hfkjdsal fksdaf sadfkdsfjhksadgf dfas",
+ author: "asda B, asd asV, asd sad O",
+ date: 2019,
+ journal: "Journal dsalf adsf dsaf",
+ url: "",
+ abstract: "shahfkasjdhf ahflkjdsa hfkjdsa hflkjdsahflkdsa hfljdsahf lkjashfdkjad hflkjdsa hflkjdsafh kjsadhf kjsadhf lkjdsahf kjdsahf lkjdsahf lkjdsahf lkjsadhfljdsaf halkjdshf ldsajfh askjdhflkjdsaf ldsakflkjdsahf kjsadhflkjdsaf lkjdsahf kjsadgfkdsabfanmdsbfdsanf.,dsanfmsnafdhfdlkjsaj;lkdsa jf;lkdsajf ;lksajfd;lkdsa jf;kdsajf ds",
+ },
+ {
+ title: "sdfksahfjsadh fkjsadhf lkjdsahf kjsadhf lkjads hfkjdsal fksdaf sadfkdsfjhksadgf dfas",
+ author: "asda B, asd asV, asd sad O",
+ date: 2020,
+ journal: "Journal asjhdkas hdkjasdh",
+ url: "#",
+ },
+ ],
+ Proceedings:
+ [
+ {
+ title: "sdfksahfjsadh fkjsadhf lkjdsahf kjsadhf lkjads hfkjdsal fksdaf sadfkdsfjhksadgf dfas",
+ author: "asda B, asd asV, asd sad O",
+ date: 2019,
+ journal: "Journal asjhdkas hdkjasdh",
+ url: "#",
+ },
+ ],
+ ]
+---
+
+I am dsjf dsjf;asdjf j. ldsfjsak jdsfj;asd fdsf ;lasdfl jasd. aldskfj salkdjfalksd jflsajfas dfa.sdf aldsfj asldfj ldsjfldsf *jlkdsajflsajf*. afdsj lsadjf **asdjf sad fjldskfjsaldf**. ds flsadkjf lkasdjflkdsajf akdsjf. ldsajflas djflkdsajfkjlkdsajflkdsa jfla. lasdkjf ladsjflkajfa;jf;adskjfo9awefjldsa jljf lasjdflkjdsf lj.
diff --git a/layouts/_default/about.html b/layouts/_default/about.html
new file mode 100644
index 0000000..493f455
--- /dev/null
+++ b/layouts/_default/about.html
@@ -0,0 +1,18 @@
+{{ define "main" }}
+
+{{ partial "social" . }}
+
+ {{ .Params.prefix }} {{ .Params.name }}, {{ .Params.suffix }}
+
+{{ .Content }}
+{{ partial "about/education" . }}
+{{ partial "about/publications" . }}
+{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index b9a24e3..9e68506 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,7 +1,6 @@
{{ define "main" }}
{{ partial "intro.html" . }}
-
-
-
- {{ .Site.Params.about }}
-
- {{ partial "social.html" . }}
-
-
-
-
-
+ />
+ {{ partial "social.html" . }}
{{ end }}
diff --git a/layouts/partials/about/education.html b/layouts/partials/about/education.html
new file mode 100644
index 0000000..f642061
--- /dev/null
+++ b/layouts/partials/about/education.html
@@ -0,0 +1,16 @@
+{{ if .Params.education }}
+
+ {{ partial "icons/graduationCap" . }}Education
+
+
+{{ range sort .Params.education "date" "desc" }}
+{{ .date }}. {{ .title }}. {{ .major}}. {{ .institution }}
+{{ if .project }}
+
+ {{ .projectTitle}} - {{if .projectURL }}
+ {{ .project }}
+ {{ else }}
+ {{ .project }}
+ {{ end }}
+
+{{ end }} {{ end }} {{ end }}
diff --git a/layouts/partials/about/publications.html b/layouts/partials/about/publications.html
new file mode 100644
index 0000000..af41121
--- /dev/null
+++ b/layouts/partials/about/publications.html
@@ -0,0 +1,27 @@
+{{ if .Params.publications }}
+
+ {{ partial "icons/book" . }}Publications
+
+
+{{ range .Params.publications }} {{ range $key, $val := . }}
+{{ $key }}
+
+ {{ range sort $val "date" "desc" }}
+ -
+
+ {{ .date }}. {{ .author | markdownify }}. {{ if .url }}{{ .title }}{{ else }} {{- .title -}} {{end -}}. {{ .journal }}.
+
+ {{ if .abstract }}
+
+ Abstract{{ .abstract }}
+
+ {{ end }}
+
+ {{ end }}
+
+{{ end }} {{ end }} {{ end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 544ca02..2e572d8 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,24 +1,84 @@
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index af3d452..81f86ec 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,5 +1,12 @@
+
+
diff --git a/layouts/partials/icons/folder.html b/layouts/partials/icons/folder.html
new file mode 100644
index 0000000..3b90d5c
--- /dev/null
+++ b/layouts/partials/icons/folder.html
@@ -0,0 +1,15 @@
+
diff --git a/layouts/partials/icons/graduationCap.html b/layouts/partials/icons/graduationCap.html
new file mode 100644
index 0000000..6480361
--- /dev/null
+++ b/layouts/partials/icons/graduationCap.html
@@ -0,0 +1,15 @@
+
diff --git a/layouts/partials/icons/portrait.html b/layouts/partials/icons/portrait.html
new file mode 100644
index 0000000..60de60e
--- /dev/null
+++ b/layouts/partials/icons/portrait.html
@@ -0,0 +1,15 @@
+
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html
index 3bdb64f..2c32f80 100644
--- a/layouts/partials/intro.html
+++ b/layouts/partials/intro.html
@@ -7,51 +7,24 @@
justify-content: center;
color: var(--primaryColor);
text-align: center;
- margin-bottom: 0.5em;
+ margin-bottom: 1em;
"
>
{{.Site.Params.title}}
-
+ {{ partial "icons/chevron.html" . }}
+
- {{ partial "icons/chevron.html" . }}
-
-
-
diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html
index f47080e..9868f4d 100644
--- a/layouts/partials/menu.html
+++ b/layouts/partials/menu.html
@@ -4,8 +4,7 @@
width: 100vw;
height: 100vh;
overflow: hidden;
- background-color: #19092be3;
- transition: all 0.5s;
+ background-color: var(--bgTransparent);
position: fixed;
left: 0;
top: -100vh;
@@ -15,6 +14,7 @@
"
>
+
diff --git a/layouts/partials/social.html b/layouts/partials/social.html
index 72f2a6e..cf5ca2a 100644
--- a/layouts/partials/social.html
+++ b/layouts/partials/social.html
@@ -14,6 +14,7 @@
class="social-icon"
style="
display: inline-flex;
+ font-size: 1.4em;
padding: 10px;
border-radius: 50%;
align-self: center;
diff --git a/static/css/main.css b/static/css/main.css
index af288f1..80428dc 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -2,24 +2,22 @@
--bgColor: #381460;
--bgDarker: #2b0f49;
--bgLighter: #4a2d69;
+ --bgTransparent: #19092be3;
--textColor: #ffbd69;
--primaryColor: #fe346e;
--primaryHoverColor: #fe346e;
--inactiveColor: gray;
--codeColor: #51ef5b;
}
-
html {
margin: 0;
overflow-y: scroll;
margin-right: 0;
}
-
body {
width: 95%;
margin: auto;
position: relative;
- z-index: 10;
display: flex;
flex-direction: column;
max-width: 960px;
@@ -30,20 +28,10 @@ body {
font-weight: 300;
font-size: 1.2em;
}
-header {
- width: 95%;
- height: 60px;
- max-width: 960px;
- position: fixed;
- top: 0;
- z-index: 30;
- transition: all 0.3s;
-}
header,
footer {
flex: none;
}
-
main {
flex: 1 1 0%;
}
@@ -51,7 +39,6 @@ code {
font-size: 1em;
color: var(--codeColor);
}
-
pre {
padding: 0.5em;
border: solid 1px;
@@ -60,7 +47,6 @@ pre {
background-color: var(--bgDarker) !important;
overflow: auto;
}
-
h1,
h2,
h3,
@@ -70,71 +56,95 @@ h6 {
font-weight: 300;
line-height: 1.2em;
}
-
h1 {
- font-size: 1.8em;
+ font-size: 1.9em;
}
-
h2 {
font-size: 1.6em;
}
-
h3 {
- font-size: 1.4em;
+ font-size: 1.3em;
}
-
h4 {
- font-size: 1.2em;
+ font-size: 1.1em;
}
-
a {
color: var(--primaryColor);
text-decoration: none;
}
-
a:hover {
color: var(--textColor);
+ text-decoration: underline;
}
-
.metadata-items::before {
content: "#";
}
-
svg {
width: 1em;
height: 1em;
}
-
blockquote {
padding-left: 10px;
+ padding-top: 5px;
+ padding-bottom: 5px;
border-left: solid 5px var(--textColor);
background-color: var(--bgLighter);
+ border-radius: 5px;
+}
+blockquote > p {
+ margin: 0;
+}
+strong {
+ font-weight: 700;
}
-
.footnotes {
font-size: 0.8em;
}
.menu-item {
- display: block;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
font-size: 1.2em !important;
width: 100%;
padding: 0 0.5em;
box-sizing: border-box;
}
+.menu-item > i {
+ display: inline-flex;
+ margin-right: 5px;
+}
.menu-item:hover {
background-color: var(--bgLighter);
+ text-decoration: none;
}
table {
border-collapse: collapse;
}
thead {
border-top: solid 3px var(--textColor);
- border-bottom: solid 1px var(--textColor);
+ background-color: var(--bgLighter);
}
tbody {
border-bottom: solid 2px var(--textColor);
}
-
+th,
+td {
+ border: solid 1px var(--textColor);
+ padding: 0 0.5em;
+}
+mark {
+ background-color: var(--textColor);
+ color: var(--bgColor);
+ border-radius: 5px;
+ padding: 0 3px;
+}
+kbd {
+ background-color: var(--bgLighter);
+ padding: 0 4px;
+ margin: 0 2px;
+ border-radius: 5px;
+ box-shadow: 2px 2px 2px 2px var(--bgDarker);
+}
.hamburger-cross {
display: flex;
justify-content: center;
@@ -162,24 +172,20 @@ tbody {
.social-icon:hover {
background-color: var(--bgLighter);
}
-
.sharing-icon {
border-radius: 50%;
margin: 0 5px 0 0;
}
-
.sharing-icon > i {
display: inline-flex;
border-radius: 50%;
padding: 12px;
font-size: 1.2em;
}
-
.sharing-icon > i:hover {
background-color: var(--bgLighter);
color: var(--textColor);
}
-
ul.pagination {
display: flex;
flex-direction: row;
@@ -187,45 +193,36 @@ ul.pagination {
align-items: center;
list-style-type: none;
}
-
li.page-item {
font-size: 0.9em;
padding: 1px 12px;
}
-
li.page-item {
border-top: 1px solid var(--primaryColor);
border-bottom: 1px solid var(--primaryColor);
border-left: 1px solid var(--primaryColor);
background-color: var(--bgColor);
}
-
li.page-item.disabled a {
color: var(--inactiveColor);
}
-
li.page-item.active {
background-color: var(--primaryColor);
}
-
li.page-item.active a {
color: var(--bgColor);
font-weight: 700;
}
-
li.page-item:nth-child(1) {
border-radius: 10px 0 0 10px;
}
-
li.page-item:nth-child(6) {
border-radius: 0 10px 10px 0;
border-right: 1px solid var(--primaryColor);
}
-
.breadcrumb-link:hover {
text-decoration: underline;
}
-
.next-link,
.previous-link {
padding: 3px;
@@ -235,47 +232,39 @@ li.page-item:nth-child(6) {
min-width: 100px;
margin-bottom: 1em;
}
-
.previous-link.active,
.next-link.active {
color: var(--primaryColor);
background-color: var(--bgColor);
border: solid 1px var(--primaryColor);
}
-
.next-link.active:hover,
.previous-link.active:hover {
color: var(--bgColor);
text-decoration: none;
background-color: var(--primaryHoverColor);
}
-
.previous-link.disabled,
.next-link.disabled {
color: var(--inactiveColor);
border: solid 1px;
border-color: var(--inactiveColor);
}
-
.fa-chevron-right {
animation: blinkingText 1s infinite;
transition: all 0.5s;
color: var(--bgColor);
}
-
.fa-chevron-right:hover {
animation: none;
transition: all 0.8s;
}
-
.show-more-info {
background-color: var(--primaryColor);
}
-
.show-more-info:hover {
cursor: pointer;
}
-
@keyframes blinkingText {
0% {
color: var(--bgColor);
@@ -293,9 +282,8 @@ li.page-item:nth-child(6) {
color: var(--bgColor);
}
}
-
.content img {
max-width: 95%;
display: block;
margin: 1em auto;
-}
\ No newline at end of file
+}
--
cgit v1.2.3
From e00cc632962d264348bb9d9fa18cb29a7a70103a Mon Sep 17 00:00:00 2001
From: Darshan Baral
Date: Thu, 14 May 2020 21:41:39 -0700
Subject: Added scroll to top button
---
layouts/partials/footer.html | 30 +++++++++++++++++++++++++++---
layouts/partials/head.html | 5 ++++-
static/css/main.css | 4 ++--
3 files changed, 33 insertions(+), 6 deletions(-)
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 2e572d8..ba46305 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,4 +1,23 @@
+
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 7c11285..be7aba8 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -42,6 +42,9 @@
window.addEventListener("scroll", () => {
let currentY = window.scrollY;
let header = document.querySelector("header");
+ let toTop = document.querySelector(".to-top-button");
+
+ toTop.style.display = currentY < 500 ? "none" : "inline-flex";
if (
document.body.offsetHeight - (window.innerHeight + window.pageYOffset) < 10
@@ -59,7 +62,7 @@
if (currentY - initialY < -5 || currentY < 60) {
initialY = currentY;
header.style.top = "0";
- }
+ }
});
diff --git a/static/css/main.css b/static/css/main.css
index 80428dc..2071b89 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -250,12 +250,12 @@ li.page-item:nth-child(6) {
border: solid 1px;
border-color: var(--inactiveColor);
}
-.fa-chevron-right {
+.show-more-info > svg {
animation: blinkingText 1s infinite;
transition: all 0.5s;
color: var(--bgColor);
}
-.fa-chevron-right:hover {
+.show-more-info > svg:hover {
animation: none;
transition: all 0.8s;
}
--
cgit v1.2.3
From 4aa150c6bd2b5eb9b51e4e65c59c87017cfad910 Mon Sep 17 00:00:00 2001
From: Darshan Baral
Date: Thu, 14 May 2020 22:10:19 -0700
Subject: hamburger resembles FAB
---
layouts/_default/about.html | 20 ++++++--
layouts/index.html | 1 +
layouts/partials/about/publications.html | 2 +-
layouts/partials/footer.html | 81 ++++++++++++++++++--------------
layouts/partials/hamburgerCross.html | 1 +
static/css/main.css | 8 +---
6 files changed, 67 insertions(+), 46 deletions(-)
diff --git a/layouts/_default/about.html b/layouts/_default/about.html
index 493f455..3eae312 100644
--- a/layouts/_default/about.html
+++ b/layouts/_default/about.html
@@ -1,4 +1,5 @@
{{ define "main" }}
+{{ partial "social" . }}
-{{ partial "social" . }}
-
- {{ .Params.prefix }} {{ .Params.name }}, {{ .Params.suffix }}
-
+
+
+
+ {{ .Params.prefix }} {{ .Params.name }}, {{ .Params.suffix }}
+
+ {{ .Params.jobTitle }}
+ {{ .Params.office }}, {{ .Params.location }}
+
{{ .Content }}
{{ partial "about/education" . }}
{{ partial "about/publications" . }}
diff --git a/layouts/index.html b/layouts/index.html
index 9e68506..93dd666 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -26,5 +26,6 @@
"
/>
{{ partial "social.html" . }}
+ {{ .Site.Params.shortAbout }}
{{ end }}
diff --git a/layouts/partials/about/publications.html b/layouts/partials/about/publications.html
index af41121..bb6d140 100644
--- a/layouts/partials/about/publications.html
+++ b/layouts/partials/about/publications.html
@@ -15,7 +15,7 @@
>{{ else }} {{- .title -}} {{end -}}. {{ .journal }}.
{{ if .abstract }}
-
+
Abstract{{ .abstract }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index ba46305..51540ca 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,24 +1,34 @@