Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to most recent version of docsy #426

Merged
merged 1 commit into from Jul 28, 2021
Merged

Update to most recent version of docsy #426

merged 1 commit into from Jul 28, 2021

Conversation

dholbach
Copy link
Member

This lets us further minimise our set of modifications over docsy.

❯ for i in layouts/partials/; do diff -u {~/dev/docsy/,}"$i"; done
Only in layouts/partials/: asciinema-head.html
Only in /home/daniel/dev/docsy/layouts/partials/: breadcrumb.html
Only in /home/daniel/dev/docsy/layouts/partials/: community_links.html
Only in /home/daniel/dev/docsy/layouts/partials/: disqus-comment.html
Only in layouts/partials/: docs
diff -u /home/daniel/dev/docsy/layouts/partials/favicons.html layouts/partials/favicons.html
--- /home/daniel/dev/docsy/layouts/partials/favicons.html	2021-05-26 11:07:10.144510288 +0200
+++ layouts/partials/favicons.html	2021-05-11 17:04:52.914279456 +0200
@@ -1,12 +1,10 @@
-
-<!-- Favicons as generated by http://cthedot.de/icongen -->
-<link rel="shortcut icon" href="{{ "favicons/favicon.ico" | relURL }}" >
-<link rel="apple-touch-icon" href="{{ "favicons/apple-touch-icon-180x180.png" | relURL }}" sizes="180x180">
-<link rel="icon" type="image/png" href="{{ "favicons/favicon-16x16.png" | relURL }}" sizes="16x16">
-<link rel="icon" type="image/png" href="{{ "favicons/favicon-32x32.png" | relURL }}" sizes="32x32">
-<link rel="icon" type="image/png" href="{{ "favicons/android-36x36.png" | relURL }}" sizes="36x36">
-<link rel="icon" type="image/png" href="{{ "favicons/android-48x48.png" | relURL }}" sizes="48x48">
-<link rel="icon" type="image/png" href="{{ "favicons/android-72x72.png" | relURL }}" sizes="72x72">
-<link rel="icon" type="image/png" href="{{ "favicons/android-96x96.png" | relURL }}" sizes="96x96">
-<link rel="icon" type="image/png" href="{{ "favicons/android-144x144.png" | relURL }}" sizes="144x144">
-<link rel="icon" type="image/png" href="{{ "favicons/android-192x192.png" | relURL }}" sizes="192x192">
+<link rel="shortcut icon" href="{{ "/favicon.png" | relURL }}" >
+<link rel="apple-touch-icon" href="{{ "/favicon.png"  | relURL }}" sizes="180x180">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="16x16">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="32x32">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="36x36">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="48x48">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="72x72">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="96x96">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="144x144">
+<link rel="icon" type="image/png" href="{{ "/favicon.png" | relURL }}" sizes="192x192">
Only in /home/daniel/dev/docsy/layouts/partials/: featured-image.html
Only in /home/daniel/dev/docsy/layouts/partials/: feedback.html
Only in /home/daniel/dev/docsy/layouts/partials/: footer.html
Only in /home/daniel/dev/docsy/layouts/partials/: head-css.html
Only in /home/daniel/dev/docsy/layouts/partials/: head.html
Common subdirectories: /home/daniel/dev/docsy/layouts/partials/hooks and layouts/partials/hooks
diff -u /home/daniel/dev/docsy/layouts/partials/navbar.html layouts/partials/navbar.html
--- /home/daniel/dev/docsy/layouts/partials/navbar.html	2021-07-21 17:43:12.301904947 +0200
+++ layouts/partials/navbar.html	2021-07-27 16:24:40.232713924 +0200
@@ -3,7 +3,6 @@
         <a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
 		<span class="navbar-logo">{{ if .Site.Params.ui.navbar_logo }}{{ with resources.Get "icons/logo.svg" }}{{ ( . | minify).Content | safeHTML }}{{ end }}{{ end }}</span><span class="text-uppercase font-weight-bold">{{ .Site.Title }}</span>
 	</a>
-	<div class="td-navbar-nav-scroll ml-md-auto" id="main_navbar">
 		<ul class="navbar-nav mt-2 mt-lg-0">
 			{{ $p := . }}
 			{{ range .Site.Menus.main }}
@@ -16,7 +15,21 @@
 				{{ $post := .Post }}
 				{{ $url := urls.Parse .URL }}
 				{{ $baseurl := urls.Parse $.Site.Params.Baseurl }}
+				{{ if .HasChildren }}
+				<li class="nav-item dropdown">
+					<a class="nav-link {{if $active }} active{{end}} dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+						{{ .Name }}
+					</a>
+					<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
+					{{ range .Children  }}
+						{{ $childrenurl := urls.Parse .URL }}
+						<a class="dropdown-item" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $childrenurl.Host $baseurl.Host }}target="_blank" {{ end }}>{{ .Name }}</a>
+					{{ end }}
+					</div>
+				</li>
+				{{ else }}
 				<a class="nav-link{{if $active }} active{{end}}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ .URL | relLangURL }}{{ end }}" {{ if ne $url.Host $baseurl.Host }}target="_blank" {{ end }}>{{ with .Pre}}{{ $pre }}{{ end }}<span{{if $active }} class="active"{{end}}>{{ .Name }}</span>{{ with .Post}}{{ $post }}{{ end }}</a>
+				{{ end }}
 			</li>
 			{{ end }}
 			{{ if  .Site.Params.versions }}
@@ -29,7 +42,6 @@
 				{{ partial "navbar-lang-selector.html" . }}
 			</li>
 			{{ end }}
+			<li class="nav-item nav-search-item">{{ partial "search-input.html" . }}</li>
 		</ul>
-	</div>
-	<div class="navbar-nav d-none d-lg-block">{{ partial "search-input.html" . }}</div>
 </nav>
Only in /home/daniel/dev/docsy/layouts/partials/: navbar-lang-selector.html
Only in /home/daniel/dev/docsy/layouts/partials/: navbar-version-selector.html
Only in /home/daniel/dev/docsy/layouts/partials/: outputformat.html
Only in /home/daniel/dev/docsy/layouts/partials/: page-meta-lastmod.html
diff -u /home/daniel/dev/docsy/layouts/partials/page-meta-links.html layouts/partials/page-meta-links.html
--- /home/daniel/dev/docsy/layouts/partials/page-meta-links.html	2021-06-29 15:32:22.248559780 +0200
+++ layouts/partials/page-meta-links.html	2021-07-16 10:53:31.127704747 +0200
@@ -5,6 +5,7 @@
   {{ $gh_subdir := ($.Param "github_subdir") }}
   {{ $gh_project_repo := ($.Param "github_project_repo") }}
   {{ $gh_branch := (default "master" ($.Param "github_branch")) }}
+  {{ $importedDoc := $.Param "importedDoc" | default "false" }}
   <div class="td-page-meta ml-2 pb-1 pt-2 mb-0">
   {{ if $gh_url }}
      <a href="{{ $gh_url }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>     
@@ -24,11 +25,13 @@
     {{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL }}
     {{ $newPageURL := printf "%s/new/%s?%s"  $gh_repo $gh_repo_path $newPageQS }}
 
+    {{ if eq $importedDoc "false" }}
     <a href="{{ $editURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
     <a href="{{ $newPageURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_create_child_page" }}</a>
+    {{ end }}
     <a href="{{ $issuesURL }}" target="_blank"><i class="fab fa-github fa-fw"></i> {{ T "post_create_issue" }}</a>
     {{ if $gh_project_repo }}
-      {{ $project_issueURL := printf "%s/issues/new" $gh_project_repo }}
+      {{ $project_issueURL := printf "%s/issues/new/choose" $gh_project_repo }}
       <a href="{{ $project_issueURL }}" target="_blank"><i class="fas fa-tasks fa-fw"></i> {{ T "post_create_project_issue" }}</a>
     {{ end }}
 
Only in /home/daniel/dev/docsy/layouts/partials/: pager.html
Only in /home/daniel/dev/docsy/layouts/partials/: print
Only in /home/daniel/dev/docsy/layouts/partials/: reading-time.html
Only in /home/daniel/dev/docsy/layouts/partials/: scripts.html
Only in /home/daniel/dev/docsy/layouts/partials/: search-input.html
Only in /home/daniel/dev/docsy/layouts/partials/: section-index.html
Only in /home/daniel/dev/docsy/layouts/partials/: sidebar.html
Only in /home/daniel/dev/docsy/layouts/partials/: sidebar-tree.html
Only in /home/daniel/dev/docsy/layouts/partials/: taxonomy_terms_article.html
Only in /home/daniel/dev/docsy/layouts/partials/: taxonomy_terms_cloud.html
Only in /home/daniel/dev/docsy/layouts/partials/: taxonomy_terms_clouds.html
Only in /home/daniel/dev/docsy/layouts/partials/: toc.html
Only in /home/daniel/dev/docsy/layouts/partials/: version-banner.html

	This lets us further minimise our set of modifications
	over docsy.

Signed-off-by: Daniel Holbach <daniel@weave.works>
@dholbach dholbach merged commit b14303d into fluxcd:main Jul 28, 2021
@dholbach dholbach deleted the update-docsy branch July 28, 2021 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants