Skip to content

Commit c710760

Browse files
committed
[MNG-8085] switch png+imagemap to svg
1 parent 267de06 commit c710760

File tree

8 files changed

+793
-35
lines changed

8 files changed

+793
-35
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
.factorypath
1616
.vscode/
1717
repo/
18+
/*.svg

pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ under the License.
775775
<exclude>src/test/projects/**</exclude>
776776
<exclude>src/test/remote-repo/**</exclude>
777777
<exclude>**/*.odg</exclude>
778+
<exclude>**/*.svg</exclude>
778779
<exclude>.asf.yaml</exclude>
779780
<exclude>.mvn/**</exclude>
780781
<!--

prepare-svg.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
#libreoffice --headless --convert-to svg src/site/xdoc/maven-deps.odg
21+
# CLI export keeps full A3 page
22+
# I prefer doing it by hand, limiting export to "selection" = avoids extra space
23+
24+
# svgo https://github.com/svg/svgo
25+
svgo --config src/site/svgo.config.mjs maven-deps.svg -o maven-deps-optimized.svg
26+
27+
cat maven-deps-optimized.svg \
28+
| sed 's/a xlink:href/a target="_parent" xlink:href/' \
29+
| sed 's_file://_.._' \
30+
> src/site/resources/images/maven-deps.svg
-137 KB
Binary file not shown.

src/site/resources/images/maven-deps.svg

+723
Loading

src/site/svgo.config.mjs

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export default {
21+
js2svg: {
22+
indent: 1,
23+
pretty: true,
24+
},
25+
plugins: [
26+
'preset-default',
27+
{
28+
name: "removeAttrs",
29+
params: {
30+
attrs: [
31+
"g:class",
32+
"path:class",
33+
]
34+
}
35+
},
36+
],
37+
};

src/site/xdoc/index.xml

+1-35
Original file line numberDiff line numberDiff line change
@@ -40,41 +40,7 @@ under the License.
4040
process.</p>
4141

4242
<p>
43-
<img src="images/maven-deps.png" width="1005" height="681" border="0" usemap="#Maven_dependencies" />
44-
<map name="Maven_dependencies">
45-
<area shape="rect" coords="478,1,567,40" alt="maven-bom" href="maven-bom/" />
46-
<area shape="rect" coords="251,0,400,40" alt="apache-maven" href="apache-maven/" />
47-
<area shape="rect" coords="251,66,400,106" alt="maven-embedder" href="maven-embedder/" />
48-
<area shape="rect" coords="250,131,400,173" alt="maven-compat" href="maven-compat/" />
49-
<area shape="rect" coords="250,197,401,237" alt="maven-core" href="maven-core/" />
50-
<area shape="rect" coords="91,447,268,488" alt="maven-resolver-provider" href="maven-resolver-provider/" />
51-
<area shape="rect" coords="204,639,423,680" alt="maven-repository-metadata" href="maven-repository-metadata/" />
52-
<area shape="rect" coords="528,197,638,238" alt="maven-plugin-api" href="maven-plugin-api/" />
53-
<area shape="rect" coords="374,258,554,299" alt="maven-toolchain-builder" href="maven-toolchain-builder/" />
54-
<area shape="rect" coords="375,324,553,365" alt="maven-toolchain-model" href="maven-toolchain-model/" />
55-
<area shape="rect" coords="601,578,696,619" alt="maven-artifact" href="maven-artifact/" />
56-
<area shape="rect" coords="381,446,547,486" alt="maven-builder-support" href="maven-builder-support/" />
57-
<area shape="rect" coords="244,381,406,421" alt="maven-settings-builder" href="maven-settings-builder/" />
58-
<area shape="rect" coords="278,447,371,486" alt="maven-settings" href="maven-settings/" />
59-
<area shape="rect" coords="387,512,540,553" alt="maven-model-builder" href="maven-model-builder/" />
60-
<area shape="rect" coords="492,577,594,619" alt="maven-model" href="maven-model/" />
61-
<area shape="rect" coords="71,0,222,41" alt="maven-slf4j-provider" href="maven-slf4j-provider/" />
62-
<area shape="rect" coords="73,66,220,108" alt="maven-slf4j-wrapper" href="maven-slf4j-wrapper/" />
63-
<area shape="rect" coords="1,517,192,680" alt="maven-resolver" href="https://maven.apache.org/resolver/" />
64-
<area shape="rect" coords="87,132,204,172" alt="slf4j-api" href="https://www.slf4j.org/manual.html" />
65-
<area shape="rect" coords="679,66,827,106" alt="commons-cli" href="https://commons.apache.org/cli/" />
66-
<area shape="rect" coords="82,197,216,237" alt="maven-shared-utils" href="https://maven.apache.org/shared/maven-shared-utils/" />
67-
<area shape="rect" coords="109,263,189,304" alt="jansi" href="https://fusesource.github.io/jansi/" />
68-
<area shape="rect" coords="679,132,892,171" alt="wagon-provider-api" href="https://maven.apache.org/wagon/wagon-provider-api/" />
69-
<area shape="rect" coords="674,437,831,477" alt="plexus-sec-dispatcher" href="https://github.com/codehaus-plexus/plexus-sec-dispatcher" />
70-
<area shape="rect" coords="859,436,949,479" alt="plexus-cipher" href="https://github.com/codehaus-plexus/plexus-cipher" />
71-
<area shape="rect" coords="673,380,820,422" alt="plexus-interpolation" href="https://codehaus-plexus.github.io/plexus-interpolation" />
72-
<area shape="rect" coords="674,324,809,365" alt="plexus-classworlds" href="https://codehaus-plexus.github.io/plexus-classworlds" />
73-
<area shape="rect" coords="868,324,951,366" alt="plexus-utils" href="https://codehaus-plexus.github.io/plexus-utils" />
74-
<area shape="rect" coords="660,310,965,520" alt="plexus" href="https://codehaus-plexus.github.io/" />
75-
<area shape="rect" coords="679,183,910,281" alt="sisu" href="https://projects.eclipse.org/projects/technology.sisu" />
76-
<area shape="rect" coords="921,195,1004,239" alt="guice" href="https://github.com/google/guice" />
77-
</map>
43+
<object data="images/maven-deps.svg" width="960" height="601"></object>
7844
</p>
7945
</section>
8046

src/site/xdoc/maven-deps.odg

15.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)