Skip to content

Commit

Permalink
Merge pull request #100 from IamShubhamGupto/master
Browse files Browse the repository at this point in the history
added resources content pages
  • Loading branch information
johannag126 authored Oct 15, 2024
2 parents 8db5484 + 9cb9305 commit 105d59a
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 168 deletions.
13 changes: 7 additions & 6 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,16 @@ enableEmoji = true
parent = "publications"
weight = 2

[[menu.main]]
identifier = "resources"
name = "Resources"
url = "/resources/"
weight = 7

[[menu.main]]
name = "News"
identifier = "news"
weight = 7
weight = 8

[[menu.main]]
identifier = "Our news"
Expand All @@ -130,11 +136,6 @@ enableEmoji = true
parent = "news"
weight = 2

#[[menu.main]]
# name = "Blog"
# url = "/blog/"
# weight = 8

[permalinks]
post = "/:year/:month/:day/:slug/"
pages = "/:filename/"
8 changes: 8 additions & 0 deletions content/resources/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: 'Resources'
heroHeading: 'Resources'
heroSubHeading: ''
heroBackground: '/images/SouthAtlantic.A2002157.1055.250m.jpg'
---

🚧 Under Development 🚧
Empty file removed content/sitevisit/_index.md
Empty file.
27 changes: 27 additions & 0 deletions themes/hugo-hero-theme/layouts/resources/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{ define "header_css" }}{{ end }}
{{ define "body_classes" }}page-work-list{{ end }}
{{ define "header_classes" }}{{ end }}

{{ define "main" }}

{{ partial "hero-image-setheight.html" (dict "background" .Params.heroBackground "heading" .Params.heroHeading "subheading" .Params.heroSubHeading "content" .)}}
{{ if .Content }}
<div class="container pt-6 pt-md-10">
<div class="row">
<div class="col-12">
<div class="page-intro">
{{ .Content }}
</div>
</div>
</div>
</div>
{{ end }}

<div class="container pb-6 pt-6 pb-md-10 pt-md-10">
<div class="row">
{{ range .Pages.ByWeight }}
<div class="col-12 col-md-6 mb-2 ">{{ .Render "summary" }}</div>
{{ end }}
</div>
</div>
{{ end }}
39 changes: 39 additions & 0 deletions themes/hugo-hero-theme/layouts/resources/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{{ define "header_css" }}{{ end }}
{{ define "body_classes" }}page-work-single{{ end }}
{{ define "header_classes" }}{{ end }}

{{ define "main" }}
{{ partial "hero-image-setheight.html" (dict "background" .Params.heroBackground "heading" .Params.heroHeading "subheading" .Params.heroSubHeading "section" .Section "content" .)}}
<div class="container pt-4 pt-md-10 pb-4 pb-md-10">
<div class="row justify-content-start">
<div class="col-12 col-md-8">
<div class="work work-single">
<div class="text text-justify mx-auto">{{.Content}}</div>
</div>
</div>
{{ if .Params.images }}
<div class="col-12 pt-4 pt-md-10">
<h2 class="mb-2 text-uppercase">Gallery</h2>
<div class="masonry">
{{ range .Params.images }}
<div class="work-image item">
<img src="{{ . | relURL }}"/>
</div>
{{ end }}
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}

{{ define "footer_js" }}
{{ $library := resources.Get "js/libs/library.js" }}
{{ $services := resources.Get "js/pages/services.js" }}
{{ $servicesJS := slice $library $services |resources.Concat "js/services.js" }}
{{ if .Site.IsServer }}
<script type="text/javascript" src="{{ $servicesJS.RelPermalink }}"></script>
{{ else }}
<script type="text/javascript" src="{{ ($servicesJS | minify | fingerprint).RelPermalink }}"></script>
{{ end }}
{{ end }}
13 changes: 13 additions & 0 deletions themes/hugo-hero-theme/layouts/resources/summary.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="work work-summary">
{{ if .Params.thumbnail }}
<div class="work-image">
<a href="{{ .RelPermalink }}"><img src="{{ .Params.thumbnail | relURL }}"/></a>
</div>
{{ end }}
<div class="work-content">
<h2 class="work-title">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h2>
{{ .Content | truncate 120 "..." }}
</div>
</div>
162 changes: 0 additions & 162 deletions themes/hugo-hero-theme/layouts/sitevisit/list.html

This file was deleted.

0 comments on commit 105d59a

Please sign in to comment.