mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2025-03-13 03:06:15 +00:00
Bug fixes 🐞, added to README.
This commit is contained in:
parent
ef3fb0cf02
commit
6194be724a
3 changed files with 17 additions and 12 deletions
|
@ -89,6 +89,8 @@ Projects are ordered on the main page by `weight` first, then by `date`.
|
||||||
|
|
||||||
The `image` will show up on the main page and in the project's details view. If you don't specify an image, the `placeholderimg` from your site's `config.toml` file will be used.
|
The `image` will show up on the main page and in the project's details view. If you don't specify an image, the `placeholderimg` from your site's `config.toml` file will be used.
|
||||||
|
|
||||||
|
If you don't specify a `title`, only the photo will show. You can still add content to the file to "caption" the image, and this will show in the popup. (Great way to create a simple gallery!)
|
||||||
|
|
||||||
If you leave `external_link` empty, clicking on a project on your main page will pop up a window with the project's details. If you specify a url instead, clicking on the project on your main page will take you to that url.
|
If you leave `external_link` empty, clicking on a project on your main page will pop up a window with the project's details. If you specify a url instead, clicking on the project on your main page will take you to that url.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
@ -20,7 +20,7 @@ canonifyurls = true # Turns relative urls into a
|
||||||
timezone = "America/Los_Angeles" # Your timezone as in the TZ* column of this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
timezone = "America/Los_Angeles" # Your timezone as in the TZ* column of this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||||
dateform = "Jan 2, 2006"
|
dateform = "Jan 2, 2006"
|
||||||
dateformfull = "Mon Jan 2 2006 15:04:05 EST"
|
dateformfull = "Mon Jan 2 2006 15:04:05 EST"
|
||||||
cachebuster = true # Add the current unix timestamp in query string for cache busting css assets
|
cachebuster = false # Add the current unix timestamp in query string for cache busting css assets (relevant in development mode)
|
||||||
description = "Website Description" # Max 160 characters show in search results
|
description = "Website Description" # Max 160 characters show in search results
|
||||||
faviconfile = "img/fav.ico"
|
faviconfile = "img/fav.ico"
|
||||||
highlightjs = true # Syntax highlighting
|
highlightjs = true # Syntax highlighting
|
||||||
|
@ -29,6 +29,7 @@ canonifyurls = true # Turns relative urls into a
|
||||||
|
|
||||||
showblog = true # Show Blog section on home page
|
showblog = true # Show Blog section on home page
|
||||||
showprojects = true # Show Projects section on home page
|
showprojects = true # Show Projects section on home page
|
||||||
|
projectcolumns = "3" # Choose "2" or "3" columns for projects section
|
||||||
placeholderimg = "/img/workday.jpg" # For Projects without image
|
placeholderimg = "/img/workday.jpg" # For Projects without image
|
||||||
showallposts = false # Set 'true' to list all posts on home page, or set 'false' to link to separate blog list page
|
showallposts = false # Set 'true' to list all posts on home page, or set 'false' to link to separate blog list page
|
||||||
showlatest = true # Show latest blog post summary
|
showlatest = true # Show latest blog post summary
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
<div class="section is-small">
|
<div class="section is-small">
|
||||||
<div class="columns is-multiline">
|
<div class="columns is-multiline">
|
||||||
{{ range sort .Pages }} {{ if eq .Section "projects" }}
|
{{ range sort .Pages }} {{ if eq .Section "projects" }}
|
||||||
<div class="column is-one-third">
|
{{ if eq .Site.Params.projectcolumns "2" }}
|
||||||
|
<div class="column is-half"> {{ else if eq .Site.Params.projectcolumns "3" }}
|
||||||
|
<div class="column is-one-third"> {{ end }}
|
||||||
<!-- Hey Vicky, show half column if number is even. -->
|
<!-- Hey Vicky, show half column if number is even. -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-image">
|
<div class="card-image">
|
||||||
|
@ -13,9 +15,9 @@
|
||||||
<a {{ if .Params.external_link }}
|
<a {{ if .Params.external_link }}
|
||||||
href="{{ .Params.external_link }}"
|
href="{{ .Params.external_link }}"
|
||||||
{{ else }}
|
{{ else }}
|
||||||
id="project{{.Title}}"
|
id="project{{.Title | urlize}}"
|
||||||
{{ end }}>
|
{{ end }}>
|
||||||
<img src="{{ .Params.image | default "{{ .Params.placeholderimg }}" }}"/>
|
<img src="{{ if .Params.image }}{{ .Params.image }}{{ else }}{{ .Site.Params.placeholderimg }}{{ end }}">
|
||||||
</a>
|
</a>
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
|
@ -23,7 +25,7 @@
|
||||||
<a {{ if .Params.external_link }}
|
<a {{ if .Params.external_link }}
|
||||||
href="{{ .Params.external_link }}"
|
href="{{ .Params.external_link }}"
|
||||||
{{ else }}
|
{{ else }}
|
||||||
id="project{{.Title}}"
|
id="project{{.Title | urlize}}"
|
||||||
{{ end }}>
|
{{ end }}>
|
||||||
{{ .Title }}
|
{{ .Title }}
|
||||||
</a>
|
</a>
|
||||||
|
@ -31,14 +33,14 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ end }} {{ end }}
|
{{ end }} {{ end }}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<!-- End Projects container -->
|
<!-- End Projects container -->
|
||||||
|
|
||||||
<!-- Projects modals -->
|
<!-- Projects modals -->
|
||||||
{{ range sort .Pages }} {{ if eq .Section "projects" }}
|
{{ range sort .Pages }} {{ if eq .Section "projects" }}
|
||||||
<div class="modal" id="modal{{.Title}}">
|
<div class="modal" id="modal{{.Title | urlize}}">
|
||||||
<div class="modal-background"></div>
|
<div class="modal-background"></div>
|
||||||
<div class="modal-card">
|
<div class="modal-card">
|
||||||
{{ with .Title }}
|
{{ with .Title }}
|
||||||
|
@ -55,14 +57,14 @@
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<button class="modal-close is-large" aria-label="close" id="close{{.Title}}"></button>
|
<button class="modal-close is-large" aria-label="close" id="close{{.Title | urlize}}"></button>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$('#project{{.Title}}').click(function() {
|
$('#project{{.Title | urlize}}').click(function() {
|
||||||
$('#modal{{.Title}}').addClass('is-active');
|
$('#modal{{.Title | urlize}}').addClass('is-active');
|
||||||
});
|
});
|
||||||
$('#close{{.Title}}').click(function() {
|
$('#close{{.Title | urlize}}').click(function() {
|
||||||
$('#modal{{.Title}}').removeClass('is-active');
|
$('#modal{{.Title | urlize}}').removeClass('is-active');
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{{ end }} {{ end }}
|
{{ end }} {{ end }}
|
||||||
|
|
Loading…
Reference in a new issue