Dave Jarvis' Repositories

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

First draft of account page.

Author Dave Jarvis <email>
Date 2014-08-03 23:11:01 GMT-0700
Commit 3024c57c97e201bf87dd0e228103def4e15eab1a
Parent 973a0b9
xml/account.css
.account::before {
content: "Account";
- font-size: 1.2em;
+ font-size: 2em;
font-weight: bold;
}
.reputation {
+ border-top: 1px solid black;
+ padding-top: 0.5em;
margin-top: 0.5em;
+ margin-bottom: 0.5em;
}
.reputation::after {
content: " reputation";
}
-.interests { order: 1; }
-.edits { order: 2; }
-.policies { order: 3; }
-.votes { order: 3; }
-.views { order: 3; }
+.comments {
+ display: table;
+}
-.interests::after, .edits::after, .policies::after, .votes::after {
+.comments > .entry, .comments > .header {
+ display: table-row;
+ line-height: 140%;
+}
+
+.comments > .entry:nth-child(odd) {
+ display: table-row;
+ background-color: #EEE;
+}
+
+.comments > .header {
+ background-color: black;
+ color: white;
+ font-weight: bold;
+}
+
+.comments > .entry > .policy,
+.comments > .entry > .timestamp > .date {
+ white-space: nowrap;
+}
+
+.comments > * > *, .comments > * > * > * {
+ display: table-cell;
+ width: 100%;
+ padding-left: 0.25em;
+ padding-right: 0.25em;
+}
+
+.comments > * > .comment {
+ width: 35%;
+}
+
+.comments > * > .policy {
+ width: 25%;
+}
+
+.comments > * > .timestamp {
+ width: 20%;
+}
+
+.comments > * > .status > .state {
+ width: 15%;
+}
+
+.comments > * > .status > .visible {
+ width: 5%;
+}
+
+/* Unbreak the xref broken by the table-cell. */
+.comments > * > * > .xref {
+ display: inline;
+ padding-right: 0;
+ padding-left: 0;
+}
+
+.related > .comments { order: 1; }
+.related > .interests { order: 2; }
+.related > .edits { order: 3; }
+.related > .policies { order: 4; }
+.related > .votes { order: 5; }
+.related > .views { order: 6; }
+
+.related > *::after {
content: "|";
padding-right: 3px;
+}
+
+.related > .views::after {
+ content: "";
+ padding-right: 0;
}
+.comments > a::before { content: "comments"; }
.interests > a::before { content: "interests"; }
.edits > a::before { content: "edits"; }
.policies > a::before { content: "policies"; }
.votes > a::before { content: "votes"; }
.views > a::before { content: "views"; }
-
xml/account.xml
<reputation>11,319</reputation>
<comments>
- <comment>
- <paragraph>
+ <header>
+ <comment>Comment</comment>
+ <policy>Policy</policy>
+ <timestamp>Date</timestamp>
+ <status>
+ <state>State</state>
+ <visible>Posted</visible>
+ </status>
+ </header>
+ <entry>
+ <comment>
Surveillance data is susceptible to <xref id="1">theft</xref>.
- </paragraph>
- </comment>
- <comment>
- <paragraph>
+ </comment>
+ <policy><xref id="3">Digital Freedom Act</xref></policy>
+ <timestamp><date>Jun 15, 2014</date><time>14:32:05</time></timestamp>
+ <status>
+ <state>Accepted</state>
+ <visible>✔</visible>
+ </status>
+ </entry>
+ <entry>
+ <comment>
Data retention can <xref id="2">overturn</xref> the presumption of
innocence.
- </paragraph>
- </comment>
- <comment>
- <paragraph>
+ </comment>
+ <policy><xref id="3">Digital Freedom Act</xref></policy>
+ <timestamp><date>Jun 15, 2014</date><time>16:12:50</time></timestamp>
+ <status>
+ <state>Accepted</state>
+ <visible>✔</visible>
+ </status>
+ </entry>
+ <entry>
+ <comment>
Ensure anonymity when seeking or communicating sensitive health-related information.
- </paragraph>
- </comment>
+ </comment>
+ <policy><xref id="3">Digital Freedom Act</xref></policy>
+ <timestamp><date>Jun 15, 2014</date><time>18:21:22</time></timestamp>
+ <status>
+ <state>Pending</state>
+ <visible>⏳</visible>
+ </status>
+ </entry>
+ <entry>
+ <comment>
+ Improve the mental and physical health of citizens.
+ </comment>
+ <policy><xref id="3">Digital Freedom Act</xref></policy>
+ <timestamp><date>Jun 16, 2014</date><time>09:15:38</time></timestamp>
+ <status>
+ <state>Conjecture</state>
+ <visible>✘</visible>
+ </status>
+ </entry>
</comments>
-
<related>
+ <comments id="1" />
<interests id="1" />
<edits id="1" />
<policies id="1" />
<votes id="1" />
<views id="1" />
</related>
</account>
-
xml/discuss.xml
<counter>
<paragraph>
- The act does not describe how this would be enforced.
+ Description?
+ </paragraph>
+ </counter>
+ </implication>
+ <implication>
+ <votes>
+ <pro>126</pro>
+ <con>451</con>
+ </votes>
+ <paragraph>
+ Improve the mental and physical health of citizens.
+ </paragraph>
+ <counter>
+ <paragraph>
+ Citation? Description?
</paragraph>
</counter>
xml/edit-discuss-flag.css
@import url( "related.css" );
-.edit { order: 1; }
-.discuss { order: 2; }
-.flag { order: 3; }
+.related > .edit { order: 1; }
+.related > .discuss { order: 2; }
+.related > .flag { order: 3; }
-.discuss::after, .edit::after {
+.related > *::after {
content: "|";
padding-right: 3px;
}
-.discuss > a::before { content: "discuss"; }
-.edit > a::before { content: "edit"; }
-.flag > a::before { content: "flag"; }
+.related > .flag::after {
+ content: "";
+ padding-right: 0p;
+}
+.related > .discuss > a::before { content: "discuss"; }
+.related > .edit > a::before { content: "edit"; }
+.related > .flag > a::before { content: "flag"; }
xml/math.xsl
<xsl:param name="try" select="1" />
<!-- Maximum number of iterations (decreases recursively). -->
- <xsl:param name="iter" select="20"/>
+ <xsl:param name="iter" select="20" />
<!-- Nate Austin's implementation using Newton's method -->
<!-- Calculates the normalized arc tangent form. -->
<xsl:template name="atan2">
- <xsl:param name="y"/>
- <xsl:param name="x"/>
+ <xsl:param name="y" />
+ <xsl:param name="x" />
<!-- http://lists.apple.com/archives/PerfOptimization-dev/2005/Jan/msg00051.html -->
<!-- http://permalink.gmane.org/gmane.text.xml.xslt.extensions/840 -->
<!-- Returns the larger of two values (a, b). -->
<xsl:template name="max">
- <xsl:param name="a" select="0" />
- <xsl:param name="b" select="0" />
+ <xsl:param name="a" />
+ <xsl:param name="b" />
<xsl:if test="$a &gt;= $b"><xsl:value-of select="$a" /></xsl:if>
<xsl:if test="$a &lt; $b"><xsl:value-of select="$b" /></xsl:if>
</xsl:template>
<!-- Converts a two-digit hexadecimal number to decimal. -->
<xsl:template name="hex2dec">
- <xsl:param name="hex" select="'00'" />
+ <xsl:param name="hex" />
<xsl:variable name="digits" select="'0123456789ABCDEF'" />
xml/resources.css
.data:nth-child(odd) {
display: table-row;
- background-color: lightgray;
+ background-color: #EEE;
}
xml/xref.css
}
-
Delta 160 lines added, 38 lines removed, 122-line increase