Skip to content

Commit

Permalink
Merge pull request #16 from dasc-lab/style/redesign_publications
Browse files Browse the repository at this point in the history
Style/redesign publications
  • Loading branch information
dev10110 authored Sep 28, 2024
2 parents 14f9ed0 + 81c2eeb commit 2114442
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 10 deletions.
6 changes: 5 additions & 1 deletion layouts/papers/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ <h1>{{ .Title }}</h1>
{{ range .Pages.ByPublishDate.Reverse.GroupByDate "2006" }}
<div class="py-3">
<h3> {{ .Key }} </h3>
<ul>
{{ range .Pages }}
{{ partial "paper-card" . }}
<li>
{{ partial "small-paper-list-item" . }}
</li>
{{ end }}
</ul>
</div>
{{ end }}

Expand Down
17 changes: 13 additions & 4 deletions layouts/papers/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,31 @@

<p class="d-none"> Rendered from /layouts/papers/single.html </p>

<div class="my-3">
<h2>{{ .Title }}</h2>
</div>

{{ partial "paper-card" . }}

<div class="my-3">
<h3>Abstract</h3>
<p>{{ .Params.abstract}}</p>
</div>


{{ .Content }}


{{ if .Params.bib }}
<div class="my-3">
<pre>
<code>
<h3> Bib</h3>
<div class="card">
<div class="card-body">
<pre>
{{ .Params.bib }}
</code>
</pre>
</pre>
</div>
</div>
</div>
{{ end }}

Expand Down
Binary file added layouts/partials/.style.html.swp
Binary file not shown.
2 changes: 1 addition & 1 deletion layouts/partials/paper-card.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<!-- Badge for venue -->
<div> <p>{{ .Params.venue }} </p></div>

<div>
<div class="blue-links">
{{ if .Params.pdf }}
<a href="{{ .Params.pdf }}" target="_blank">pdf</a> /
{{ end }}
Expand Down
74 changes: 74 additions & 0 deletions layouts/partials/small-paper-list-item.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<div class="row align-items-top mt-3">
<a class="no-underline" href="{{ .RelPermalink }}"><b>{{ .Title }}</b></a>

<!-- AUTHOR LIST -->
<div class="author-list">
{{ range .Params.authors }}
<!-- construct url to search for -->
{{ $url := printf "/people/%s" . }}

<!-- check if the url exists -->
{{ $authorPage := $.Site.GetPage $url }}

<!-- if it does, create a link, else just print the name -->
<span class="author-list-item">
{{ if $authorPage }}
<a class="author-list-link" href="{{ $url }}">{{ $authorPage.Title }}</a>
{{ else }}
{{ . }}
{{ end }}
</span>
{{ end }}
</div>

<!-- Badge for venue -->
<div class="blue-links">
{{.Params.venue }}
<br>
<span>
{{ if .Params.abstract }}
<a data-bs-toggle="collapse" href="#collapse-abstract-{{ .Key }}" role="button">abstract</a> /
{{ end }}
{{ if .Params.pdf }}
<a href="{{ .Params.pdf }}" target="_blank">pdf</a> /
{{ end }}
{{ if .Params.video }}
<a href="{{ .Params.video }}" target="_blank">video</a> /
{{ end }}
{{ if .Params.code }}
<a href="{{ .Params.code }}" target="_blank">code</a> /
{{ end }}
{{ if .Params.poster }}
<a href="{{ .Params.poster }}" target="_blank">poster</a> /
{{ end }}
{{ if .Params.slides }}
<a href="{{ .Params.slides }}" target="_blank">slides</a> /
{{ end }}
{{ if .Params.link }}
<a href="{{ .Params.link }}" target="_blank">link</a> /
{{ end }}
{{ if .Params.arxiv }}
<a href="{{ .Params.arxiv}}">arxiv</a> /
{{ end }}
{{ if .Params.bib }}
<a data-bs-toggle="collapse" href="#collapse-bib-{{ .Key }}" role="button">bib</a> /
{{ end }}
</span>
</div>
{{ if .Params.abstract }}
<div class="collapse my-3" id="collapse-abstract-{{ .Key }}">
<div class="card card-body">
{{ .Params.abstract }}
</div>
</div>
{{ end }}
{{ if .Params.bib }}
<div class="collapse my-3" id="collapse-bib-{{ .Key }}">
<div class="card card-body">
<pre>{{ .Params.bib }}</pre>
</div>
</div>
{{ end }}


</div>
14 changes: 10 additions & 4 deletions layouts/partials/style.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@
}

a {
/* color: inherit; */
color: var(--bs-link-color-rgb);
color: var(--bs-body-color-rgb);
text-decoration: underline;
text-decoration-color: rgba(var(--bs-body-color-rgb),var(--bs-link-opacity,0.5));
text-underline-offset: 0.25em;
}

pre {
white-space: pre-wrap; /* Enables wrapping */
word-wrap: break-word; /* Breaks long words */
}

/* authors list */

.author-list>*:not(:last-child)::after {
Expand All @@ -43,8 +47,10 @@
text-decoration: none;
}



/* make links in divs with class="blue-links" blue */
.blue-links a {
color: var(--bs-link-color);
}

.no-underline {
text-decoration: none;
Expand Down

0 comments on commit 2114442

Please sign in to comment.