You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2022/09/23 07:03:03 UTC

[avro] branch master updated: AVRO-3624: Add apache links (#1870)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new eb2b19d0e AVRO-3624: Add apache links (#1870)
eb2b19d0e is described below

commit eb2b19d0e034dc1157dbcca5a26440c04180c704
Author: clesaec <51...@users.noreply.github.com>
AuthorDate: Fri Sep 23 09:02:58 2022 +0200

    AVRO-3624: Add apache links (#1870)
    
    * AVRO-3624: Add apache links
    
    * AVRO-3624: Add apache links
    
    Move "ASF links" to the right and render it as a dropdown menu
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
    Co-authored-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 doc/config.toml                            | 27 +++++++++++++++++++++++++++
 doc/layouts/partials/footer.html           | 11 +++++++----
 doc/layouts/partials/navbar-asf-links.html | 29 +++++++++++++++++++++++++++++
 doc/layouts/partials/navbar.html           |  4 ++++
 4 files changed, 67 insertions(+), 4 deletions(-)

diff --git a/doc/config.toml b/doc/config.toml
index 515e6e3e5..dac3f8050 100644
--- a/doc/config.toml
+++ b/doc/config.toml
@@ -114,7 +114,11 @@ section = ["HTML", "print", "RSS"]
 [params]
 avroversion = "++version++"
 copyright = "The Apache Software Foundation"
+apache_foundation = "https://www.apache.org/"
+apache_events_logo = "https://www.apache.org/events/current-event-234x60.png"
+apache_events_url = "https://www.apache.org/events/current-event.html"
 privacy_policy = "http://www.apache.org/foundation/policies/privacy.html"
+license = "http://www.apache.org/licenses/"
 
 # First one is picked as the Twitter card image if not set on page.
 # images = ["images/project-illustration.png"]
@@ -195,6 +199,29 @@ no = 'Sorry to hear that. Please <a href="https://github.com/USERNAME/REPOSITORY
 [params.ui.readingtime]
 enable = true
 
+[params.asf]
+[[params.asf.links]]
+name = "ASF Web Site"
+url = "http://www.apache.org/"
+
+[[params.asf.links]]
+name = "License"
+url = "http://www.apache.org/licenses/"
+
+[[params.asf.links]]
+name = "Donate"
+url = "http://www.apache.org/foundation/sponsorship.html"
+
+
+[[params.asf.links]]
+name = "Thanks"
+url = "http://www.apache.org/foundation/thanks.html"
+
+[[params.asf.links]]
+name = "Security"
+url = "http://www.apache.org/security/"
+
+
 [params.links]
 # End user relevant links. These will show up on left side of footer and in the community page if you have one.
 [[params.links.user]]
diff --git a/doc/layouts/partials/footer.html b/doc/layouts/partials/footer.html
index 0ed32d56d..0638c0074 100644
--- a/doc/layouts/partials/footer.html
+++ b/doc/layouts/partials/footer.html
@@ -23,27 +23,30 @@
 <footer class="bg-dark py-5 row d-print-none">
   <div class="container-fluid mx-sm-5">
     <div class="row">
-      <div class="col-6 col-sm-4 text-xs-center order-sm-2">
+      <div class="col-4 col-sm-3 text-xs-center order-sm-2">
         {{ with $links }}
         {{ with index . "user"}}
         {{ template "footer-links-block"  . }}
         {{ end }}
         {{ end }}
       </div>
-      <div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
+      <div class="col-4 col-sm-3 text-right text-xs-center order-sm-3">
         {{ with $links }}
         {{ with index . "developer"}}
         {{ template "footer-links-block"  . }}
         {{ end }}
         {{ end }}
       </div>
-      <div class="col-12 col-sm-4 text-center py-2 order-sm-2">
-        {{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small>{{ end }}
+      <div class="col-10 col-sm-3 text-center py-2 order-sm-2">
+        {{ with .Site.Params }}<a href="{{ .apache_foundation }}"><small class="text-white">&copy; {{ now.Year}} {{ .copyright }} </small></a><small class="text-white">{{ T "footer_all_rights_reserved" }}</small>{{ end }}
 	{{ if not .Site.Params.ui.footer_about_disable }}
 		{{ with .Site.GetPage "about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
 	{{ end }}
       <p><small class="text-white">Apache Avro, Avro&trade;, Apache&reg;, and the Apache feather logo are either registered trademarks or trademarks of The Apache Software Foundation.</small></p>
       </div>
+      <div class="col-5 col-sm-3 order-sm-2">
+          {{ with .Site.Params }}<a href="{{ .apache_events_url }}"><img src="{{ .apache_events_logo }}"></a>{{ end }}
+      </div>
     </div>
   </div>
 </footer>
diff --git a/doc/layouts/partials/navbar-asf-links.html b/doc/layouts/partials/navbar-asf-links.html
new file mode 100644
index 000000000..54e3b8dcf
--- /dev/null
+++ b/doc/layouts/partials/navbar-asf-links.html
@@ -0,0 +1,29 @@
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   https://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+
+<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+	ASF links
+</a>
+<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
+	{{ range .Site.Params.asf.links }}
+	<a class="dropdown-item" href="{{ .url }}" target="_blank">{{ .name }}</a>
+	{{ end }}
+</div>
diff --git a/doc/layouts/partials/navbar.html b/doc/layouts/partials/navbar.html
index fc7fb4f63..98c7bf94f 100644
--- a/doc/layouts/partials/navbar.html
+++ b/doc/layouts/partials/navbar.html
@@ -27,6 +27,7 @@
 */}}
 		<span class="navbar-logo"><img src="/docs/++version++/logo.svg" width="100" height="30" style="margin: 0 10px"></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 := . }}
@@ -46,6 +47,9 @@
 			<li class="nav-item dropdown mr-4 d-none d-lg-block">
 				{{ partial "navbar-docs-selector.html" . }}
 			</li>
+			<li class="nav-item dropdown mr-4 d-none d-lg-block">
+				{{ partial "navbar-asf-links.html" . }}
+			</li>
 			{{ if  (gt (len .Site.Home.Translations) 0) }}
 			<li class="nav-item dropdown mr-4 d-none d-lg-block">
 				{{ partial "navbar-lang-selector.html" . }}