mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
Refactor HTML indents to 2 spaces and refactor long lines
This commit is contained in:
parent
30395f8c0b
commit
2548ae2ad2
19 changed files with 420 additions and 359 deletions
|
@ -3,7 +3,9 @@
|
|||
<div class="article-metadata">
|
||||
|
||||
<span class="article-date">
|
||||
<time datetime="{{ $.Date }}" itemprop="datePublished">{{ $.Date.Format $.Site.Params.date_format }}</time>
|
||||
<time datetime="{{ $.Date }}" itemprop="datePublished">
|
||||
{{ $.Date.Format $.Site.Params.date_format }}
|
||||
</time>
|
||||
</span>
|
||||
|
||||
{{ if isset $.Params "tags" }}
|
||||
|
@ -12,7 +14,8 @@
|
|||
<span class="article-tags">
|
||||
<i class="fa fa-tags"></i>
|
||||
{{ range $k, $v := $.Params.tags }}
|
||||
<a class="article-tag-link" href="{{ $.Site.BaseURL }}tags/{{ . | urlize | lower }}">{{ . }}</a>{{ if lt $k (sub $tagsLen 1) }}, {{ end }}
|
||||
<a class="article-tag-link" href="{{ $.Site.BaseURL }}tags/{{ . | urlize | lower }}">{{ . }}</a
|
||||
>{{ if lt $k (sub $tagsLen 1) }}, {{ end }}
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ end }}
|
||||
|
|
|
@ -4,9 +4,16 @@
|
|||
|
||||
{{ with .Site.Copyright }}{{ . | markdownify}} · {{ end }}
|
||||
|
||||
Powered by the <a href="https://github.com/gcushen/hugo-academic" target="_blank">Academic theme</a> for <a href="http://gohugo.io" target="_blank">Hugo</a>.
|
||||
Powered by the <a href="https://github.com/gcushen/hugo-academic" target="_blank">Academic
|
||||
theme</a> for <a href="http://gohugo.io" target="_blank">Hugo</a>.
|
||||
|
||||
<span class="pull-right"><a href="#" id="back_to_top"><span class="button_icon"><i class="fa fa-chevron-up fa-2x" aria-hidden="true"></i></span></a></span>
|
||||
<span class="pull-right">
|
||||
<a href="#" id="back_to_top">
|
||||
<span class="button_icon">
|
||||
<i class="fa fa-chevron-up fa-2x" aria-hidden="true"></i>
|
||||
</span>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-expanded="false">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
|
||||
data-target=".navbar-collapse" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<nav>
|
||||
<ul class="pager">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<li><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">« Previous</a></li>
|
||||
<li><a href="{{ .Site.BaseURL }}{{ .Paginator.Prev.URL }}">« Previous</a></li>
|
||||
{{ end }}
|
||||
{{ if .Paginator.HasNext }}
|
||||
<li><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">Next »</a></li>
|
||||
<li><a href="{{ .Site.BaseURL }}{{ .Paginator.Next.URL }}">Next »</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
<div class="pub-list-item" itemscope itemtype="http://schema.org/CreativeWork">
|
||||
<div class="row">
|
||||
|
||||
{{ if .Params.image_preview }}
|
||||
|
||||
<div class="col-md-12">
|
||||
<a href="{{ .Permalink }}">
|
||||
<img src="{{ $.Site.BaseURL }}img/{{ .Params.image_preview }}" class="pub-banner" itemprop="image">
|
||||
<img src="{{ $.Site.BaseURL }}img/{{ .Params.image_preview }}" class="pub-banner"
|
||||
itemprop="image">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
{{ else if .Params.image}}
|
||||
|
||||
<div class="col-md-12">
|
||||
<a href="{{ .Permalink }}">
|
||||
<img src="{{ $.Site.BaseURL }}img/{{ .Params.image }}" class="pub-banner" itemprop="image">
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
|
||||
{{ else }}
|
||||
|
||||
<div class="col-md-12">
|
||||
{{end}}
|
||||
|
||||
{{ end }}
|
||||
|
||||
<h3 class="article-title" itemprop="name">
|
||||
<a href="{{ .Permalink }}" itemprop="url">{{ .Title }}</a>
|
||||
|
|
|
@ -2,16 +2,42 @@
|
|||
{{ $ := .content }}
|
||||
|
||||
{{ if $is_list }}
|
||||
<a class="btn btn-primary btn-outline btn-xs" href="{{ $.Permalink }}">Details</a>
|
||||
<a class="btn btn-primary btn-outline btn-xs" href="{{ $.Permalink }}">
|
||||
Details
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_pdf }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
PDF
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_slides }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
Slides
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_video }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
Video
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_code }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
Code
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_dataset }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
Dataset
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with $.Params.url_project }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">
|
||||
Project
|
||||
</a>
|
||||
{{ end }}
|
||||
|
||||
{{ with $.Params.url_pdf }}<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">PDF</a>{{ end }}
|
||||
{{ with $.Params.url_slides }}<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">Slides</a>{{ end }}
|
||||
{{ with $.Params.url_video }}<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">Video</a>{{ end }}
|
||||
{{ with $.Params.url_code }}<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">Code</a>{{ end }}
|
||||
{{ with $.Params.url_dataset }}<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">Dataset</a>{{ end }}
|
||||
{{ with $.Params.url_project }}<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ . | absURL }}">Project</a>{{ end }}
|
||||
|
||||
{{ range $.Params.url_custom }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .url | absURL }}">{{ .name }}</a>
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .url | absURL }}">
|
||||
{{ .name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<nav>
|
||||
<ul class="pager">
|
||||
{{if .PrevInSection}}
|
||||
<li class="previous"><a href="{{.PrevInSection.Permalink}}"><span aria-hidden="true">←</span> {{.PrevInSection.Title}}</a></li>
|
||||
<li class="previous"><a href="{{.PrevInSection.Permalink}}"><span
|
||||
aria-hidden="true">←</span> {{.PrevInSection.Title}}</a></li>
|
||||
{{end}}
|
||||
|
||||
{{if .NextInSection}}
|
||||
<li class="next"><a href="{{.NextInSection.Permalink}}">{{.NextInSection.Title}} <span aria-hidden="true">→</span></a></li>
|
||||
<li class="next"><a href="{{.NextInSection.Permalink}}">{{.NextInSection.Title}} <span
|
||||
aria-hidden="true">→</span></a></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -2,27 +2,36 @@
|
|||
<div class="share-box">
|
||||
<ul class="share">
|
||||
<li>
|
||||
<a class="facebook" href="https://www.facebook.com/sharer.php?u={{ .Permalink | html }}" target="_blank">
|
||||
<a class="facebook"
|
||||
href="https://www.facebook.com/sharer.php?u={{ .Permalink | html }}"
|
||||
target="_blank">
|
||||
<i class="fa fa-facebook"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="twitter" href="https://twitter.com/intent/tweet?text={{ .Title | html }}&url={{ .Permalink | html }}" target="_blank">
|
||||
<a class="twitter"
|
||||
href="https://twitter.com/intent/tweet?text={{ .Title | html }}&url={{ .Permalink | html }}"
|
||||
target="_blank">
|
||||
<i class="fa fa-twitter"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="linkedin" href="https://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink | html }}&title={{ .Title | html }}" target="_blank">
|
||||
<a class="linkedin"
|
||||
href="https://www.linkedin.com/shareArticle?mini=true&url={{ .Permalink | html }}&title={{ .Title | html }}"
|
||||
target="_blank">
|
||||
<i class="fa fa-linkedin"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="weibo" href="http://service.weibo.com/share/share.php?url={{ .Permalink | html }}&title={{ .Title | html }}" target="_blank">
|
||||
<a class="weibo"
|
||||
href="http://service.weibo.com/share/share.php?url={{ .Permalink | html }}&title={{ .Title | html }}"
|
||||
target="_blank">
|
||||
<i class="fa fa-weibo"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="email" href="mailto:?subject={{ .Title | html }}&body={{ .Permalink | html }}">
|
||||
<a class="email"
|
||||
href="mailto:?subject={{ .Title | html }}&body={{ .Permalink | html }}">
|
||||
<i class="fa fa-envelope"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
|
||||
<h1 itemprop="name">{{ .Title }}</h1>
|
||||
|
||||
{{ with .Params.external_link }}<a class="btn btn-primary btn-outline" href="{{ . }}">Go to Project Site</a>{{ end }}
|
||||
{{ with .Params.external_link }}
|
||||
<a class="btn btn-primary btn-outline" href="{{ . }}">Go to Project Site</a>
|
||||
{{ end }}
|
||||
|
||||
<div class="article-style" itemprop="articleBody">
|
||||
{{ .Content }}
|
||||
|
|
|
@ -39,7 +39,9 @@
|
|||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-3 pub-row-heading">Date</div>
|
||||
<div class="col-xs-12 col-sm-9" itemprop="datePublished">{{ .Date.Format "January, 2006" }}</div>
|
||||
<div class="col-xs-12 col-sm-9" itemprop="datePublished">
|
||||
{{ .Date.Format "January, 2006" }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1"></div>
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
{{ range .Pages.ByDate.Reverse }}
|
||||
<li>
|
||||
<i class="fa-li fa fa-file-text-o" aria-hidden="true" style="color:#03396c;font-size:80%;padding-top:6px;"></i>
|
||||
<i class="fa-li fa fa-file-text-o" aria-hidden="true"
|
||||
style="color:#03396c;font-size:80%;padding-top:6px;"></i>
|
||||
{{ .Title }}
|
||||
<p>{{ partial "publication_links" (dict "content" . "is_list" 1) }}</p>
|
||||
</li>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue