Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/delibero.git

Updated stylesheet to version 2.0

AuthorDave Jarvis <email>
Date2015-01-14 17:06:21 GMT-0800
Commit6f08e0fa681861dc171d4c1aa3f6f86c72e55239
Parent08dd405
source/css/account.css
@charset "utf-8";
-@import url( "css/related.css" );
-@import url( "css/xref.css" );
+@import url( "related.css" );
+@import url( "xref.css" );
.account::before {
source/css/discuss.css
@charset "utf-8";
-@import url( "css/related.css" );
-@import url( "css/xref.css" );
+@import url( "related.css" );
+@import url( "xref.css" );
.summary, .policy {
source/css/home.css
}
+.synopsis {
+ padding-left: 10px;
+}
+
+.synopsis > a {
+ text-decoration: none;
+ font-family: "Montserrat",Helvetica,sans-serif;
+ font-size: 1.25em;
+ color: #46A5E5;
+}
+
.statistics {
order: 1;
source/css/hypothesis.css
@charset "utf-8";
-@import url( "css/edit-discuss-flag.css" );
-@import url( "css/xref.css" );
-@import url( "css/list.css" );
+@import url( "edit-discuss-flag.css" );
+@import url( "xref.css" );
+@import url( "list.css" );
.policy {
source/css/proposal.css
@charset "utf-8";
-@import url( "css/edit-discuss-flag.css" );
-@import url( "css/xref.css" );
-@import url( "css/parts.css" );
+@import url( "edit-discuss-flag.css" );
+@import url( "xref.css" );
+@import url( "parts.css" );
.policy {
source/css/resources.css
@charset "utf-8";
-@import url( "css/edit-discuss-flag.css" );
-@import url( "css/xref.css" );
-@import url( "css/parts.css" );
-@import url( "css/legend.css" );
+@import url( "edit-discuss-flag.css" );
+@import url( "xref.css" );
+@import url( "parts.css" );
+@import url( "legend.css" );
.policy {
source/css/summary.css
-@charset "utf-8";
-
-@import url( "css/related.css" );
-@import url( "css/xref.css" );
-@import url( "css/votes.css" );
-
-.summary, .paragraph {
- padding-bottom: 0.5em;
-}
-
-.synopsis {
- float: right;
- width: 90%;
-}
-
-.implications > .implication {
- line-height: 120%;
-}
-
-.tags {
- width: 100%;
- padding-bottom: 1em;
-
- font-size: 0.8em;
- color: #B93507;
- border-bottom: 1px solid black;
-}
-
-.tag {
- display: inline;
-}
-
-.tag::after {
- content: "|";
- padding-left: 5px;
- padding-right: 3px;
-}
-.tag:last-child:after { content: ""; }
-
-.statistics {
- font-size: 0.8em;
-}
-
-.activation {
- display: none;
-}
-
-.implications::before {
- content: "Implications";
- font-family: 'Montserrat', Helvetica, sans-serif;
- font-size: 1.5em;
- font-weight: bold;
-}
-
-.implications, .implication:nth-of-type(1) {
- margin-top: 0.5em;
-}
-
-.implication > .support {
- float: left;
- margin-right: 0.5em;
-}
-
-.implication > .support > a::before {
- content: "▶";
-}
-
-.related {
- padding-bottom: 0.5em;
- border-bottom: 1px solid black;
- width: 100%;
-}
-
-.proposal { order: 1; }
-.resources { order: 2; }
-.hypothesis { order: 3; }
-.discuss { order: 4; }
-
-.proposal::after, .resources::after, .hypothesis::after {
- content: "|";
- padding-right: 3px;
-}
-
-.proposal > a::before { content: "proposal"; }
-.resources > a::before { content: "resources"; }
-.hypothesis > a::before { content: "hypothesis"; }
-.discuss > a::before { content: "implications"; }
-.flag > a::before { content: "flag"; }
source/css/support.css
@charset "utf-8";
-@import url( "css/policy.css" );
-@import url( "css/edit-discuss-flag.css" );
-@import url( "css/xref.css" );
-@import url( "css/votes.css" );
-@import url( "css/video.css" );
+@import url( "policy.css" );
+@import url( "edit-discuss-flag.css" );
+@import url( "xref.css" );
+@import url( "votes.css" );
+@import url( "video.css" );
.implications::before {
source/css/synopsis.css
+@charset "utf-8";
+
+@import url( "related.css" );
+@import url( "xref.css" );
+@import url( "votes.css" );
+
+.summary, .paragraph {
+ padding-bottom: 0.5em;
+}
+
+.synopsis {
+ float: right;
+ width: 90%;
+}
+
+.implications > .implication {
+ line-height: 120%;
+}
+
+.tags {
+ width: 100%;
+ padding-bottom: 1em;
+
+ font-size: 0.8em;
+ color: #B93507;
+ border-bottom: 1px solid black;
+}
+
+.tag {
+ display: inline;
+}
+
+.tag::after {
+ content: "|";
+ padding-left: 5px;
+ padding-right: 3px;
+}
+.tag:last-child:after { content: ""; }
+
+.statistics {
+ font-size: 0.8em;
+}
+
+.activation {
+ display: none;
+}
+
+.implications::before {
+ content: "Implications";
+ font-family: 'Montserrat', Helvetica, sans-serif;
+ font-size: 1.5em;
+ font-weight: bold;
+}
+
+.implications, .implication:nth-of-type(1) {
+ margin-top: 0.5em;
+}
+
+.implication > .support {
+ float: left;
+ margin-right: 0.5em;
+}
+
+.implication > .support > a::before {
+ content: "▶";
+}
+
+.related {
+ padding-bottom: 0.5em;
+ border-bottom: 1px solid black;
+ width: 100%;
+}
+
+.proposal { order: 1; }
+.resources { order: 2; }
+.hypothesis { order: 3; }
+.discuss { order: 4; }
+
+.proposal::after, .resources::after, .hypothesis::after {
+ content: "|";
+ padding-right: 3px;
+}
+
+.proposal > a::before { content: "proposal"; }
+.resources > a::before { content: "resources"; }
+.hypothesis > a::before { content: "hypothesis"; }
+.discuss > a::before { content: "implications"; }
+.flag > a::before { content: "flag"; }
source/css/tags.css
@charset "utf-8";
-@import url( "css/policy.css" );
-@import url( "css/xref.css" );
+@import url( "policy.css" );
+@import url( "xref.css" );
div#container {
source/java/to/discuss/App.java
import java.io.InputStream;
-import java.io.Writer;
+import java.io.OutputStream;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.xml.transform.OutputKeys;
import javax.xml.transform.Source;
response.setContentType( "text/html" );
response.setStatus( HttpServletResponse.SC_OK );
- transform( response.getWriter() );
+ transform( response.getOutputStream() );
}
catch( Exception e ) {
throw new ServletException( e );
}
}
- protected void transform( Writer writer ) throws Exception {
- getTransformer().transform( getDocument(), new StreamResult( writer ) );
+ protected void applyParameters( Transformer t ) {
+ t.setParameter( "app", getClass().getSimpleName().toLowerCase() );
+ }
+
+ protected void applyProperties( Transformer t ) {
+ t.setOutputProperty( OutputKeys.ENCODING, "utf-8" );
+ }
+
+ protected void transform( OutputStream out ) throws Exception {
+ Transformer t = getTransformer();
+
+ applyParameters( t );
+ t.transform( getDocument(), new StreamResult( out ) );
}
source/xsl/chart.xsl
| Copyright 2014 White Magic Software, Inc.
+-->
-<xsl:stylesheet version="1.0"
+<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
source/xsl/colour.xsl
| Copyright 2014 White Magic Software, Inc.
+-->
-<xsl:stylesheet version="1.0"
+<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
source/xsl/common.xsl
| Copyright 2014 White Magic Software, Inc.
+-->
-<xsl:stylesheet version="1.0"
+<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
indent="no"
method="html"
doctype-system="about:legacy-compat"
encoding="utf-8"/>
+
+<!-- For including CSS and JavaScript references. -->
+<xsl:param name="app" />
<!-- Action parser that responds to HTTP requests. -->
<link rel='stylesheet' type='text/css' href='/css/common.css'/>
+ <link rel='stylesheet' type='text/css' href='/css/{$app}.css'/>
+
<link rel='stylesheet' type='text/css'
href='//fonts.googleapis.com/css?family=Open+Sans'/>
<link rel='stylesheet' type='text/css'
href='//fonts.googleapis.com/css?family=Montserrat'/>
</head>
<body>
<xsl:apply-templates/>
- <script type='text/javascript' src='/js/common.js'></script>
+
+ <script type='text/javascript' src="/js/{$app}.js"></script>
</body>
</html>
source/xsl/math.xsl
| Copyright 2014 White Magic Software, Inc.
+-->
-<xsl:stylesheet version="1.0"
+<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
source/xsl/tags.xsl
| Copyright 2014 White Magic Software, Inc.
+-->
-<xsl:stylesheet version="1.0"
+<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
Delta148 lines added, 119 lines removed, 29-line increase