-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Partners) Introduce partners section
- Loading branch information
1 parent
a92eaa8
commit 5304530
Showing
6 changed files
with
212 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
menu: | ||
partners: | ||
- name: Getting Started | ||
url: /partners/ | ||
identifier: getting_started | ||
weight: 1 | ||
- name: Billing and Usage Reporting | ||
url: /partners/billing-and-usage-reporting/ | ||
identifier: billing-and-usage-reporting | ||
weight: 2 | ||
- name: Data Intake | ||
url: /partners/data-intake/ | ||
identifier: /data-intake | ||
weight: 3 | ||
- name: Delivering Value | ||
url: /partners/delivering-value | ||
identifier: delivering-value | ||
weight: 4 | ||
- name: Laying Groundwork | ||
url: /partners/laying-the-groundwork/ | ||
identifier: laying-the-groundwork | ||
weight: 5 | ||
- name: Sales Enablement | ||
url: /partners/sales-enablement/ | ||
identifier: sales-enablement | ||
weight: 6 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{{/* | ||
This navigation is used on the left of the site, and is the main Partners documentation nav. | ||
Looking for the header nav? see website-modules | ||
*/}} | ||
|
||
{{ $dot := . }} | ||
|
||
{{ $partnersMenu := "partners" }} | ||
|
||
<!-- if no partners menu in other languages fallback to english --> | ||
{{ with index .Site.Menus $partnersMenu }} | ||
{{ $dot.Scratch.Set "menu" . }} | ||
{{ else }} | ||
{{ $dot.Scratch.Set "menu" (index .Sites.First.Menus $partnersMenu) }} | ||
{{ end }} | ||
{{ $menu := .Scratch.Get "menu" }} | ||
|
||
{{ $currentPage := . }} | ||
|
||
<!-- set current english url. If url in menu doesn't start with /lang/ this lets us compare still --> | ||
{{ $currentEnURL := $currentPage.RelPermalink }} | ||
{{ if ne $currentPage.Lang "en" }} | ||
{{ $currentEnURL = (strings.Replace $currentPage.RelPermalink (printf "/%s" .Lang) "") }} | ||
{{ end }} | ||
|
||
|
||
{{/* | ||
build array ($engMenuChildren) of english menu items with parents from "partners.en.yaml". | ||
for use in providing english names for anchoring the nav-links (.nav-link) | ||
*/}} | ||
{{ if ne $currentPage.Lang "en" }} | ||
{{$engMenu := (index .Sites.First.Menus $partnersMenu) }} | ||
{{ range $engMenu }} | ||
{{ if and (.HasChildren) (ne $currentPage.CurrentSection.RelPermalink "/partners/") }} | ||
{{ range .Children }} | ||
{{ $dot.Scratch.SetInMap "engMenuChildren" .Identifier .Name }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
{{ end }} | ||
|
||
{{$engMenuChildren := $dot.Scratch.Get "engMenuChildren" | default dict}} | ||
|
||
<ul class="list-unstyled"> | ||
{{ range $menu }} | ||
<!-- check if on /partners/ top level section page, don't generate sub anchors if true --> | ||
{{ if and (.HasChildren) (ne $currentPage.CurrentSection.RelPermalink "/partners/" ) }} | ||
<li class="{{ if or ($currentPage.IsMenuCurrent $partnersMenu .) ($currentPage.HasMenuCurrent $partnersMenu .) (eq $currentEnURL .URL) }}active{{ end }}"> | ||
<a href="{{ (strings.TrimLeft "/" .URL) | absLangURL }}"> | ||
<span>{{ .Name }}</span> | ||
</a> | ||
<ul class="nav"> | ||
{{ range sort .Children ".Params.order" "asc" }} | ||
<li class="row nav-item {{ if $currentPage.IsMenuCurrent $partnersMenu . }}active{{ end }}"> | ||
{{$identifier := .Identifier}} | ||
{{/* | ||
lookup english equivalent of non-english menu item identifier attr. | ||
pull the name attr and plug into anchor href. | ||
*/}} | ||
{{ if ne $currentPage.Lang "en" }} | ||
{{ $dot.Scratch.Set "name" (index $engMenuChildren $identifier) }} | ||
{{ end }} | ||
|
||
{{$engName := $dot.Scratch.Get "name"}} | ||
<a class="col nav-link d-inline-block" href='{{ if hasPrefix .URL "#" }}#{{ default (.Name | anchorize) ($engName | anchorize) }}{{ else }}{{ (strings.TrimLeft "/" .URL) | absLangURL }}{{ end }}' data-bs-target="#{{.Identifier}}"> | ||
<span class="d-inline-block">{{ .Name }}</span> | ||
</a> | ||
</li> | ||
{{ end }} | ||
</ul> | ||
</li> | ||
{{ else }} | ||
<li class="{{ if or ($currentPage.IsMenuCurrent $partnersMenu .) ($currentPage.HasMenuCurrent $partnersMenu .) (eq $currentEnURL .URL) }}active{{ end }}"> | ||
<a href="{{ (strings.TrimLeft "/" .URL) | absLangURL }}"> | ||
<span>{{ .Name }}</span> | ||
</a> | ||
</li> | ||
{{ end }} | ||
{{ end }} | ||
</ul> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<aside class="sidenav sidenav-partners" id="navbar-example2"> | ||
<div class="row sticky"> | ||
<div class="col"> | ||
|
||
<a href="{{ "" | absLangURL }}"> | ||
<p class="h4">{{ i18n "datadog_docs" }} <span class="font-semibold">Partners</span></p> | ||
</a> | ||
|
||
{{ $ContentBaseName := "" }} | ||
{{ with .File }} | ||
{{ $ContentBaseName = .ContentBaseName }} | ||
{{ end }} | ||
|
||
{{ if ne $ContentBaseName "search" }} | ||
{{ partial "search.html" . }} | ||
{{ else }} | ||
<div id="async-searchbar-mount"></div> | ||
{{ end}} | ||
|
||
<div class="sidenav-nav"> | ||
{{ partial "nav/left-nav-partners.html" . }} | ||
</div> | ||
</div> | ||
</div> | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang='{{ if eq .Site.Language.Lang "en" }}en-US{{ else }}{{ .Site.Language.Lang }}{{ end }}' data-type="{{.Type}}" data-relpermalink="{{.RelPermalink}}" | ||
data-env="{{.Site.Params.environment}}" data-commit-ref="{{ .Site.Params.branch }}" style="opacity:0" | ||
class="{{ if or $.Site.Params.announcement_banner.link $.Site.Params.announcement_banner.desktop_message }}banner announcement{{ end }}"> | ||
|
||
<head> | ||
|
||
{{ partialCached "header-scripts.html" . }} | ||
|
||
<meta charset="utf-8"> | ||
{{ partial "prefetch.html" . }} | ||
{{ partial "preload.html" . }} | ||
<title>{{ .Title }}</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
{{ if .Params.external_redirect }} {{ partial "meta-http-equiv.html" . }} {{ end }} | ||
{{- partial "canonical.html" . -}} | ||
{{- partial "noindex.html" . -}} | ||
{{- partial "hreflang.html" . -}} | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<link rel="icon" type="image/png" href="https://docs.datadoghq.com/favicon.ico"> | ||
|
||
{{ partialCached "css.html" . }} | ||
|
||
{{- if ne $.Params.disable_opengraph_meta_tags true -}} | ||
{{- partial "meta.html" . -}} | ||
{{- end -}} | ||
</head> | ||
{{- $bodyClass := $.Scratch.Get "bodyClass" -}} | ||
|
||
<body | ||
data-bs-spy="scroll" data-bs-target="#navbar-example2" data-bs-offset="5" | ||
class="{{ .Site.Language.Lang }} {{ if .IsPage }} {{ replace $.Type "/" "-" }} {{ else }} {{ .Section }} {{ end }} {{ $bodyClass }} {{ if .Site.Params.announcement_banner }}announcement{{ end }}"> | ||
|
||
{{ partial "header/header.html" . }} | ||
|
||
<div class="container container__content"> | ||
<div class="row"> | ||
<div class="d-none d-lg-flex col-sm-3 side"> | ||
{{ partial "sidenav/partners-sidenav.html" . }} | ||
</div> | ||
<div class="col-12 col-lg-9 main-paer"> | ||
{{ partial "api/api-toolbar.html" . }} | ||
{{ block "partners-main" . }}{{ end }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{{ partial "footer/footer.html" . }} | ||
|
||
|
||
{{ partial "footer-scripts.html" . }} | ||
{{ partial "footer-js-dd-docs-methods" . }} | ||
{{ partial "preview_banner/preview_banner" . }} | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{ define "partners-main" }} | ||
<div class="row"> | ||
<div class="col-12 order-1"> | ||
<h1 id="pagetitle">{{ .Title }}</h1> | ||
</div> | ||
<div class="col-12"> | ||
{{ partial "breadcrumbs.html" . }} | ||
</div> | ||
</div> | ||
|
||
{{ partial "translate_status_banner/translate_status_banner.html" . }} | ||
{{ .Content }} | ||
{{ end }} |