Repository: incubator-juneau Updated Branches: refs/heads/master ef1c48b84 -> fac3eb92f
Simplify stylesheets. Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau/commit/fac3eb92 Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau/tree/fac3eb92 Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau/diff/fac3eb92 Branch: refs/heads/master Commit: fac3eb92f5086e529b3cea07d5017c8b2fe2441f Parents: ef1c48b Author: JamesBognar <[email protected]> Authored: Fri Jul 7 14:53:13 2017 -0400 Committer: JamesBognar <[email protected]> Committed: Fri Jul 7 14:53:13 2017 -0400 ---------------------------------------------------------------------- .../org/apache/juneau/html/HtmlDocTemplate.java | 4 +-- .../juneau/html/HtmlDocTemplateBasic.java | 15 +++++---- juneau-core/src/main/javadoc/overview.html | 30 ++++++++++++------ .../java/org/apache/juneau/rest/RestConfig.java | 4 +-- .../org/apache/juneau/rest/RestResponse.java | 4 +-- .../apache/juneau/rest/annotation/HtmlDoc.java | 8 ++--- .../java/org/apache/juneau/rest/package.html | 5 +-- .../org/apache/juneau/rest/styles/devops.css | 21 +++++++++++-- .../org/apache/juneau/rest/styles/light.css | 22 +++++++++++--- .../org/apache/juneau/rest/styles/original.css | 32 +++++++++++++------- 10 files changed, 99 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java index 7cc156e..7633eb6 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplate.java @@ -30,8 +30,8 @@ package org.apache.juneau.html; * </head> * <body> * <header> - * <h3 <xa>class</xa>=<xs>'title'</xs>><xv>Page title</xv></h3> - * <h5 <xa>class</xa>=<xs>'description'</xs>><xv>Page description</xv></h5> + * <h1><xv>Page title</xv></h1> + * <h2><xv>Page description</xv></h2> * <xv>Arbitrary page branding</xv> * </header> * <nav> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java index 4f21bb3..616e5d8 100644 --- a/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java +++ b/juneau-core/src/main/java/org/apache/juneau/html/HtmlDocTemplateBasic.java @@ -110,9 +110,9 @@ public class HtmlDocTemplateBasic implements HtmlDocTemplate { String description = session.getDescription(); String branding = session.getBranding(); if (exists(title)) - w.oTag(3, "h3").attr("class", "title").append('>').append(title).eTag("h3").nl(3); + w.oTag(3, "h1").append('>').append(title).eTag("h1").nl(3); if (exists(description)) - w.oTag(3, "h5").attr("class", "description").append('>').append(description).eTag("h5").nl(3); + w.oTag(3, "h2").append('>').append(description).eTag("h2").nl(3); if (exists(branding)) w.append(3, branding).nl(3); } @@ -127,19 +127,18 @@ public class HtmlDocTemplateBasic implements HtmlDocTemplate { w.append(2, nav).nl(2); } else { Map<String,Object> htmlLinks = session.getLinks(); - boolean first = true; if (htmlLinks != null) { + w.sTag("ol"); for (Map.Entry<String,Object> e : htmlLinks.entrySet()) { + w.sTag("li"); String v = e.getValue().toString(); - if (! first) - w.append(3, " - ").nl(3); - first = false; if (v.startsWith("<")) w.append(v); else - w.oTag("a").attr("class", "link").attr("href", session.resolveUri(v), true).cTag() - .text(e.getKey(), true).eTag("a"); + w.oTag("a").attr("href", session.resolveUri(v), true).cTag().text(e.getKey(), true).eTag("a"); + w.eTag("li"); } + w.eTag("ol"); } } } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-core/src/main/javadoc/overview.html ---------------------------------------------------------------------- diff --git a/juneau-core/src/main/javadoc/overview.html b/juneau-core/src/main/javadoc/overview.html index 80e7414..4abc48a 100644 --- a/juneau-core/src/main/javadoc/overview.html +++ b/juneau-core/src/main/javadoc/overview.html @@ -3964,6 +3964,7 @@ </p> <h6 class='figure'>UrlEncodedForm.html</h6> + <b>TODO - Needs update</b> <p class='bcode'> <xt><html></xt> <xt><head></xt> @@ -3981,8 +3982,8 @@ <xt></script></xt> <xt></head></xt> <xt><body></xt> - <xt><h3</xt> <xa>class</xa>=<xs>'title'</xs><xt>></xt>$R{servletTitle}<xt></h3></xt> - <xt><h5</xt> <xa>class</xa>=<xs>"description"</xs><xt>></xt>$R{servletDescription}<xt></h5></xt> + <xt><h1></xt>$R{servletTitle}<xt></h1></xt> + <xt><h2></xt>$R{servletDescription}<xt></h2></xt> <xt><div</xt> <xa>class</xa>=<xs>'data'</xs><xt>></xt> <xt><form</xt> <xa>id</xa>=<xs>'form'</xs> <xa>action</xa>=<xs>'$R{servletURI}'</xs> <xa>method</xa>=<xs>'POST'</xs> <xa>target</xa>=<xs>'buff'</xs><xt>></xt> <xt><table></xt> @@ -5569,6 +5570,7 @@ </p> <h6 class='figure'>TempDirUploadPage.html</h6> + <b>TODO - Needs update</b> <p class='bcode'> <xt><html></xt> <xt><head></xt> @@ -5578,8 +5580,8 @@ <xt></style></xt> <xt></head></xt> <xt><body></xt> - <xt><h3</xt> <xa>class</xa>=<xs>'title'</xs><xt>></xt>$R{servletTitle}<xt></h3></xt> - <xt><h5</xt> <xa>class</xa>=<xs>"description"</xs><xt>></xt>$R{servletDescription}<xt></h5></xt> + <xt><h1></xt>$R{servletTitle}<xt></h1></xt> + <xt><h2></xt>$R{servletDescription}<xt></h2></xt> <xt><div</xt> <xa>class</xa>=<xs>'data'</xs><xt>></xt> <xt><form</xt> <xa>id</xa>=<xs>'form'</xs> <xa>action</xa>=<xs>'$R{servletURI}/upload'</xs> <xa>method</xa>=<xs>'POST'</xs> <xa>target</xa>=<xs>'buff'</xs> <xa>enctype</xa>=<xs>"multipart/form-data"</xs><xt>></xt> <xt><input</xt> <xa>name</xa>=<xs>"contents"</xs> <xa>type</xa>=<xs>"file"</xs><xt>></xt><xt><button</xt> <xa>type</xa>=<xs>"submit"</xs><xt>></xt>Submit<xt></button></xt> @@ -6253,6 +6255,7 @@ </p> <h6 class='figure'>SqlQueryResource.html</h6> + <b>TODO - Needs update</b> <p class='bcode'> <xt><html></xt> <xt><head></xt> @@ -6278,7 +6281,7 @@ <xt></script></xt> <xt></head></xt> <xt><body></xt> - <xt><h3</xt> <xa>class</xa>=<xs>'title'</xs><xt>></xt>SQL Query API<xt></h3></xt> + <xt><h1></xt>SQL Query API<xt></h1></xt> <xt><div</xt> <xa>class</xa>=<xs>'data'</xs><xt>></xt> <xt><form</xt> <xa>action</xa>=<xs>'sqlQuery'</xs> <xa>method</xa>=<xs>'POST'</xs> <xa>target</xa>=<xs>'buf'</xs><xt>></xt> <xt><table></xt> @@ -6506,6 +6509,7 @@ </p> <h6 class='figure'>ConfigEdit.html</h6> + <b>TODO - Needs update</b> <p class='bcode'> <xt><html></xt> <xt><head></xt> @@ -6515,8 +6519,8 @@ <xt></style></xt> <xt></head></xt> <xt><body></xt> - <xt><h3</xt> <xa>class</xa>=<xs>'title'</xs><xt>></xt>$R{servletTitle}<xt></h3></xt> - <xt><h5</xt> <xa>class</xa>=<xs>'description'</xs><xt>></xt>Edit config file<xt></h5></xt> + <xt><h1></xt>$R{servletTitle}<xt></h1></xt> + <xt><h2></xt>Edit config file<xt></h2></xt> <xt><p</xt> <xa>class</xa>=<xs>'links'</xs><xt>></xt><xt><a</xt> <xa>href</xa>=<xs>'$R{requestParentURI}'</xs><xt>></xt>up<xt></a></xt> - <xt><a</xt> <xa>href=<xs>'$R{servletURI}?method</xa>=OPTIONS'</xs><xt>></xt>options<xt></a></xt><xt></p></xt> <xt><form</xt> <xa>id</xa>=<xs>'form'</xs> <xa>action</xa>=<xs>'$R{servletURI}'</xs> <xa>method</xa>=<xs>'POST'</xs> <xa>enctype</xa>=<xs>'application/x-www-form-urlencoded'</xs><xt>></xt> <xt><div</xt> <xa>class</xa>=<xs>'data'</xs><xt>></xt> @@ -6869,6 +6873,14 @@ <br>For those nolstalgic for old times, there's also 'original': <br><img src='doc-files/ReleaseNotes_631_OriginalStyle.png'> <li> + Simplified the stylesheets and HTML code. + <ul> + <li>Replaced <code><xt><h3</xt> <xa>class</xa>=<xs>'title'</xs><xt>></xt></code> with just <code><xt><header></xt>/<xt><h1></xt></code>. + <li>Replaced <code><xt><h5</xt> <xa>class</xa>=<xs>'description'</xs><xt>></xt></code> with just <code><xt><header></xt>/<xt><h2></xt></code>. + <li>Replaced <code><xt><a</xt> <xa>class</xa>=<xs>'link'</xs><xt>></xt></code> with just <code><xt><nav></xt>/<xt><a></xt></code>. + <li>The nav links are now an ordered list of elements. + </ul> + <li> Improvements made to the {@link org.apache.juneau.rest.widget.Widget} API. <ul> <li> @@ -6932,9 +6944,9 @@ <h6 class='topic'>org.apache.juneau.rest.examples</h6> <ul class='spaced-list'> <li> - Added CONTENT-TYPE menu items to most pages. + Added CONTENT-TYPE and STYLES menu items to most pages. <li> - Added improved QUERY menu items to PetStore page. + Added improved QUERY menu item to PetStore page. </ul> </div> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java index 691136b..6d10d6a 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestConfig.java @@ -1103,7 +1103,7 @@ public class RestConfig implements ServletConfig { * The format of this value is plain text. * * <p> - * It gets wrapped in a <code><xt><h3> <xa>class</xa>=<xs>'title'</xs>></xt></code> element and then added + * It gets wrapped in a <code><xt><h1></xt></code> element and then added * to the <code><xt><header></code> section on the page. * * <p> @@ -1148,7 +1148,7 @@ public class RestConfig implements ServletConfig { * The format of this value is plain text. * * <p> - * It gets wrapped in a <code><xt><h5> <xa>class</xa>=<xs>'description'</xs>></xt></code> element and then + * It gets wrapped in a <code><xt><h2></xt></code> element and then * added to the <code><xt><header></code> section on the page. * * <p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java index f52f2c1..464e92d 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/RestResponse.java @@ -444,7 +444,7 @@ public final class RestResponse extends HttpServletResponseWrapper { * The format of this value is plain text. * * <p> - * It gets wrapped in a <code><xt><h3> <xa>class</xa>=<xs>'title'</xs>></xt></code> element and then added + * It gets wrapped in a <code><xt><h1></xt></code> element and then added * to the <code><xt><header></code> section on the page. * * <p> @@ -496,7 +496,7 @@ public final class RestResponse extends HttpServletResponseWrapper { * The format of this value is plain text. * * <p> - * It gets wrapped in a <code><xt><h5> <xa>class</xa>=<xs>'description'</xs>></xt></code> element and then + * It gets wrapped in a <code><xt><h2></xt></code> element and then * added to the <code><xt><header></code> section on the page. * * <p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java index d43fac8..50d6d00 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/annotation/HtmlDoc.java @@ -55,8 +55,8 @@ import org.apache.juneau.rest.*; * </head> * <body> * <header> - * <h3 <xa>class</xa>=<xs>'title'</xs>><xv>Page title</xv></h3> - * <h5 <xa>class</xa>=<xs>'description'</xs>><xv>Page description</xv></h5> + * <h1><xv>Page title</xv></h1> + * <h2><xv>Page description</xv></h2> * <xv>Arbitrary page branding</xv> * </header> * <nav> @@ -84,7 +84,7 @@ public @interface HtmlDoc { * The format of this value is HTML (phrasing content only). * * <p> - * It gets wrapped in a <code><xt><h3> <xa>class</xa>=<xs>'title'</xs>></xt></code> element and then added + * It gets wrapped in a <code><xt><h1></xt></code> element and then added * to the <code><xt><header></code> section on the page. * * <p> @@ -127,7 +127,7 @@ public @interface HtmlDoc { * The format of this value is HTML (phrasing content only). * * <p> - * It gets wrapped in a <code><xt><h5> <xa>class</xa>=<xs>'description'</xs>></xt></code> element and then + * It gets wrapped in a <code><xt><h2></xt></code> element and then * added to the <code><xt><header></code> section on the page. * * <p> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-rest/src/main/java/org/apache/juneau/rest/package.html ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html index 65e611a..00a4497 100644 --- a/juneau-rest/src/main/java/org/apache/juneau/rest/package.html +++ b/juneau-rest/src/main/java/org/apache/juneau/rest/package.html @@ -2321,6 +2321,7 @@ </p> <h6 class='figure'>Contents of org/apache/juneau/server/samples/UrlEncodedForm.html</h6> + <b>TODO - Needs update</b> <p class='bcode'> <xt><html></xt> <xt><head></xt> @@ -2329,8 +2330,8 @@ <xt></style></xt> <xt></head></xt> <xt><body></xt> - <xt><h3</xt> <xa>class</xa>=<xs>'title'</xs><xt>></xt>$R{servletTitle}<xt></h3></xt> - <xt><h5</xt> <xa>class</xa>=<xs>"description"</xs><xt>></xt>$R{servletDescription}<xt></h5></xt> + <xt><h1></xt>$R{servletTitle}<xt></h1></xt> + <xt><h2></xt>$R{servletDescription}<xt></h2></xt> <xt><div</xt> <xa>class</xa>=<xs>'data'</xs><xt>></xt> <xt><form</xt> <xa>id</xa>=<xs>'form'</xs> <xa>action</xa>=<xs>'$R{servletURI}'</xs> <xa>method</xa>=<xs>'POST'</xs><xt>></xt> <xt><table></xt> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/devops.css ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/devops.css b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/devops.css index f96bdde..26b82fa 100644 --- a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/devops.css +++ b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/devops.css @@ -50,14 +50,16 @@ header * { font-weight: normal; } -header h3 { +header h1 { padding: 10px 20px; + font-size: 16px; border-bottom: 2px solid #34534B; color: white; } -header h5 { +header h2 { padding: 10px 20px; + font-size: 14px; border-bottom: 2px solid #34534B; } @@ -70,6 +72,20 @@ nav { color: #94A3AB; } +nav ol { + list-style-type: none; + margin: 0px 10px; + padding: 0px; +} + +nav li { + display: inline; +} + +nav li:not(:first-child):before { + content: " - "; +} + nav a { font-size: 10pt; color: #94A3AB; @@ -91,6 +107,7 @@ nav a:active, nav a:hover { section { display: table; width: 100%; + margin-bottom: 50px; } article { http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/light.css ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/light.css b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/light.css index ded2669..6c443bb 100644 --- a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/light.css +++ b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/light.css @@ -51,13 +51,13 @@ header * { font-weight: lighter; } -header h3 { +header h1 { font-size: 18px; margin: 0px; padding: 2px; } -header h5 { +header h2 { font-size: 14px; margin: 0px; padding: 2px; @@ -79,6 +79,20 @@ nav * { font-weight: lighter; } +nav ol { + list-style-type: none; + margin: 0px 10px; + padding: 0px; +} + +nav li { + display: inline; +} + +nav li:not(:first-child):before { + content: " - "; +} + nav a { font-size: 10pt; color: #2c4557; @@ -100,12 +114,12 @@ nav a:active, nav a:hover { section { display: table; width: 100%; - margin: 15px 30px; + margin: 0px 0px 50px 0px; } article { display: table-cell; - padding: 10px; + padding: 20px 40px; overflow-x: auto; } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/fac3eb92/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/original.css ---------------------------------------------------------------------- diff --git a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/original.css b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/original.css index e2d3f9c..690dad4 100644 --- a/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/original.css +++ b/juneau-rest/src/main/resources/org/apache/juneau/rest/styles/original.css @@ -23,7 +23,6 @@ body { color: #2c4557; height: 100%; margin: 0px; - padding: 0px; } body * { @@ -42,10 +41,10 @@ body textarea, body pre { /**********************************************************************************************************************/ header { - margin: 20px; + padding: 10px 20px; } -header h3 { +header h1 { font-size: 16px; margin-bottom: 10px; margin-right: 40px; @@ -57,7 +56,7 @@ header h3 { background: -webkit-gradient(linear, left top, left bottom, from(#F5F5F5), to(#DEE3E9)); } -header h5 { +header h2 { font-weight: normal; margin-left: 20px; } @@ -67,7 +66,21 @@ header h5 { /**********************************************************************************************************************/ nav { - margin: 10px 25px; + margin: 0px 25px; +} + +nav ol { + list-style-type: none; + margin: 0px 10px; + padding: 0px; +} + +nav li { + display: inline; +} + +nav li:not(:first-child):before { + content: " - "; } nav a { @@ -83,11 +96,12 @@ nav a { section { display: table; width: 100%; - margin: 20px; + margin: 0px 0px 50px 0px; } article { display: table-cell; + padding: 20px 40px; } aside { @@ -128,11 +142,7 @@ article ul { /**********************************************************************************************************************/ footer { - padding: 10px 20px; - width: 100%; - bottom: 0; - position: fixed; - background-color: #e8ebef; + display: none; } /**********************************************************************************************************************/
