voterunner

quick and dirty votes and discussions
git clone https://git.ce9e.org/voterunner.git

commit
ddeb568d211db52ff4478c76916d69a0ce12206f
parent
1ee6c4f64142f220cf80bb71e945a18b4c1e9dcf
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2016-09-11 11:19
build

Diffstat

M static/style.css 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------
M static/voterunner.js 7 ++++---

2 files changed, 156 insertions, 27 deletions


diff --git a/static/style.css b/static/style.css

@@ -1,32 +1,135 @@
    1     1 @charset "UTF-8";
    2    -1 * {
    3    -1   box-sizing: border-box;
   -1     2 @viewport {
   -1     3   width: device-width; }
   -1     4 
   -1     5 *,
   -1     6 *::before,
   -1     7 *::after {
   -1     8   box-sizing: inherit;
    4     9   max-width: 100%; }
    5    10 
   -1    11 p, address, blockquote, pre, table, dl, ul, ol, figure, fieldset {
   -1    12   margin-top: 0;
   -1    13   margin-bottom: 1em; }
   -1    14 
   -1    15 html {
   -1    16   overflow-y: scroll;
   -1    17   background-color: #fff;
   -1    18   box-sizing: border-box;
   -1    19   color: #000;
   -1    20   font-size: 1.2em;
   -1    21   font-family: sans-serif;
   -1    22   line-height: 1.4; }
   -1    23 
   -1    24 body {
   -1    25   margin: 2em auto;
   -1    26   max-width: 36em;
   -1    27   padding: 0 0.4em; }
   -1    28 
   -1    29 h1, h2, h3, h4, h5, h6 {
   -1    30   line-height: 1.2;
   -1    31   margin-bottom: 0.8rem;
   -1    32   margin-top: 1.5em; }
   -1    33 
   -1    34 a {
   -1    35   color: #336DBE;
   -1    36   text-decoration: underline; }
   -1    37   a:hover, a:focus, a:active {
   -1    38     color: #014c8c; }
   -1    39 
   -1    40 a:not([href]) {
   -1    41   color: inherit;
   -1    42   text-decoration: inherit; }
   -1    43   a:not([href]):hover, a:not([href]):focus, a:not([href]):active {
   -1    44     color: inherit; }
   -1    45 
   -1    46 *::selection {
   -1    47   background: #336DBE;
   -1    48   color: #fff; }
   -1    49 
   -1    50 hr {
   -1    51   border: 0;
   -1    52   border-bottom: 1px solid #c0c0c0;
   -1    53   margin: 1em 0; }
   -1    54 
   -1    55 pre, code {
   -1    56   font-size: 90%;
   -1    57   font-family: monospace;
   -1    58   background-color: #c2d5ee; }
   -1    59 
   -1    60 code {
   -1    61   padding: 0 0.25em; }
   -1    62 
   -1    63 pre {
   -1    64   padding: 0.4em;
   -1    65   overflow: auto;
   -1    66   border: 1px solid #c0c0c0; }
   -1    67   pre code {
   -1    68     background: none;
   -1    69     font-size: 100%;
   -1    70     padding: 0; }
   -1    71 
   -1    72 ol, ul {
   -1    73   padding-left: 2rem; }
   -1    74 
   -1    75 dt {
   -1    76   font-weight: bold; }
   -1    77 
   -1    78 dd {
   -1    79   margin-left: 2rem; }
   -1    80 
   -1    81 blockquote {
   -1    82   font-style: italic;
   -1    83   margin-left: 2rem;
   -1    84   margin-right: 0; }
   -1    85 
   -1    86 table {
   -1    87   border-collapse: collapse;
   -1    88   border-spacing: 0; }
   -1    89   table td, table th {
   -1    90     text-align: start;
   -1    91     padding: 0.4em;
   -1    92     border-top: 1px solid #c0c0c0;
   -1    93     vertical-align: top; }
   -1    94 
   -1    95 textarea {
   -1    96   resize: vertical; }
   -1    97 
   -1    98 fieldset {
   -1    99   border: 1px solid #c0c0c0; }
   -1   100 
   -1   101 sub, sup {
   -1   102   line-height: 0; }
   -1   103 
   -1   104 @media print {
   -1   105   html {
   -1   106     background: transparent;
   -1   107     color: #000; }
   -1   108   h2, h3 {
   -1   109     page-break-after: avoid; } }
   -1   110 
    6   111 [id^="json-"] {
    7   112   display: none; }
    8   113 
    9   114 input[type="text"],
   10   115 textarea {
   11    -1   background: white; }
   -1   116   background: #fff; }
   12   117 
   13   118 textarea {
   14   119   font-family: inherit;
   15   120   font-size: inherit; }
   16   121 
   17    -1 html {
   18    -1   font-family: sans-serif;
   19    -1   font-size: 70%;
   20    -1   background: #eee; }
   -1   122 @media screen {
   -1   123   html.voterunner {
   -1   124     background: #eee;
   -1   125     font-size: 80%; } }
   21   126 
   22   127 body,
   23   128 html {
   24   129   height: 100%; }
   25   130 
   26   131 body {
   27    -1   max-width: 90em;
   28   132   margin: 0 auto;
   29    -1   padding: 0 0.4em;
   30   133   position: relative; }
   31   134   body > div {
   32   135     padding: 3em 0 1em;
@@ -37,6 +140,9 @@ body {
   37   140       height: 100%;
   38   141       min-height: 33em; }
   39   142 
   -1   143 .voterunner body {
   -1   144   max-width: 90em; }
   -1   145 
   40   146 body > header {
   41   147   background: #336DBE;
   42   148   text-align: center;
@@ -48,23 +154,29 @@ body > header {
   48   154   right: 0.4em; }
   49   155   body > header h1 {
   50   156     margin: 0;
   51    -1     font-size: 2em;
   52    -1     color: #D9E7F9; }
   -1   157     font-size: 200%;
   -1   158     color: #fff; }
   53   159     body > header h1 span {
   54    -1       color: #ABC3E3; }
   -1   160       color: #c2d5ee; }
   55   161 
   56   162 #tree,
   57   163 #user,
   58   164 #tree .node .body {
   59    -1   border: 1px solid lightgray;
   -1   165   border: 1px solid #c0c0c0;
   60   166   border-radius: 0.2em 0.2em 0 0; }
   61   167 
   -1   168 @media print {
   -1   169   #tree, #user {
   -1   170     border: 0; } }
   -1   171 
   62   172 #tree {
   63    -1   background: white;
   -1   173   background: #fff;
   64   174   padding: 0.4em;
   65   175   margin-top: 0.4em; }
   66   176 
   67    -1 @media (min-width: 40em) {
   -1   177 @media screen and (min-width: 40em) {
   -1   178   html {
   -1   179     overflow: auto; }
   68   180   #tree {
   69   181     position: absolute;
   70   182     top: 0;
@@ -89,6 +201,9 @@ body > header {
   89   201   text-align: center; }
   90   202   .node .expand:hover, .node .delegate:hover, #user .undelegate:hover, #rm:hover {
   91   203     background-color: rgba(255, 255, 255, 0.2); }
   -1   204   @media print {
   -1   205     .node .expand, .node .delegate, #user .undelegate, #rm {
   -1   206       display: none; } }
   92   207 
   93   208 .node .expand, .node .delegate, .node .votes, #user .votes, #user .undelegate, #rm, .node .name, #user .delegate, #name {
   94   209   padding: 0.4em;
@@ -98,11 +213,11 @@ body > header {
   98   213 
   99   214 .node .expand {
  100   215   float: left;
  101    -1   border-right: 1px solid lightgray; }
   -1   216   border-right: 1px solid #c0c0c0; }
  102   217 
  103   218 .node .delegate, .node .votes, #user .votes, #user .undelegate, #rm {
  104   219   float: right;
  105    -1   border-left: 1px solid lightgray; }
   -1   220   border-left: 1px solid #c0c0c0; }
  106   221 
  107   222 .tree {
  108   223   padding: 0;
@@ -112,35 +227,49 @@ body > header {
  112   227     margin-left: 2em; }
  113   228 
  114   229 .node {
  115    -1   margin: 0.5em 0; }
   -1   230   margin: 1em 0; }
   -1   231   .node:target > .body {
   -1   232     outline: 5px auto #336DBE;
   -1   233     outline-offset: -2px; }
  116   234   .node .body {
  117    -1     background: white; }
   -1   235     background: #fff;
   -1   236     break-inside: avoid; }
   -1   237     @media print {
   -1   238       .node .body {
   -1   239         border: 1px solid; } }
  118   240   .node .header {
  119    -1     background: #ABC3E3; }
   -1   241     background: #c2d5ee; }
  120   242   .node .expand:before {
  121   243     content: ">"; }
  122   244   .node .comment {
  123   245     padding: 0.4em; }
   -1   246     .node .comment > :first-child {
   -1   247       margin-top: 0; }
   -1   248     .node .comment > :last-child {
   -1   249       margin-bottom: 0; }
  124   250   .node.m-self > .body .delegate {
  125   251     display: none; }
  126   252   .node.m-self > .body .header {
  127   253     background: #336DBE;
  128    -1     color: white; }
   -1   254     color: #fff; }
  129   255   .node:not(.is-expanded) > .tree {
  130   256     display: none; }
  131   257   .node.is-expanded > .body .expand:before {
  132   258     content: "v"; }
  133   259 
  134   260 #user {
  135    -1   background: #D9E7F9; }
   -1   261   background: #c2d5ee; }
  136   262   #user .delegate {
  137   263     float: left; }
  138   264   #user .undelegate:before {
  139   265     content: "‒"; }
   -1   266   @media print {
   -1   267     #user {
   -1   268       display: none; } }
  140   269 
  141   270 .statusbar {
  142   271   width: 100%;
  143    -1   border-bottom: 1px solid lightgray;
   -1   272   border-bottom: 1px solid #c0c0c0;
  144   273   overflow: hidden; }
  145   274 
  146   275 #name {
@@ -162,6 +291,5 @@ body > header {
  162   291   width: 100%;
  163   292   min-height: 15em;
  164   293   border: none;
  165    -1   resize: vertical;
  166   294   padding: 0.4em; }
  167   295 

diff --git a/static/voterunner.js b/static/voterunner.js

@@ -16712,7 +16712,8 @@ var tplNode = function(nodes, node, ID) {
16712 16712 		delegateAttrs.disabled = true;
16713 16713 	}
16714 16714 
16715    -1 	return h('li.node#node' + node.id, {
   -1 16715 	return h('li.node#node-' + node.id, {
   -1 16716 		key: 'node-' + node.id,
16716 16717 		className: classList.join(' '),
16717 16718 	}, [
16718 16719 		h('article.body', [
@@ -16832,7 +16833,7 @@ document.addEventListener('DOMContentLoaded', function() {
16832 16833 
16833 16834 	var toggleExpand = function(event) {
16834 16835 		var nodeElement = event.target.parentElement.parentElement.parentElement;
16835    -1 		var id = nodeElement.id.substr(4);
   -1 16836 		var id = nodeElement.id.substr(5);
16836 16837 		var node = getNode(id);
16837 16838 		node.expanded = !node.expanded;
16838 16839 		update(nodes);
@@ -16840,7 +16841,7 @@ document.addEventListener('DOMContentLoaded', function() {
16840 16841 
16841 16842 	var setDelegate = function(event) {
16842 16843 		var nodeElement = event.target.parentElement.parentElement.parentElement;
16843    -1 		var id = nodeElement.id.substr(4);
   -1 16844 		var id = nodeElement.id.substr(5);
16844 16845 		socket.emit('setDelegate', id);
16845 16846 	};
16846 16847