Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
.hextra-footer:is(html[class~="dark"] *) {
background-color: transparent;
}

.hextra-tabs-panel {
padding-top: 0;
}
130 changes: 72 additions & 58 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,66 +19,80 @@ layout: index
{{< netduma/hero-button text="View Docs" link="docs" >}}
</div>

<div class="hx-mt-6">
{{< hextra/feature-grid class="hx-mt-8">}}
{{< netduma/feature-card
link="/docs/dumaos-4/"
title="DumaOS 4"
subtitle="The latest version of DumaOS, featuring groundbreaking new features like SmartBOOST and Geo-Filter 2.0."
class="dark:hover:hx-bg-neutral-900"
image="/images/dumaos_4_logo.png"
imageClass="max-w-full"
style="background: radial-gradient(ellipse at 50% 80%,rgba(255,70,78,0.15),hsla(0,0%,100%,0));"
>}}
{{< netduma/feature-card
link="/docs/dumaos-3/"
title="DumaOS 3.0"
subtitle="The version of DumaOS which shipped with the Netduma R2 and Nighthawk Pro Gaming routers."
class="dark:hover:hx-bg-neutral-900"
image="/images/dumaos_3_logo.png"
imageClass="max-w-full"
style="background: radial-gradient(ellipse at 50% 80%,rgba(255,70,78,0.15),hsla(0,0%,100%,0));"
>}}
{{< netduma/feature-card
link="/docs/telstra-game-optimiser/"
title="Telstra"
subtitle="Telstra Internet Optimiser brings the power of DumaOS to your Telstra Smart Modem."
class="dark:hover:hx-bg-neutral-900"
image="/images/telstra_logo.png"
imageClass="max-w-full"
style="background: radial-gradient(ellipse at 50% 80%,rgba(89,112,255,0.15),hsla(0,0%,100%,0));"
<div class="flex flex-col md:flex-row gap-6">
<div class="flex flex-col">
<div class="hx-mt-6">
{{< hextra/feature-grid class="hx-mt-8">}}
{{< netduma/feature-card
link="/docs/dumaos-4/"
title="DumaOS 4"
subtitle="The latest version of DumaOS, featuring groundbreaking new features like SmartBOOST and Geo-Filter 2.0."
class="dark:hover:hx-bg-neutral-900"
image="/images/dumaos_4_logo.png"
imageClass="max-w-full"
style="background: radial-gradient(ellipse at 50% 80%,rgba(255,70,78,0.15),hsla(0,0%,100%,0));"
>}}
{{< netduma/feature-card
link="/docs/dumaos-3/"
title="DumaOS 3.0"
subtitle="The version of DumaOS which shipped with the Netduma R2 and Nighthawk Pro Gaming routers."
class="dark:hover:hx-bg-neutral-900"
image="/images/dumaos_3_logo.png"
imageClass="max-w-full"
style="background: radial-gradient(ellipse at 50% 80%,rgba(255,70,78,0.15),hsla(0,0%,100%,0));"
>}}
{{< netduma/feature-card
link="/docs/telstra-game-optimiser/"
title="Telstra"
subtitle="Telstra Internet Optimiser brings the power of DumaOS to your Telstra Smart Modem."
class="dark:hover:hx-bg-neutral-900"
image="/images/telstra_logo.png"
imageClass="max-w-full"
style="background: radial-gradient(ellipse at 50% 80%,rgba(89,112,255,0.15),hsla(0,0%,100%,0));"

>}}
{{< /hextra/feature-grid >}}
</div>
>}}
{{< /hextra/feature-grid >}}
</div>

<div class="hx-mt-4">
{{< hextra/feature-grid cols="3">}}
{{< netduma/feature-card
link="/frequently-asked-questions"
title="FAQ"
subtitle="Frequently asked questions about Netduma and DumaOS."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}}
{{< netduma/feature-card
link="/firmwares/"
title="Firmwares"
subtitle="Download the latest updates for DumaOS."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}}
{{< netduma/feature-card
link="/docs/user-manuals/"
title="User Manuals"
subtitle="User manuals that are provided with DumaOS compatible hardware."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}}
<!-- {{< netduma/feature-card
link="/"
title="Nighthawk Pro Gaming"
subtitle="Info and guides for Netgear's Nighthawk Pro Gaming routers with DumaOS."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}} -->
{{< /hextra/feature-grid >}}
</div>
</div>

<div class="hx-mt-4">
{{< hextra/feature-grid cols="3">}}
{{< netduma/feature-card
link="/frequently-asked-questions"
title="FAQ"
subtitle="Frequently asked questions about Netduma and DumaOS."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}}
{{< netduma/feature-card
link="/firmwares/"
title="Firmwares"
subtitle="Download the latest updates for DumaOS."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}}
{{< netduma/feature-card
link="/docs/user-manuals/"
title="User Manuals"
subtitle="User manuals that are provided with DumaOS compatible hardware."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}}
<!-- {{< netduma/feature-card
link="/"
title="Nighthawk Pro Gaming"
subtitle="Info and guides for Netgear's Nighthawk Pro Gaming routers with DumaOS."
class="dark:hx-bg-neutral-900 dark:hover:hx-bg-neutral-800"
>}} -->
{{< /hextra/feature-grid >}}
<!-- <div>
{{< tabs items="RECENT" >}}
{{< tab >}}
<div class="pt-1">
{{< netduma/recents-list>}}
</div>
{{< /tab >}}
{{< /tabs >}}
</div> -->
</div>

## Further Support
Expand Down
93 changes: 93 additions & 0 deletions layouts/shortcodes/netduma/recents-list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{{/* FlexSearch Index Data */}}
{{- $indexType := site.Params.search.flexsearch.index | default "content" -}}

{{- if not (in (slice "content" "summary" "heading" "title" ) $indexType) -}}
{{- errorf "unknown flexsearch index type: %s" $indexType -}}
{{- end -}}

{{- $pages := where .Site.Pages "Kind" "in" (slice "page" "section") -}}
{{- $pages = where $pages "Params.excludeSearch" "!=" true -}}
{{- $pages = where $pages "Content" "!=" "" -}}

{{- $pageData := dict -}}

{{- range $index, $page := $pages -}}
{{- $pageTitle := $page.LinkTitle | default $page.File.BaseFileName -}}
{{- $pageLink := $page.RelPermalink -}}
{{- $updated := $page.Lastmod -}}
{{- $pageData = $pageData | merge (dict $pageLink (dict "link" $pageLink "title" $pageTitle "updated" $updated)) -}}
{{- end -}}

<!-- Iterate through all pages to find actual subpages that have updated time -->
{{- $output := dict -}}
{{- range $index, $item := $pageData -}}
{{- if not $item.updated -}}
{{- continue -}}
{{- end -}}

{{- $urlParts := split $item.link "/" -}}
{{- $parts := slice -}}
{{- range $index, $part := $urlParts -}}
{{- if eq $part "" -}}
{{- continue -}}
{{- end -}}

<!-- continue if part starts with # -->
{{- if strings.HasPrefix $part "#" -}}
{{- continue -}}
{{- end -}}

{{- $parts = $parts | append $part -}}
{{- end -}}
{{- $urlParts = $parts -}}

<!-- if urlParts has less then 2 elements, just continue -->
{{- if lt (len $urlParts) 2 -}}
{{- continue -}}
{{- end -}}

{{- $parentLink := "" -}}
{{- range $index, $part := first (sub (len $urlParts) 1) $urlParts -}}
{{- $parentLink = (printf "%s/%s" $parentLink $part) -}}
{{- end -}}

<!-- if missing, add trailing / to parentLink -->
{{- if not (strings.HasSuffix $parentLink "/") -}}
{{- $parentLink = (printf "%s/" $parentLink) -}}
{{- end -}}

<!-- if parentLink is "/", remove item from output -->
{{- if eq $parentLink "/" -}}
{{- continue -}}
{{- end -}}

<!-- Get the parent item from the output -->
{{- $parentItem := index $pageData $parentLink -}}

{{- if not $parentItem -}}
<!-- if parentItem is missing, do not add item -->
{{- continue -}}
{{- end -}}

{{- if $parentItem -}}
<!-- Add parentItems's title to the $item as "parentTitle" property -->
{{- $output = $output | merge (dict $item.link (dict "link" $item.link "title" $item.title "updated" $item.updated "parentTitle" $parentItem.title)) -}}
{{- end -}}

{{- end -}}

{{- $output := sort $output "updated" "desc" -}}

<div class="flex flex-col">
{{- range $index, $item := first 5 $output -}}
{{- if $item.updated -}}
<a
href="{{- $item.link -}}"
class="flex gap-1 flex-col hx-px-2 py-2 text-black dark:text-white no-underline rounded-md hx-transition-colors hover:hx-bg-gray-100 hover:hx-text-gray-900 dark:hover:hx-bg-primary-100/5 dark:hover:hx-text-gray-50"
>
<span class="font-bold">{{- $item.title -}}</span>
<span class="text-xs text-black/70 dark:text-white/70">{{- $item.parentTitle -}}</span>
</a>
{{- end -}}
{{- end -}}
</div>
Loading