Skip to content

Commit

Permalink
Add projects
Browse files Browse the repository at this point in the history
  • Loading branch information
djgagne committed Aug 7, 2024
1 parent a2a3835 commit d6989ca
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
44 changes: 44 additions & 0 deletions themes/ncar/layouts/projects/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{ define "main" }}

<section class="site-project-header" style="background-image: url({{ .Params.image | absURL }});">
<div class="container">
<div class="row align-items-center">
<div class="col-lg-8">
<div class="site-project-header-content">
<h1>
{{ .Title | safeHTML }}
</h1>
</div>
</div>
</div>
</div>
</section>

<section class="site-project" id="project">
<div class="container">
<div class="row">
{{ range (.Paginator 4).Pages }}
<div class="col-lg-6 col-md-10 mx-auto">
<a href="{{ .Permalink }}" class="text-decoration-none">
<div class="site-project-item">
<div class="site-project-item-thumb">
<img src="{{ .Params.Image | absURL }}" alt="project-thumb">
</div>
<div class="site-project-item-content">
<span>{{ delimit .Params.category ", " }}</span>
<h3>{{ .Title }}</h3>
</div>
</div>
</a>
</div>
{{ end }}
<div class="col-12">
<div class="site-project-pagination">
{{ template "_internal/pagination.html" . }}
</div>
</div>
</div>
</div>
</section>

{{ end }}
49 changes: 49 additions & 0 deletions themes/ncar/layouts/projects/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{ define "main" }}

<section class="site-project-single-section">
<div class="container">
<div class="row">
<div class="col-lg-8 mx-auto">
<div class="site-project-single">
<h1>
{{ .Title }}
</h1>
<div class="site-project-single-description">
{{ .Content }}
</div>
<div class="site-project-single-image">
{{ range .Params.project_images }}
<img src="{{ . | absURL }}" alt="project image">
{{ end }}
</div>
{{ if or .PrevInSection .NextInSection }}
<div class="site-project-single-action">
{{ if .PrevInSection }}
<div class="site-project-single-action-prev">
<a href="{{.PrevInSection.Permalink}}">
<img src="{{ "images/to-top.svg" | absURL }}" alt="previous">
<span class="link-area">
<span data-text="Previous">Previous</span>
</span>
</a>
</div>
{{ end }}
{{ if .NextInSection }}
<div class="site-project-single-action-next">
<a href="{{.NextInSection.Permalink}}">
<span class="link-area">
<span data-text="Next">Next</span>
</span>
<img src="{{ "images/to-top.svg" | absURL }}" alt="next">
</a>
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>
</div>
</div>
</section>

{{ end }}

0 comments on commit d6989ca

Please sign in to comment.