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

use svg instead of png + imagemap #504

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ test-output
.idea
.DS_Store
.factorypath

/*.svg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we ignoring svg? Isn't the point of this PR to include SVG files?

Binary file removed content/resources/maven-sources.png
Binary file not shown.
935 changes: 935 additions & 0 deletions content/resources/maven-sources.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified content/xdoc/maven-sources.odg
Binary file not shown.
28 changes: 1 addition & 27 deletions content/xdoc/scm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,33 +67,7 @@ repo start master --all</pre>

<subsection name="Maven Sources Overview">
<p align="center">
<img src="maven-sources.png" width="843" height="837" border="0" usemap="#maven-sources" />
<map name="maven-sources">
<area shape="rect" coords="8,1,82,36" alt="Site" href="https://github.com/apache/maven-site" />
<area shape="rect" coords="100,0,205,37" alt="Sources" href="https://github.com/apache/maven-sources/" />
<area shape="rect" coords="89,43,171,78" alt="Maven" href="/ref/current" />
<area shape="rect" coords="178,43,275,78" alt="Core ITs" href="/core-its" />
<area shape="rect" coords="283,43,387,78" alt="Resolver" href="/resolver" />
<area shape="rect" coords="393,43,497,78" alt="Ant Tasks" href="/resolver-ant-tasks" />
<area shape="rect" coords="1,89,842,424" alt="Plugins" href="/plugins" />
<area shape="rect" coords="80,432,163,466" alt="Doxia" href="/doxia/doxia" />
<area shape="rect" coords="169,432,278,467" alt="Site Tools" href="/doxia/doxia-site-tools" />
<area shape="rect" coords="283,432,359,466" alt="Site" href="/doxia" />
<area shape="rect" coords="445,431,549,466" alt="Converter" href="/doxia/doxia-tools/doxia-converter" />
<area shape="rect" coords="554,431,659,466" alt="Linkcheck" href="/doxia/doxia-tools/doxia-linkcheck" />
<area shape="rect" coords="69,473,191,508" alt="Archetypes" href="/archetypes" />
<area shape="rect" coords="198,473,272,508" alt="Poms" href="/pom" />
<area shape="rect" coords="280,473,355,508" alt="Skins" href="/skins" />
<area shape="rect" coords="392,472,468,507" alt="Studies" href="/studies" />
<area shape="rect" coords="502,473,597,508" alt="Indexer" href="/maven-indexer" />
<area shape="rect" coords="604,473,699,509" alt="Wagon" href="/wagon" />
<area shape="rect" coords="705,473,836,509" alt="Plugin testing" href="/plugin-testing" />
<area shape="rect" coords="69,515,164,551" alt="dist tool" href="https://builds.apache.org/job/dist-tool-plugin/site/index.html" />
<area shape="rect" coords="280,514,354,550" alt="env" href="https://github.com/apache/maven-jenkins-env" />
<area shape="rect" coords="360,515,435,550" alt="lib" href="https://github.com/apache/maven-jenkins-lib" />
<area shape="rect" coords="1,557,833,779" alt="shared" href="/shared" />
<area shape="rect" coords="1,787,560,836" alt="Plexus" href="https://codehaus-plexus.github.io/" />
</map>
<object type="image/svg+xml" data="maven-sources.svg" width="1090" height="995"/>
</p>
<p>Each component has its own Jira project or component for issue tracking:
see the <a href="/issue-management.html">Issue Management report</a> to get a summary.
Expand Down
13 changes: 13 additions & 0 deletions prepare-svg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

#libreoffice --headless --convert-to svg content/xdoc/maven-sources.odg
# CLI export keeps full A3 page
# I prefer doing it by hand, limiting export to "selection" = avoids extra space

# svgo https://github.com/svg/svgo
svgo --config svgo.config.mjs maven-sources.svg -o maven-sources-optimized.svg

cat maven-sources-optimized.svg \
| sed 's/a xlink:href/a target="_parent" xlink:href/' \
| sed 's_file://__' \
> content/resources/maven-sources.svg
37 changes: 37 additions & 0 deletions svgo.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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.
*/

export default {
js2svg: {
indent: 1,
pretty: true,
},
plugins: [
'preset-default',
{
name: "removeAttrs",
params: {
attrs: [
"g:class",
"path:class",
]
}
},
],
};