mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-09 14:59:45 +00:00
Add option to display project_timeframe to the project pages and home page (#289)
* Add project_timeline to the project template Project timeline is sometimes very important aspect of your project as it shows that you have been working on it for some time. This adds the feature to the template, but only uses it when it is defined. * Add description of a new feature to README * Apply suggestions from code review Co-authored-by: Victoria Drake <24644237+victoriadrake@users.noreply.github.com>
This commit is contained in:
parent
f563933043
commit
48159c6b4d
2 changed files with 9 additions and 1 deletions
|
@ -138,8 +138,11 @@ resources:
|
||||||
- src: NameOfYourImage.jpg
|
- src: NameOfYourImage.jpg
|
||||||
params:
|
params:
|
||||||
weight: -100
|
weight: -100
|
||||||
|
project_timeframe: "June-December"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You can add a `project_timeframe` parameter to the frontmatter of your project to optionally display an arbitrary string on the homepage and modal.
|
||||||
|
|
||||||
## Blog section
|
## Blog section
|
||||||
|
|
||||||
Create an index file for the blog:
|
Create an index file for the blog:
|
||||||
|
|
|
@ -34,6 +34,9 @@
|
||||||
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
<a {{ if .Params.external_link }} href="{{ .Params.external_link }}" {{ end }}>
|
||||||
{{ .Title | markdownify }}
|
{{ .Title | markdownify }}
|
||||||
</a>
|
</a>
|
||||||
|
{{ if .Params.project_timeframe }}
|
||||||
|
<p class="fa-xs">{{ .Params.project_timeframe }}</p>
|
||||||
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -58,7 +61,9 @@
|
||||||
<p class="modal-card-title has-text-centered">{{ . }}</p>
|
<p class="modal-card-title has-text-centered">{{ . }}</p>
|
||||||
</header>
|
</header>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if .Params.project_timeframe }}
|
||||||
|
<p class="fa-xs">{{ .Params.project_timeframe }}</p>
|
||||||
|
{{ end }}
|
||||||
{{ with .Resources.ByType "image" }}
|
{{ with .Resources.ByType "image" }}
|
||||||
{{ $moreThenOneImage := gt (len .) 1 }}
|
{{ $moreThenOneImage := gt (len .) 1 }}
|
||||||
{{ if $moreThenOneImage }}
|
{{ if $moreThenOneImage }}
|
||||||
|
|
Loading…
Reference in a new issue