Skip to content

Commit

Permalink
📝 (content): update DevOps consultancy page and improve headline temp…
Browse files Browse the repository at this point in the history
…late

Remove placeholder content from the DevOps Technology Consultancy page to enhance clarity and professionalism. The headline template is refactored to handle cases where headline parameters are not provided, ensuring a more robust and flexible rendering of content. This change improves the user experience by displaying relevant information consistently and handling missing data gracefully.
  • Loading branch information
MrHinsh committed Oct 3, 2024
1 parent ad8bd4b commit 6dfdcbd
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type: capabilities
slug: devops-technology-consultancy
headline:
title: "DevOps Technology Consultancy"
content: "?"
content:
cards:
- title: "Deep Technical Knowledge"
content: "Our team has extensive experience with agile within the context of many diferent team settings."
Expand Down
108 changes: 61 additions & 47 deletions site/layouts/partials/headline.html
Original file line number Diff line number Diff line change
@@ -1,57 +1,71 @@
{{ if .Params.headline }}
<section class="container my-5">
<div class="row p-5">
<div class="col-md-6">
<h1 class="mb-4 nkda-heading-primary">{{ .Params.headline.title | markdownify }}</h1>
<h1 class="mb-4 nkda-heading-secondary">{{ .Params.headline.subtitle | markdownify }}</h1>
{{ if .Params.headline.buttons }}
<div class="mb-4">
{{ range .Params.headline.buttons }}
{{ $isExternal := strings.HasPrefix .link "http" -}}
{{ if $isExternal }}
<a href="{{ .link | safeURL }}" class="external-link btn btn-nkdprimary p-2" target="_blank" rel="noopener noreferrer">
{{ .content }}&nbsp;<small><i class="fa-regular fa-arrow-up-right-from-square" style="transform: scale(0.6)"></i> </small>
</a>
{{ else }}
<a href="{{ .link | safeURL }}" class="btn btn-nkdprimary p-2">{{ .content }}</a>
{{ end }}
<section class="container my-5">
<div class="row p-5">
<div class="col-md-6">
<h1 class="mb-4 nkda-heading-primary">
{{ if .Params.headline }}
{{ .Params.headline.title | markdownify }}
{{ else if .Params.card }}
{{ .Params.card.title | markdownify }}
{{ else }}
{{ .Title | markdownify }}
{{ end }}
</h1>
<h2 class="mb-4 nkda-heading-secondary">
{{ if .Params.headline }}
{{ .Params.headline.subtitle | markdownify }}
{{ else if .Params.card }}
{{ .Params.card.subtitle | markdownify }}
{{ else }}
{{ .Params.subtitle | markdownify }}
{{ end }}
</h2>
{{ if .Params.headline.buttons }}
<div class="mb-4">
{{ range .Params.headline.buttons }}
{{ $isExternal := strings.HasPrefix .link "http" -}}
{{ if $isExternal }}
<a href="{{ .link | safeURL }}" class="external-link btn btn-nkdprimary p-2" target="_blank" rel="noopener noreferrer">
{{ .content }}&nbsp;<small><i class="fa-regular fa-arrow-up-right-from-square" style="transform: scale(0.6)"></i> </small>
</a>
{{ else }}
<a href="{{ .link | safeURL }}" class="btn btn-nkdprimary p-2">{{ .content }}</a>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
</div>
<div class="col-md-6">
<p class="nkda-heading-primary-content">
{{ if .Params.headline }}
{{ .Params.headline.content | markdownify }}
{{ else if .Params.card }}
{{ .Params.card.content | markdownify }}
{{ else }}
{{ end }}
</div>
<div class="col-md-6">
<p class="nkda-heading-primary-content">{{ .Params.headline.content | markdownify }}</p>
</div>
</p>
</div>
<div class="row">
{{ range .Params.headline.cards }}
</div>
<div class="row">
{{ with .Params.headline.cards }}
{{ range . }}
<div class="col-12 col-sm-6 col-lg-4 d-flex d-flex">
<!-- prettier-ignore -->
{{ partial "card.html" (dict "class" "herocards" "title" .title "content" .content) }}
</div>
{{ end }}
</div>
</section>
{{ else }}
{{ if .Params.card }}
<section class="container my-5">
<div class="row p-5">
<div class="col-md-6">
<h1 class="mb-4 nkda-heading-primary">{{ .Params.card.title | markdownify }}</h1>
</div>
<div class="col-md-6">
<p class="nkda-heading-primary-content">{{ .Params.card.content | markdownify }}</p>
</div>
{{ else }}
<div class="col-12 col-sm-6 col-lg-4 d-flex d-flex">
<!-- prettier-ignore -->
{{ partial "card.html" (dict "class" "herocards" "title" "Deep Technical Knowledge" "content" "Our team has extensive experience with agile within the context of many diferent team settings.") }}
</div>
</section>
{{ else }}
<section class="container my-5">
<div class="row p-5">
<div class="col-12">
<h1 class="mb-4 nkda-heading-primary">{{ .Title | markdownify }}</h1>
<h2 class="mb-4 nkda-heading-secondary">{{ .Params.author }} | {{ .Params.tags }} | {{ .Date.Format "2nd January 2006" }}</h2>
</div>
<div class="col-12 col-sm-6 col-lg-4 d-flex d-flex">
<!-- prettier-ignore -->
{{ partial "card.html" (dict "class" "herocards" "title" "Tailored Strategies" "content" "Whatever your needs we can provide a tailored experiance.") }}
</div>
<div class="col-12 col-sm-6 col-lg-4 d-flex d-flex">
<!-- prettier-ignore -->
{{ partial "card.html" (dict "class" "herocards" "title" "Comprehensive Support" "content" "We offer continuous support throughout the enguagement process, including post-enguagement assistance to ensure everything runs smoothly.") }}
</div>
</section>
{{ end }}
{{ end }}
{{ end }}
</div>
</section>
7 changes: 7 additions & 0 deletions site/layouts/partials/sections.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ $site := .Site }}
{{ if .Params.sections }}
{{ range $index, $section := .Params.sections }}
<!-- Title and Content (always shown) -->
<section class="container my-5">
Expand All @@ -21,3 +22,9 @@ <h2>{{ $section.title | markdownify }}</h2>
</div>
{{ end }}
</section>
{{ else}}
<section class="container my-5">
{{ .Content }}
</section>

{{ end }}

0 comments on commit 6dfdcbd

Please sign in to comment.