Skip to content

Commit b82bc71

Browse files
committed
csspath -> webcontentpath. Using variable to make web reference links absolute paths. Unused for distribution links.
1 parent 78e4cd5 commit b82bc71

File tree

8 files changed

+36
-34
lines changed

8 files changed

+36
-34
lines changed
40 Bytes
Binary file not shown.

java_generate/ReferenceGenerator/src/writers/TemplateWriter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class TemplateWriter extends BaseWriter {
1010

1111
public static String varPrefix = "<!-- ";
1212
public static String varSuffix = " -->";
13-
static String[] genericFields = {"classname", "returns", "related", "parameters", "syntax", "csspath"};
13+
static String[] genericFields = {"classname", "returns", "related", "parameters", "syntax", "webcontentpath"};
1414
static String[] navFields = {"isLibrary", "isAlphabetical", "isLanguage"};
1515

1616
public TemplateWriter()
@@ -55,9 +55,11 @@ private Boolean write( String templateName, HashMap<String, String> vars, String
5555
if(isLocal)
5656
{ //add local nav
5757
vars.put("navigation", writePartial("nav.local.template.html", vars));
58+
vars.put( "webcontentpath", "" );
5859
} else
5960
{
6061
vars.put("navigation", writePartial("nav.web.template.html", vars));
62+
vars.put( "webcontentpath", "/" );
6163
}
6264

6365
File f = new File( getWriterPath( outputName, isLocal ) );

java_generate/templates/class.template.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head>
44
<title><!-- classname --> \ Language (API) \ Processing 2+</title>
55

6-
<link rel="icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
7-
<link rel="shortcut icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
6+
<link rel="icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
7+
<link rel="shortcut icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
88

99
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1010
<meta name="Author" content="Casey Reas &amp; Ben Fry" />
@@ -17,7 +17,7 @@
1717
<meta name="Copyright" content="All contents copyright Ben Fry, Casey Reas, MIT Media Laboratory" />
1818

1919
<!-- ======== change the style link back later ============= -->
20-
<link href="<!-- csspath -->css/style.css" rel="stylesheet" type="text/css" />
20+
<link href="<!-- webcontentpath -->css/style.css" rel="stylesheet" type="text/css" />
2121
</head>
2222
<body id="Langauge-en" onload="" >
2323

@@ -27,7 +27,7 @@
2727

2828
<!-- ==================================== HEADER ============================ -->
2929
<div id="header">
30-
<a href="http://processing.org/"><img src="<!-- csspath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
30+
<a href="http://processing.org/"><img src="<!-- webcontentpath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
3131
<form name="search" method="get" action="http://www.google.com/search">
3232
<p><input type="hidden" name="as_sitesearch" value="processing.org" />
3333
<input type="text" name="as_q" value="" size="20" class="text" />
@@ -112,10 +112,10 @@
112112

113113
<!-- ==================================== FOOTER ============================ -->
114114
<div id="footer">
115-
<div id="copyright">Processing is an open project intiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- csspath -->about/people.html">small team of volunteers</a>. </div>
115+
<div id="copyright">Processing is an open project intiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- webcontentpath -->about/people.html">small team of volunteers</a>. </div>
116116
<div id="colophon">
117117

118-
<a href="<!-- csspath -->copyright.html">&copy; Info</a> \
118+
<a href="<!-- webcontentpath -->copyright.html">&copy; Info</a> \
119119

120120
<span>Site hosted by <a href="http://www.mediatemple.net">Media Temple!</a></span>
121121

java_generate/templates/generic.template.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head>
44
<title><!-- require:classname --><!-- classname -->::<!-- end --><!-- name --> \ Language (API) \ Processing 2+</title>
55

6-
<link rel="icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
7-
<link rel="shortcut icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
6+
<link rel="icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
7+
<link rel="shortcut icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
88

99
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1010
<meta name="Author" content="Casey Reas &amp; Ben Fry" />
@@ -16,7 +16,7 @@
1616
within the context of the electronic arts." />
1717
<meta name="Copyright" content="All contents copyright Ben Fry, Casey Reas, MIT Media Laboratory" />
1818

19-
<link href="<!-- csspath -->css/style.css" rel="stylesheet" type="text/css" />
19+
<link href="<!-- webcontentpath -->css/style.css" rel="stylesheet" type="text/css" />
2020
</head>
2121
<body id="Langauge-en" onload="" >
2222

@@ -26,7 +26,7 @@
2626

2727
<!-- ==================================== HEADER ============================ -->
2828
<div id="header">
29-
<a href="http://processing.org/"><img src="<!-- csspath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
29+
<a href="http://processing.org/"><img src="<!-- webcontentpath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
3030
<form name="search" method="get" action="http://www.google.com/search">
3131
<p><input type="hidden" name="as_sitesearch" value="processing.org" />
3232
<input type="text" name="as_q" value="" size="20" class="text" />
@@ -113,10 +113,10 @@
113113
<!-- ==================================== FOOTER ============================ -->
114114
<div id="footer">
115115

116-
<div id="copyright">Processing is an open project intiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- csspath -->about/people.html">small team of volunteers</a>.</div>
116+
<div id="copyright">Processing is an open project intiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- webcontentpath -->about/people.html">small team of volunteers</a>.</div>
117117
<div id="colophon">
118118

119-
<a href="<!-- csspath -->copyright.html">&copy; Info</a> \
119+
<a href="<!-- webcontentpath -->copyright.html">&copy; Info</a> \
120120

121121
<span>Site hosted by <a href="http://www.mediatemple.net">Media Temple!</a></span>
122122

java_generate/templates/index.alphabetical.template.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head>
44
<title>Alphabetical Language Reference (API) \ Processing 2+</title>
55

6-
<link rel="icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
7-
<link rel="shortcut icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
6+
<link rel="icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
7+
<link rel="shortcut icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
88

99
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1010
<meta name="Author" content="Casey Reas &amp; Ben Fry" />
@@ -26,7 +26,7 @@
2626

2727
<!-- ==================================== HEADER ============================ -->
2828
<div id="header">
29-
<a href="http://processing.org/"><img src="<!-- csspath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
29+
<a href="http://processing.org/"><img src="<!-- webcontentpath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
3030
<form name="search" method="get" action="http://www.google.com/search">
3131
<p><input type="hidden" name="as_sitesearch" value="processing.org" />
3232
<input type="text" name="as_q" value="" size="20" class="text" />
@@ -43,7 +43,7 @@
4343
<!-- ==================================== CONTENT - Headers ============================ -->
4444
<div class="content">
4545

46-
<h1 class="ref-header"><img src="<!-- csspath -->img/header.gif" alt="Language (API). The Processing Language has been designed to facilitate the creation of sophisticated visual and conceptual structures." /></h1>
46+
<h1 class="ref-header"><img src="<!-- webcontentpath -->img/header.gif" alt="Language (API). The Processing Language has been designed to facilitate the creation of sophisticated visual and conceptual structures." /></h1>
4747

4848
<div class="ref-col">
4949
<!-- c1 -->
@@ -60,10 +60,10 @@ <h1 class="ref-header"><img src="<!-- csspath -->img/header.gif" alt="Language (
6060
<!-- ==================================== FOOTER ============================ -->
6161
<div id="footer">
6262

63-
<div id="copyright">Processing was initiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- csspath -->about/people.html">small team of volunteers</a>.</div>
63+
<div id="copyright">Processing was initiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- webcontentpath -->about/people.html">small team of volunteers</a>.</div>
6464
<div id="colophon">
6565

66-
<a href="<!-- csspath -->copyright.html">&copy; Info</a> \
66+
<a href="<!-- webcontentpath -->copyright.html">&copy; Info</a> \
6767

6868
<span>Site hosted by <a href="http://www.mediatemple.net">Media Temple!</a></span>
6969

java_generate/templates/index.template.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<head>
44
<title>Language Reference (API) \ Processing 2+</title>
55

6-
<link rel="icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
7-
<link rel="shortcut icon" href="<!-- csspath -->img/favicon.ico" type="image/x-icon" />
6+
<link rel="icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
7+
<link rel="shortcut icon" href="<!-- webcontentpath -->img/favicon.ico" type="image/x-icon" />
88

99
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1010
<meta name="Author" content="Casey Reas &amp; Ben Fry" />
@@ -16,7 +16,7 @@
1616
within the context of the electronic arts." />
1717
<meta name="Copyright" content="All contents copyright Ben Fry, Casey Reas, MIT Media Laboratory" />
1818

19-
<link href="<!-- csspath -->css/style.css" rel="stylesheet" type="text/css" />
19+
<link href="<!-- webcontentpath -->css/style.css" rel="stylesheet" type="text/css" />
2020
</head>
2121
<body id="Language" onload="" >
2222

@@ -26,7 +26,7 @@
2626

2727
<!-- ==================================== HEADER ============================ -->
2828
<div id="header">
29-
<a href="http://processing.org/"><img src="<!-- csspath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
29+
<a href="http://processing.org/"><img src="<!-- webcontentpath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
3030
<form name="search" method="get" action="http://www.google.com/search">
3131
<p><input type="hidden" name="as_sitesearch" value="processing.org" />
3232
<input type="text" name="as_q" value="" size="20" class="text" />
@@ -43,7 +43,7 @@
4343
<!-- ==================================== CONTENT - Headers ============================ -->
4444
<div class="content">
4545

46-
<h1 class="ref-header"><img src="<!-- csspath -->img/header.gif" alt="Language (API). The Processing Language has been designed to facilitate the creation of sophisticated visual and conceptual structures." /></h1>
46+
<h1 class="ref-header"><img src="<!-- webcontentpath -->img/header.gif" alt="Language (API). The Processing Language has been designed to facilitate the creation of sophisticated visual and conceptual structures." /></h1>
4747

4848
<div class="ref-col">
4949
<div class="category">
@@ -238,10 +238,10 @@ <h5>Random</h5>
238238

239239
<!-- ==================================== FOOTER ============================ -->
240240
<div id="footer">
241-
<div id="copyright">Processing was initiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- csspath -->about/people.html">small team of volunteers</a>.</div>
241+
<div id="copyright">Processing was initiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- webcontentpath -->about/people.html">small team of volunteers</a>.</div>
242242
<div id="colophon">
243243

244-
<a href="<!-- csspath -->copyright.html">&copy; Info</a> \
244+
<a href="<!-- webcontentpath -->copyright.html">&copy; Info</a> \
245245

246246
<span>Site hosted by <a href="http://www.mediatemple.net">Media Temple!</a></span>
247247

java_generate/templates/library.index.template.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
within the context of the electronic arts." />
1717
<meta name="Copyright" content="All contents copyright Ben Fry, Casey Reas, MIT Media Laboratory" />
1818

19-
<link href="<!-- csspath -->css/style.css" rel="stylesheet" type="text/css" />
19+
<link href="<!-- webcontentpath -->css/style.css" rel="stylesheet" type="text/css" />
2020
</head>
2121
<body id="Library-index" onload="" >
2222

@@ -26,7 +26,7 @@
2626

2727
<!-- ==================================== HEADER ============================ -->
2828
<div id="header">
29-
<a href="http://processing.org/"><img src="<!-- csspath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
29+
<a href="http://processing.org/"><img src="<!-- webcontentpath -->img/processing_cover.gif" alt="Processing cover" title="Back to the cover." /></a>
3030
<form name="search" method="get" action="http://www.google.com/search">
3131
<p><input type="hidden" name="as_sitesearch" value="processing.org" />
3232
<input type="text" name="as_q" value="" size="20" class="text" />
@@ -67,10 +67,10 @@ <h5><!-- libraryname --> Events</h5>
6767

6868
<!-- ==================================== FOOTER ============================ -->
6969
<div id="footer">
70-
<div id="copyright">Processing was initiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- csspath -->about/people.html">small team of volunteers</a>.</div>
70+
<div id="copyright">Processing was initiated by <a href="http://benfry.com/">Ben Fry</a> and <a href="http://reas.com">Casey Reas</a>. It is developed by a <a href="<!-- webcontentpath -->about/people.html">small team of volunteers</a>.</div>
7171
<div id="colophon">
7272

73-
<a href="<!-- csspath -->copyright.html">&copy; Info</a> \
73+
<a href="<!-- webcontentpath -->copyright.html">&copy; Info</a> \
7474

7575
<span>Site hosted by <a href="http://www.mediatemple.net">Media Temple!</a></span>
7676

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="navBar" id="mainnav_noSub">
2-
<a href="<!-- csspath -->index.html" <!-- isLanguage -->>Language</a> (<a href="<!-- csspath -->alpha.html" <!-- isAlphabetical -->>A-Z</a>) \\
3-
<a href="<!-- csspath -->libraries/index.html" <!-- isLibrary -->>Libraries</a> \\
4-
<a href="<!-- csspath -->tools/index.html">Tools</a> \\
5-
<a href="<!-- csspath -->environment/index.html">Environment</a>
2+
<a href="<!-- webcontentpath -->index.html" <!-- isLanguage -->>Language</a> (<a href="<!-- webcontentpath -->alpha.html" <!-- isAlphabetical -->>A-Z</a>) \\
3+
<a href="<!-- webcontentpath -->libraries/index.html" <!-- isLibrary -->>Libraries</a> \\
4+
<a href="<!-- webcontentpath -->tools/index.html">Tools</a> \\
5+
<a href="<!-- webcontentpath -->environment/index.html">Environment</a>
66
</div>

0 commit comments

Comments
 (0)