all repos — website @ 00d421291dded49e88c6e70f75bc6177a38e6b6a

personal website hosted at prithu.xyz, built using hugo

refactor section css and change writeups content

The writups section now includes "description" that is part of the
posts page param. If no description found then it uses the Summary of
the page with it being truncated to 110 chars
Prithu Goswami prithugoswami524@gmail.com
Thu, 07 May 2020 10:43:02 +0530
commit

00d421291dded49e88c6e70f75bc6177a38e6b6a

parent

7af31ed547653773ae5bd6a0798469fb2b0ca424

2 files changed, 15 insertions(+), 21 deletions(-)

jump to
M hugo-site/layouts/index.htmlhugo-site/layouts/index.html

@@ -108,11 +108,11 @@ <section id=projects class="page-section">

<div class=container> <h1>Some of my works</h1> <div class="shadow-box"> - <div class="project-text"> + <div class="section-text"> {{ range .Site.Data.projects }} <a href="{{ .url }}" target="_blank"> - <div class="project-item"> - <h2>- {{ .title }}</h2> + <div class="section-item"> + <h2>{{ .title }}</h2> <p>{{ .description }}</p> </div> </a>

@@ -127,12 +127,13 @@ <section id=writeups class="page-section">

<div class=container> <h1>I also write about stuff</h1> <div class="shadow-box"> - <div class="project-text"> + <div class="section-text"> {{ range sort (where .Site.RegularPages "Section" "posts") "Date" }} <a href="{{ .RelPermalink }}" target="_blank"> - <div class="project-item"> - <h2>- {{ .Title }}</h2> - <p>{{ .Date.Format "2 Jan 2006" }}<p> + <div class=section-item> + <h2>{{ .Title }}</h2> + <p>{{ with .Params.description }}{{ . }}{{ else }}{{.Summary | truncate 110 }}{{ end }}</p> + <!-- <p>{{ .Date.Format "2 Jan 2006" }}<p> --> </div> </a> {{ end }}
M hugo-site/static/css/main.csshugo-site/static/css/main.css

@@ -249,14 +249,6 @@ color: rgba(0,0,0,0.2);

text-shadow: none; } - -#projects{ - display: flex; - flex-flow: column; - margin-top: 10rem; - margin-bottom: 5rem; -} - .page-section{ display: flex; flex-flow: column;

@@ -286,7 +278,7 @@ top: -1.8rem;

right: -7rem; } -.project-text{ +.section-text{ padding: 2rem 2rem; padding-top: 3.5rem; }

@@ -308,15 +300,16 @@ margin-left: 1.6rem;

margin-bottom: 1rem; } -.project-item:hover { - background-color: #f0f0f0; +.section-item { border-radius: 0.4rem; - padding: 0.2rem 0; + padding: 0.2rem 0.8rem; } -.project-item { + +.section-item:hover { + background-color: #f5f5f5; border-radius: 0.4rem; - padding: 0.2rem 0; } + .btn { margin: none;