Skip to content

Commit

Permalink
[MSKINS-237] Rework skin for new site model
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Oct 3, 2023
1 parent 85fa18c commit 4bc31ac
Show file tree
Hide file tree
Showing 10 changed files with 415 additions and 585 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ under the License.
<properties>
<bootstrap.version>2.3.2</bootstrap.version>
<jquery.version>1.11.2</jquery.version>
<sitePluginVersion>4.0.0-M9</sitePluginVersion>
<sitePluginVersion>4.0.0-M10</sitePluginVersion>
<projectInfoReportsPluginVersion>3.4.5</projectInfoReportsPluginVersion>
<project.build.outputTimestamp>2023-07-09T19:58:37Z</project.build.outputTimestamp>
<anchorjs.version>4.3.1</anchorjs.version>
Expand Down
2 changes: 1 addition & 1 deletion src/it/mskins-107/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
File index = new File( basedir, "target/site/index.html" )

assert index.exists()
assert index.text.contains("<meta name=\"generator\" content=\"Apache Maven Doxia Site Renderer 2.0.0-M11\" />")
assert index.text.contains("<meta name=\"generator\" content=\"Apache Maven Doxia Site Renderer 2.0.0-M12-SNAPSHOT\" />")
114 changes: 58 additions & 56 deletions src/it/mskins-28/src/site/site.xml
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
/*
* 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
*
* http://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.
*/
-->

<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="${skinName}">

<skin>
<groupId>${skinGroupId}</groupId>
<artifactId>${skinArtifactId}</artifactId>
<version>${skinVersion}</version>
</skin>

<body>
<breadcrumbs>
<item name="Apache Maven Fluido Skin" href="https://maven.apache.org/skins/maven-fluido-skin/index.html" />
<item name="Maven Fluido Skin ITs" href="https://maven.apache.org/skins/maven-fluido-skin/ITs.html" />
</breadcrumbs>
<menu name="Overview">
<item name="Introduction" href="index.html"/>
</menu>
</body>

<!-- START SNIPPET: skin-custom-config -->
<poweredBy>
<logo name="First Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<!-- Second logo is wider than the sidebar -->
<logo name="Second Logo" width="500px" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<!-- Third and forth logo fit next to eachother in the sidebar -->
<logo name="Third Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<logo name="Fourth Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<logo name="Fifth Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
</poweredBy>
<!-- END SNIPPET: skin-custom-config -->

</project>
<?xml version="1.0" encoding="UTF-8"?>

<!--
/*
* 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
*
* http://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.
*/
-->

<project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 http://maven.apache.org/xsd/decoration-1.1.0.xsd"
name="${skinName}">

<skin>
<groupId>${skinGroupId}</groupId>
<artifactId>${skinArtifactId}</artifactId>
<version>${skinVersion}</version>
</skin>

<body>
<breadcrumbs>
<item name="Apache Maven Fluido Skin" href="https://maven.apache.org/skins/maven-fluido-skin/index.html" />
<item name="Maven Fluido Skin ITs" href="https://maven.apache.org/skins/maven-fluido-skin/ITs.html" />
</breadcrumbs>
<menu name="Overview">
<item name="Introduction" href="index.html"/>
</menu>
</body>

<!-- START SNIPPET: skin-custom-config -->
<poweredBy>
<logo name="First Logo" alt="First Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<!-- Second logo is wider than the sidebar -->
<logo name="Second Logo" alt="Second Logo" width="500px" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<!-- Third and forth logo fit next to eachother in the sidebar -->
<logo name="Third Logo" alt="Third Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<logo name="Fourth Logo" alt="Fourth Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<logo name="Fifth Logo" alt="Fifth Logo" img="./images/logos/maven-feather.png" href="http://maven.apache.org/"/>
<logo name="Sixth Logo" alt="Sixth Logo" img="./images/logos/maven-feather.png"/>
<logo name="Seventh Logo"/>
</poweredBy>
<!-- END SNIPPET: skin-custom-config -->

</project>
7 changes: 3 additions & 4 deletions src/it/mskins-76/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ File index = new File( basedir, "target/site/index.html" )
assert index.exists()
String text = index.text.normalize()
assert text.contains( '''\
<script>
/* <![CDATA[ */
<script>
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.async = true;
s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */</script>'''.normalize() )
</script>'''.normalize() )

assert text.contains( '''\
<a class="FlattrButton" style="display:none;" href="http://opensource.org/"></a>
<noscript><a href="https://flattr.com/thing/448050/Open-Source-Initiative-OSI" target="_blank">
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.normalize() )
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" style="border: 0;" /></a></noscript>'''.normalize() )
7 changes: 3 additions & 4 deletions src/it/mskins-76_topbar/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ File index = new File( basedir, "target/site/index.html" )
assert index.exists()
String text = index.text.normalize()
assert text.contains( '''\
<script>
/* <![CDATA[ */
<script>
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.async = true;
s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */</script>'''.normalize() )
</script>'''.normalize() )

assert text.contains( '''\
<a class="FlattrButton" style="display:none;" rev="flattr;button:compact;" href="http://opensource.org/"></a>
<noscript><a href="https://flattr.com/thing/448050/Open-Source-Initiative-OSI" target="_blank">
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" style="border: 0;" /></a></noscript>'''.normalize() )
<img src="https://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" style="border: 0;" /></a></noscript>'''.normalize() )
8 changes: 4 additions & 4 deletions src/it/sidebar/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ assert index.exists()
// MSKINS-130 check that html structure is as clean as possible
String html = index.text
// active menu
assert html.contains( '<li class="active"><a><span class="none"></span>About</a>' )
assert html.contains( '<li class="active"><a>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>' )
assert html.contains( '<li><a href="summary.html">Summary</a>' )
assert html.contains( '<li><a href="plugins.html">Plugins</a></li>' )
// breadcrumb
assert html.contains( '<li><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>' )
assert html.contains( '<li><a href="https://www.apache.org/" class="externalLink">Apache</a><span class="divider">/</span></li>' )
8 changes: 4 additions & 4 deletions src/it/topbar/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ assert index.exists()
// MSKINS-130 check that html structure is as clean as possible
String html = index.text
// active menu
assert html.contains( '<li><a title="About">About</a></li>' )
assert html.contains( '<li><a>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>' )
assert html.contains( '<li><a href="summary.html">Summary</a></li>' )
assert html.contains( '<li><a href="plugins.html">Plugins</a></li>' )
// breadcrumb
assert html.contains( '<li><a href="https://www.apache.org/" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>' )
assert html.contains( '<li><a href="https://www.apache.org/" class="externalLink">Apache</a><span class="divider">/</span></li>' )
Loading

0 comments on commit 4bc31ac

Please sign in to comment.