You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/05/10 17:04:03 UTC

[maven-fluido-skin] branch MSKINS-184 updated (fca2f26 -> 6d99e01)

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

michaelo pushed a change to branch MSKINS-184
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git


    omit fca2f26  [MSKINS-184] Don't link pages to themselves with empty hrefs
     add f73171b  [MSKINS-185] Don't fall back anymore if bannerLeft is not provided
     new 6d99e01  [MSKINS-184] Don't link pages to themselves with empty hrefs

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fca2f26)
            \
             N -- N -- N   refs/heads/MSKINS-184 (6d99e01)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/main/resources/META-INF/maven/site-macros.vm |  2 +-
 src/main/resources/META-INF/maven/site.vm        | 15 +--------------
 2 files changed, 2 insertions(+), 15 deletions(-)


[maven-fluido-skin] 01/01: [MSKINS-184] Don't link pages to themselves with empty hrefs

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MSKINS-184
in repository https://gitbox.apache.org/repos/asf/maven-fluido-skin.git

commit 6d99e01ee1d7ac94b3237c951c250ce22fc80cef
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat May 7 17:03:01 2022 +0200

    [MSKINS-184] Don't link pages to themselves with empty hrefs
    
    This closes #26
---
 src/it/sidebar/verify.groovy                     |  2 +-
 src/it/topbar/verify.groovy                      |  2 +-
 src/main/resources/META-INF/maven/site-macros.vm | 14 +++++++++-----
 src/main/resources/META-INF/maven/site.vm        |  2 +-
 src/main/resources/css/maven-theme.css           |  4 ++++
 5 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/it/sidebar/verify.groovy b/src/it/sidebar/verify.groovy
index eec3ebf..6d022e7 100644
--- a/src/it/sidebar/verify.groovy
+++ b/src/it/sidebar/verify.groovy
@@ -23,7 +23,7 @@ assert index.exists()
 // MSKINS-130 check that html structure is as clean as possible
 String html = index.getText()
 // active menu
-assert html.contains( '<li class="active"><a href="#"><span class="none"></span>About</a>' )
+assert html.contains( '<li class="active"><a><span class="none"></span>About</a>' )
 // inactive menu
 assert html.contains( '<li><a href="summary.html" title="Summary"><span class="none"></span>Summary</a>' )
 assert html.contains( '<li><a href="plugins.html" title="Plugins"><span class="none"></span>Plugins</a></li>' )
diff --git a/src/it/topbar/verify.groovy b/src/it/topbar/verify.groovy
index 68e808a..98248ac 100644
--- a/src/it/topbar/verify.groovy
+++ b/src/it/topbar/verify.groovy
@@ -23,7 +23,7 @@ assert index.exists()
 // MSKINS-130 check that html structure is as clean as possible
 String html = index.getText()
 // active menu
-assert html.contains( '<li><a href="index.html" title="About">About</a></li>' )
+assert html.contains( '<li><a title="About">About</a></li>' )
 // inactive menu
 assert html.contains( '<li><a href="summary.html" title="Summary">Summary</a></li>' )
 assert html.contains( '<li><a href="plugins.html" title="Plugins">Plugins</a></li>' )
diff --git a/src/main/resources/META-INF/maven/site-macros.vm b/src/main/resources/META-INF/maven/site-macros.vm
index dea3975..b4085b1 100644
--- a/src/main/resources/META-INF/maven/site-macros.vm
+++ b/src/main/resources/META-INF/maven/site-macros.vm
@@ -19,7 +19,7 @@
 #**##foreach( $menu in $menus )
 #**##if ( $menu.name )
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">$menu.name <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">$menu.name <b class="caret"></b></a>
         <ul class="dropdown-menu">
 #*    *##foreach( $item in $menu.items )
 #*      *##if ($item.items.size() > 0)
@@ -55,7 +55,11 @@
 #**##else
 #*  *##set ( $linkTarget = "" )
 #**##end
-#**#<a href="$href"$linkTarget title="$name">$name</a>##
+#**##if ( $alignedFileName == $href )
+#*  *#<a title="$name">$name</a>##
+#**##else
+#*  *#<a href="$href"$linkTarget title="$name">$name</a>##
+#**##end
 #end
 ##
 #macro ( topLinks $links )
@@ -281,20 +285,20 @@ $indent    <li>##
 #**##if ( $item.img )
 #*  *##if ( $item.position == "left" )
 #*    *##if ( $alignedFileName == $currentItemHref )
-#*      *#<a href="#">#image($item.img $item.alt $item.border $item.width $item.height) $item.name</a>##
+#*      *#<a>#image($item.img $item.alt $item.border $item.width $item.height) $item.name</a>##
 #*    *##else
 #*      *##link($currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false)
 #*    *##end
 #*  *##else
 #*    *##if ( $alignedFileName == $currentItemHref )
-#*      *#<a href="#">$item.name #image($item.img $item.alt $item.border $item.width $item.height)</a>##
+#*      *#<a>$item.name #image($item.img $item.alt $item.border $item.width $item.height)</a>##
 #*    *##else
 #*      *##link($currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height false)
 #*    *##end
 #*  *##end
 #**##else
 #*  *##if ( $alignedFileName == $currentItemHref )
-#*    *#<a href="#"><span class="$collapseClass"></span>$item.name</a>##
+#*    *#<a><span class="$collapseClass"></span>$item.name</a>##
 #*  *##else
 #*    *##link( $currentItemHref $item.name $item.target $item.img $item.position $item.alt $item.border $item.width $item.height $collapseClass)
 #*  *##end
diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm
index 53d4e23..3c800b5 100644
--- a/src/main/resources/META-INF/maven/site.vm
+++ b/src/main/resources/META-INF/maven/site.vm
@@ -160,7 +160,7 @@
               && $decoration.body.links.size() > 0 )
             <ul class="nav pull-right">
               <li class="dropdown">
-                <a href="#" class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a>
+                <a class="dropdown-toggle" data-toggle="dropdown">External Links <b class="caret"></b></a>
                 <ul class="dropdown-menu">
 #*            *##topLinks( $decoration.body.links )
                 </ul>
diff --git a/src/main/resources/css/maven-theme.css b/src/main/resources/css/maven-theme.css
index 7a3120a..8538489 100644
--- a/src/main/resources/css/maven-theme.css
+++ b/src/main/resources/css/maven-theme.css
@@ -143,3 +143,7 @@ li.pull-right {
 input.search-query {
   padding-right: 0px;
 }
+
+a.dropdown-toggle {
+  cursor: pointer;
+}