You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bd...@apache.org on 2021/09/16 22:02:05 UTC

[shiro-site] 01/01: Moved footer out of page content container

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

bdemers pushed a commit to branch jbake-footer-fix
in repository https://gitbox.apache.org/repos/asf/shiro-site.git

commit a76c33368e14eacdd0306ddda70af9740d8254db
Author: Brian Demers <bd...@apache.org>
AuthorDate: Thu Sep 16 18:01:57 2021 -0400

    Moved footer out of page content container
    
    Lots of lint and small fixes:
    - menu was reusing IDs
    - iframe attributes
    - moved "menu" template into header.ftl
    - added comments on tags opened in header and closed in footer
---
 jbake/content/about.md          |  2 +-
 jbake/templates/footer.ftl      |  8 +++-----
 jbake/templates/header.ftl      |  8 +++++---
 jbake/templates/index.ftl       | 20 +++++++++++---------
 jbake/templates/lend_a_hand.ftl |  2 --
 jbake/templates/menu.ftl        | 24 +++++++++++-------------
 jbake/templates/page.ftl        |  4 +---
 jbake/templates/post.ftl        |  4 +---
 jbake/templates/tags.ftl        |  2 --
 9 files changed, 33 insertions(+), 41 deletions(-)

diff --git a/jbake/content/about.md b/jbake/content/about.md
index 1581475..d8fcd75 100644
--- a/jbake/content/about.md
+++ b/jbake/content/about.md
@@ -4,7 +4,7 @@ tags=documentation, about
 status=published
 ~~~~~~
 
-Apache Shiro is is a top level open source project under the [Apache Software Foundation](https://www.apache.org). 
+Apache Shiro is a top level open source project under the [Apache Software Foundation](https://www.apache.org). 
 As a project, Shiro is an application security framework that provides application developers very clean and simple ways of supporting four cornerstones of security in their applications: authentication, authorization, enterprise session management and cryptography.
 
 If you'd like to learn more about Shiro please visit the links below
diff --git a/jbake/templates/footer.ftl b/jbake/templates/footer.ftl
index 451679c..a2df7a0 100644
--- a/jbake/templates/footer.ftl
+++ b/jbake/templates/footer.ftl
@@ -1,6 +1,4 @@
-		</div>
-        <div id="push"></div>
-    </div>
+</div> <#-- end 'wrap' from header -->
 
     <div class="footer-padding"></div>
 
@@ -21,7 +19,7 @@
         </div>
 
         <div class="d-flex justify-content-end col-md-4" id="editThisPage">
-          <#if (content.file)??><input type="hidden" id="ghEditPage" value="${content.sourceuri}"></input></#if>
+          <#if (content.file)??><input type="hidden" id="ghEditPage" value="${content.sourceuri}"/></#if>
         </div>
 
         <div class="d-flex col-md-2 justify-content-end" style="position: relative">
@@ -38,7 +36,7 @@
     <script src="<#if (content.rootpath)??>${content.rootpath}<#else></#if>highlight.js-11.2.0/highlight.min.js"></script>
     <script src="<#if (content.rootpath)??>${content.rootpath}<#else></#if>js/shiro.js"></script>
 
-    <script type="text/javascript">
+    <script>
         docReady(
           addPageEditLink()
       );
diff --git a/jbake/templates/header.ftl b/jbake/templates/header.ftl
index c267ed4..3315a61 100644
--- a/jbake/templates/header.ftl
+++ b/jbake/templates/header.ftl
@@ -61,14 +61,16 @@
     <div id="top-bar"></div>
     <a class="github-fork-ribbon right-top" href="https://github.com/apache/shiro" title="Fork me on GitHub">Fork me on GitHub</a>
 
-    <div id="wrap">
+    <div id="wrap"><#-- closed in footer -->
 
       <div class="masthead">
         <p class="lead">
-          <a href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>index.html"><img src="<#if (content.rootpath)??>${content.rootpath}<#else></#if>img/apache-shiro-logo.png" style="height:100px; width:auto; vertical-align: bottom; margin-top: 20px;"></a>
+          <a href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>index.html"><img src="<#if (content.rootpath)??>${content.rootpath}<#else></#if>img/apache-shiro-logo.png" style="height:100px; width:auto; vertical-align: bottom; margin-top: 20px;" alt="Apache Shiro Logo"></a>
           <span class="tagline">Simple. Java. Security.</span>
           <a class="pull-right" href="https://www.apache.org/events/current-event.html">
-            <img style="padding-top: 8px" src="https://www.apache.org/events/current-event-125x125.png"/>
+            <img style="padding-top: 8px" src="https://www.apache.org/events/current-event-125x125.png" alt="Apache Software Foundation Event Banner"/>
           </a>
         </p>
       </div>
+
+<#include "menu.ftl">
\ No newline at end of file
diff --git a/jbake/templates/index.ftl b/jbake/templates/index.ftl
index fd1339d..b7453ca 100644
--- a/jbake/templates/index.ftl
+++ b/jbake/templates/index.ftl
@@ -1,7 +1,5 @@
 <#include "header.ftl">
 
-<#include "menu.ftl">
-
 <div class="row">
 
   <div class="col-md-9 col-md-pull-3">
@@ -26,8 +24,10 @@
 
       <div class="col-md-6 col-sm-6 col-padded-top col-center">
         <div style="width: 100%; max-width: 272px; display: inline-block; text-align: center; margin-left: 50px; padding-bottom: 15px;">
-          <iframe frameborder="0" scrolling="auto" width="310" height="233"
-                  src="https://www.youtube.com/embed/YJByiDvOhsc?rel=0" allowfullscreen="true"></iframe>
+          <iframe width="310" height="233"
+                  src="https://www.youtube.com/embed/YJByiDvOhsc?rel=0"
+                  allowfullscreen>
+          </iframe>
         </div>
       </div>
     </div>
@@ -119,7 +119,7 @@
         <#list posts as post>
         <#if (post.status == "published"  && post?index >= (currentPageNumber-1) * config.index_posts_per_page?eval && post?index < currentPageNumber * config.index_posts_per_page?eval)>
           <div>
-            <a href="${post.uri}"><small><h4>${post.title}</h4></small></a>
+            <a href="${post.uri}"><small>${post.title}</small></a>
             <p><small>by ${(post.author)!"The Apache Shiro Team"} on ${post.date?string("yyyy-MM-dd")}</small></p>
           </div>
         </#if>
@@ -157,11 +157,11 @@
             <p><small>Learn how Shiro securely verifies identities.</small></p>
           </div>
           <div>
-            <a href="java-authorization-guide.html">Java Authorization Guide</a></h3>
+            <h3><a href="java-authorization-guide.html">Java Authorization Guide</a></h3>
             <p>Learn how Shiro handles permissions, roles and users.</p>
           </div>
           <div>
-            <a href="webapp-tutorial.html">Web App Tutorial</a></h3>
+            <h3><a href="webapp-tutorial.html">Web App Tutorial</a></h3>
             <p>Step-by-step tutorial for securing a web application with Apache Shiro.</p>
           </div>
           <div>
@@ -171,9 +171,11 @@
         </div>
       </div>
     </div>
+    </div>
   </div>
-
-
 </div>
+<div id="push"></div>
+
 
+<!-- before footer -->
 <#include "footer.ftl">
diff --git a/jbake/templates/lend_a_hand.ftl b/jbake/templates/lend_a_hand.ftl
index 885e680..d7ae77f 100644
--- a/jbake/templates/lend_a_hand.ftl
+++ b/jbake/templates/lend_a_hand.ftl
@@ -1,7 +1,5 @@
 <#include "header.ftl">
 
-<#include "menu.ftl">
-
 <#if (content.title)??>
   <div class="page-header">
     <h1>${content.title}</h1>
diff --git a/jbake/templates/menu.ftl b/jbake/templates/menu.ftl
index 60e04a4..00a3ac0 100644
--- a/jbake/templates/menu.ftl
+++ b/jbake/templates/menu.ftl
@@ -1,5 +1,5 @@
 	<!-- Fixed navbar -->
-    <nav class="navbar navbar-expand-lg navbar-light bg-light" role="navigation">
+    <nav class="navbar navbar-expand-lg navbar-light bg-light">
       <div class="container-fluid">
         <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
           <span class="navbar-toggler-icon"></span>
@@ -15,10 +15,10 @@
             </li>
 
             <li class="nav-item dropdown">
-              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown-webapps" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                 Web Apps
               </a>
-              <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
+              <ul class="dropdown-menu" aria-labelledby="navbarDropdown-webapps">
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>web.html">General</a></li>
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>jaxrs.html">JAX-RS</a></li>
                 <li><hr class="dropdown-divider"></li>
@@ -30,10 +30,10 @@
 
             <!-- integrations -->
             <li class="nav-item dropdown">
-              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown-integrations" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                 Integrations
               </a>
-              <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
+              <ul class="dropdown-menu" aria-labelledby="navbarDropdown-integrations">
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>spring-boot.html">Spring</a></li>
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>guice.html">Guice</a></li>
                 <li><hr class="dropdown-divider"></li>
@@ -43,10 +43,10 @@
 
             <!-- Community -->
             <li class="nav-item dropdown">
-              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown-community" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                 Community
               </a>
-              <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
+              <ul class="dropdown-menu" aria-labelledby="navbarDropdown-community">
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>forums.html">Community Forums</a></li>
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>mailing-lists.html">Mailing Lists</a></li>
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>articles.html">Articles</a></li>
@@ -59,10 +59,10 @@
 
             <!-- About -->
             <li class="nav-item dropdown">
-              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown-about" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                 About
               </a>
-              <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
+              <ul class="dropdown-menu" aria-labelledby="navbarDropdown-about">
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>about.html">About</a></li>
                 <li><a class="dropdown-item" href="<#if (content.rootpath)??>${content.rootpath}<#else></#if>security-reports.html">Vulnerability Reports</a></li>
               </ul>
@@ -72,10 +72,10 @@
           <ul class="d-flex justify-content-end navbar-nav mb-2 mb-lg-0">
             <!-- The ASF -->
             <li class="nav-item dropdown">
-              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+              <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown-asf" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                 Apache Software Foundation
               </a>
-              <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
+              <ul class="dropdown-menu" aria-labelledby="navbarDropdown-asf">
                 <li><a class="dropdown-item" href="http://www.apache.org/">Apache Homepage</a></li>
                 <li><a class="dropdown-item" href="http://www.apache.org/licenses/">License</a></li>
                 <li><a class="dropdown-item" href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
@@ -93,5 +93,3 @@
         </div>
       </div>
     </nav>
-    <div class="container">
-
diff --git a/jbake/templates/page.ftl b/jbake/templates/page.ftl
index d5667ef..1a2bb10 100644
--- a/jbake/templates/page.ftl
+++ b/jbake/templates/page.ftl
@@ -1,7 +1,5 @@
 <#include "header.ftl">
 
-	<#include "menu.ftl">
-
 	<#if (content.title)??>
 	<div class="page-header">
 		<h1>${content.title}</h1>
@@ -10,7 +8,7 @@
 
 	<p><em>${content.date?string("dd MMMM yyyy")}</em></p>
 
-	<p><@content.body?interpret /></p>
+	<@content.body?interpret />
 
 	<hr />
 
diff --git a/jbake/templates/post.ftl b/jbake/templates/post.ftl
index 26747d2..107c41c 100644
--- a/jbake/templates/post.ftl
+++ b/jbake/templates/post.ftl
@@ -1,6 +1,4 @@
 <#include "header.ftl">
-	
-	<#include "menu.ftl">
 
 	<#if (content.title)??>
 	<div class="page-header">
@@ -10,7 +8,7 @@
 
 	<p><em>${content.date?string("dd MMMM yyyy")}</em></p>
 
-	<p>${content.body}</p>
+	${content.body}
 
 	<hr />
 	
diff --git a/jbake/templates/tags.ftl b/jbake/templates/tags.ftl
index efadf71..382213c 100644
--- a/jbake/templates/tags.ftl
+++ b/jbake/templates/tags.ftl
@@ -1,6 +1,4 @@
 <#include "header.ftl">
-
-	<#include "menu.ftl">
 	
 	<div class="page-header">
 		<h1>Tag: ${tag}</h1>