Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/academia-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Chan <d0uuub@gmail.com>2020-03-29 07:49:32 +0300
committerRoy Chan <d0uuub@gmail.com>2020-03-29 07:49:32 +0300
commite5775ca83f1dab0c2636109f8be488eb0eaa18f5 (patch)
tree691a9d6b9668afa08aadeeb25e67c3ba2758357b /layouts
parente8ad0b2d5c251f593aa2fd429be4a67604377aa2 (diff)
update experience widget
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/widgets/experience.html77
1 files changed, 48 insertions, 29 deletions
diff --git a/layouts/partials/widgets/experience.html b/layouts/partials/widgets/experience.html
index 1646168..77bba11 100644
--- a/layouts/partials/widgets/experience.html
+++ b/layouts/partials/widgets/experience.html
@@ -1,40 +1,59 @@
{{ $ := .root }}
{{ $page := .page }}
+<!-- Experience widget -->
<div class="row">
- <!-- Experience widget -->
- <div class="col-12 text-center section-heading">
+ <div class="col-12 col-lg-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
- {{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
</div>
- {{ if $page.Params.experience }}
- {{ $exp_len := len $page.Params.experience }}
- {{ range $idx, $key := sort $page.Params.experience ".date_start" "desc" }}
- <div class="col-md-6 col-lg-4 mb-4">
- <div class="card rounded-0 border-0 shadow-sm experience">
- <div class="card-body rounded-0 border-0">
- <h4 class="card-title exp-company my-0">
- {{- with .company_url}}<a href="{{.}}" target="_blank"
- rel="noopener">{{end}}{{.company | markdownify | emojify}}{{with .company_url}}</a>{{end -}}
- </h4>
- <p class="card-title text-muted exp-title my-0">{{.title | markdownify | emojify}}</p>
- <div class="text-muted exp-meta">
- {{ (time .date_start).Format ($page.Params.date_format | default "January 2006") }} –
- {{ if .date_end}}
- {{ (time .date_end).Format ($page.Params.date_format | default "January 2006") }}
- {{else}}
- {{ i18n "present" | default "Present" }}
- {{end}}
- {{with .location}}
- <span class="middot-divider"></span>
- <span>{{.}}</span>
- {{end}}
+ <div class="col-12 col-lg-8">
+ {{ with $page.Content }}{{ . }}{{ end }}
+
+ {{ if $page.Params.experience }}
+ {{ $exp_len := len $page.Params.experience }}
+ {{ range $idx, $key := sort $page.Params.experience ".date_start" "desc" }}
+ <div class="row experience">
+ <!-- Timeline -->
+ <div class="col-auto text-center flex-column d-none d-sm-flex">
+ <div class="row h-50">
+ <div class="col {{if gt $idx 0}}border-right{{end}}">&nbsp;</div>
+ <div class="col">&nbsp;</div>
+ </div>
+ <div class="m-2">
+ <span class="badge badge-pill border {{if not .date_end}}exp-fill{{end}}">&nbsp;</span>
+ </div>
+ <div class="row h-50">
+ <div class="col {{if lt $idx (sub $exp_len 1)}}border-right{{end}}">&nbsp;</div>
+ <div class="col">&nbsp;</div>
+ </div>
+ </div>
+ <!-- Content -->
+ <div class="col py-2">
+ <div class="card">
+ <div class="card-body">
+ <h4 class="card-title exp-title text-muted mt-0 mb-1">{{.title | markdownify | emojify}}</h4>
+ <h4 class="card-title exp-company text-muted my-0">
+ {{- with .company_url}}<a href="{{.}}" target="_blank" rel="noopener">{{end}}{{.company | markdownify | emojify}}{{with .company_url}}</a>{{end -}}
+ </h4>
+ <div class="text-muted exp-meta">
+ {{ (time .date_start).Format ($page.Params.date_format | default "January 2006") }} –
+ {{ if .date_end}}
+ {{ (time .date_end).Format ($page.Params.date_format | default "January 2006") }}
+ {{else}}
+ {{ i18n "present" | default "Present" }}
+ {{end}}
+ {{with .location}}
+ <span class="middot-divider"></span>
+ <span>{{.}}</span>
+ {{end}}
+ </div>
+ {{with .description}}<div class="card-text">{{. | markdownify | emojify}}</div>{{end}}
+ </div>
</div>
- {{with .description}}<div class="card-text">{{. | markdownify | emojify}}</div>{{end}}
</div>
</div>
+ {{end}}
+ {{end}}
</div>
- {{end}}
- {{end}}
-</div> \ No newline at end of file
+</div>