Commit 51c14356 authored by Sacha's avatar Sacha Committed by SXibolet@2PITAU
Browse files

improvements to turk flow

parent 0776dd3d
*.html linguist-vendored
*.scss linguist-vendored
*.css linguist-vendored
config.py
venv
*.pyc
*.sass-cache
*.css
*.css.map
*.swp
*.rdb
.DS_Store
config.py
venv
controversy/sentistrength
notes.rst
......@@ -323,7 +323,7 @@
<div class="footer">
<hr class="footer"/>
<a class="reference external" href="README.rst">View document source</a>.
Generated on: 2015-11-25 07:29 UTC.
Generated on: 2015-11-27 08:25 UTC.
Generated by <a class="reference external" href="http://ocha.2pitau.org/docusty">Docutils+Docusty</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
......
......@@ -108,7 +108,7 @@ def trending():
return success({
"trending" : freq,
"controversial": get_largest_for_key(db.most_controversial(), 5),
"controversial": get_largest_for_key(db.most_controversial(), 4),
"top-5" : sorted(freq, key=freq.get, reverse=True)[:5]
})
......
rst2html.py -stg README.rst README.html
docusty --externals=documents/external.txt --stydest=documents README.html README.html
docusty --externals=documents/externals.txt --stydest=documents README.html README.html
.borderless,table.borderless td,table.borderless th{border:0}table.borderless td,table.borderless th{padding:0 .5em 0 0!important}.first{margin-top:0!important}.last,.with-subtitle{margin-bottom:0!important}.hidden{display:none}a.toc-backref{text-decoration:none;color:black}blockquote.epigraph{margin:2em 5em}dl.docutils dd{margin-bottom:.5em}object[type="image/svg+xml"],object[type="application/x-shockwave-flash"]{overflow:hidden}div.abstract{margin:2em 5em}div.abstract p.topic-title{font-weight:bold;text-align:center}div.admonition,div.attention,div.caution,div.danger,div.error,div.hint,div.important,div.note,div.tip,div.warning{margin:2em;border:medium outset;padding:1em}div.admonition p.admonition-title,div.hint p.admonition-title,div.important p.admonition-title,div.note p.admonition-title,div.tip p.admonition-title{font-weight:bold;font-family:sans-serif}div.attention p.admonition-title,div.caution p.admonition-title,div.danger p.admonition-title,div.error p.admonition-title,div.warning p.admonition-title,.code .error{color:red;font-weight:bold;font-family:sans-serif}div.dedication{margin:2em 5em;text-align:center;font-style:italic}div.dedication p.topic-title{font-weight:bold;font-style:normal}div.figure{margin-left:2em;margin-right:2em}div.footer,div.header{clear:both;font-size:smaller}div.line-block{display:block;margin-top:1em;margin-bottom:1em}div.line-block div.line-block{margin-top:0;margin-bottom:0;margin-left:1.5em}div.sidebar{margin:0 0 .5em 1em;border:medium outset;padding:1em;background-color:#ffe;width:40%;float:right;clear:right}div.sidebar p.rubric{font-family:sans-serif;font-size:medium}div.system-messages{margin:5em}div.system-messages h1{color:red}div.system-message{border:medium outset;padding:1em}div.system-message p.system-message-title{color:red;font-weight:bold}div.topic{margin:2em}h1.section-subtitle,h2.section-subtitle,h3.section-subtitle,h4.section-subtitle,h5.section-subtitle,h6.section-subtitle{margin-top:.4em}h1.title{text-align:center}h2.subtitle{text-align:center}hr.docutils{width:75%}img.align-left,.figure.align-left,object.align-left{clear:left;float:left;margin-right:1em}img.align-right,.figure.align-right,object.align-right{clear:right;float:right;margin-left:1em}img.align-center,.figure.align-center,object.align-center{display:block;margin-left:auto;margin-right:auto}.align-left{text-align:left}.align-center{clear:both;text-align:center}.align-right{text-align:right}div.align-right{text-align:inherit}ol.simple,ul.simple{margin-bottom:1em}ol.arabic{list-style:decimal}ol.loweralpha{list-style:lower-alpha}ol.upperalpha{list-style:upper-alpha}ol.lowerroman{list-style:lower-roman}ol.upperroman{list-style:upper-roman}p.attribution{text-align:right;margin-left:50%}p.caption{font-style:italic}p.credits{font-style:italic;font-size:smaller}p.label{white-space:nowrap}p.rubric{font-weight:bold;font-size:larger;color:maroon;text-align:center}p.sidebar-title{font-family:sans-serif;font-weight:bold;font-size:larger}p.sidebar-subtitle{font-family:sans-serif;font-weight:bold}p.topic-title{font-weight:bold}pre.address{margin-bottom:0;margin-top:0;font:inherit}pre.literal-block,pre.doctest-block,pre.math,pre.code{margin-left:2em;margin-right:2em}pre.code .ln{color:grey}pre.code,code{background-color:#eee}pre.code .comment,code .comment{color:#5c6576}pre.code .keyword,code .keyword{color:#3b0d06;font-weight:bold}pre.code .literal.string,code .literal.string{color:#0c5404}pre.code .name.builtin,code .name.builtin{color:#352b84}pre.code .deleted,code .deleted{background-color:#deb0a1}pre.code .inserted,code .inserted{background-color:#a3d289}span.classifier{font-family:sans-serif;font-style:oblique}span.classifier-delimiter{font-family:sans-serif;font-weight:bold}span.interpreted{font-family:sans-serif}span.option{white-space:nowrap}span.pre{white-space:pre}span.problematic{color:red}span.section-subtitle{font-size:80%}table.citation{border-left:solid 1px gray;margin-left:1px}table.docinfo{margin:2em 4em}table.docutils{margin-top:.5em;margin-bottom:.5em}table.footnote{border-left:solid 1px black;margin-left:1px}table.docutils td,table.docutils th,table.docinfo td,table.docinfo th{padding-left:.5em;padding-right:.5em;vertical-align:top}table.docutils th.field-name,table.docinfo th.docinfo-name{font-weight:bold;text-align:left;white-space:nowrap;padding-left:0}table.docutils.booktabs{border:0;border-top:2px solid;border-bottom:2px solid;border-collapse:collapse}table.docutils.booktabs *{border:0}table.docutils.booktabs th{border-bottom:thin solid;text-align:left}h1 tt.docutils,h2 tt.docutils,h3 tt.docutils,h4 tt.docutils,h5 tt.docutils,h6 tt.docutils{font-size:100%}ul.auto-toc{list-style-type:none}
\ No newline at end of file
......@@ -6,6 +6,7 @@ from pymongo import MongoClient
from config import MONGO_PORT
import content
import datetime
import time
import forms
from error import UsageError
import nltk.data
......@@ -20,13 +21,17 @@ tokenizer = RegexpTokenizer(r'\w+')
def require_human(view):
@wraps(view)
def protected_view(*args, **kwargs):
if loggedin():
if is_human():
return view(*args, **kwargs)
else:
raise UsageError('not human!')
return protected_view
def is_human():
return session.get('human') == 'yes'
def success():
return jsonify({
'ok': 1
......@@ -44,7 +49,7 @@ def handle_error(error):
def index():
css = digest('mturk/highlight.css')
js = digest('mturk/highlight.js')
if session.get('human') != 'yes':
if not is_human():
form = forms.BeginHIT()
if form.validate_on_submit():
session['human'] = 'yes'
......@@ -53,10 +58,12 @@ def index():
article = get_next_doc()
n_sentences = len(article['full'])
# minimum reading time in milliseconds (at 700 wpm, fast skimming pace)
minimum_time = int(100 * (float(6 * len(tokenizer.tokenize(article['full']))) / 7))
# minimum reading time in milliseconds (at 750 wpm, fast skimming pace)
minimum_time = int(100 * (float(60 * len(tokenizer.tokenize(article['full']))) / 75))
article['full'] = sent_detector.tokenize(article['full'].strip())
session['minimum_time'] = minimum_time
session['started_reading'] = time.time()
session['n_sentences'] = len(article['full'])
session['reading_url'] = article['url']
......@@ -71,18 +78,29 @@ def index():
@mturk.route('/mark_available')
@require_human
def mark_available():
toggle_being_read(get_collection(), session['reading_url'], False)
return success()
@mturk.route('/submit', methods=['GET', 'POST'])
@require_human
def update_doc(data, url):
def update_doc():
if 'checked' not in request.args:
raise UsageError('missing ``checked``!')
raise UsageError('missing ``checked`` arg!')
inds = request.args['checked'].split(',')
n_inds = len(inds)
if time.time() - session['started_reading'] < (float(session['minimum_time']) / 1000):
raise UsageError('reading speed too fast')
if n_inds > session['n_sentences'] or n_inds < 1:
raise UsageError('no or too many highlights')
col = get_collection()
url = session['reading_url']
increment_reads(col, url)
toggle_being_read(col, url, False)
print('\n\n\ndone\n\n\n')
return success()
......
html,ul,body,header,input,span,form{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}html{font-family:Open Sans, Myriad Pro, Calibri, Droid Sans, Trebuchet MS, Sans-serif;height:100%}input{outline:0;box-shadow:none}img{max-width:100%;height:auto;margin:auto}a{color:#61748c;font-weight:700;outline:0;-webkit-transition:all 0.1s ease-in-out 0s;-moz-transition:all 0.1s ease-in-out 0s;-ms-transition:all 0.1s ease-in-out 0s;transition:all 0.1s ease-in-out 0s;text-decoration:none}a:hover,a:active{background-color:#eee;color:#800}a:active{border-bottom:1px solid #ccc}input.field{font-size:16px;padding:6px 12px;color:#555;border-bottom:1px dashed #d9d9d9;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;border-radius:1px;margin:0 auto;margin-bottom:5px;height:20px;width:70%;text-align:center}input[type="submit"]{font-size:90%;cursor:pointer;min-width:100px;height:40px;background-color:#e9e9e9;border:1px solid #c3c3c3;color:#333;padding:4px;outline:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;-webkit-transition:all 0.15s ease-in-out 0s;-moz-transition:all 0.15s ease-in-out 0s;-ms-transition:all 0.15s ease-in-out 0s;transition:all 0.15s ease-in-out 0s}input[type="submit"]:hover{border:1px solid #a3a3a3}input[type="submit"]:focus,input[type="submit"]:active{outline:0}input[type="submit"]:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}input::-moz-focus-inner{border:0}footer{margin:5em 0 0.5em 0;width:95%;color:#b0b0b0;font-size:12px;text-align:center}footer p{padding-top:10px}div#message,div#error{position:fixed;font-size:90%;overflow:hidden;padding:3px;top:0;background-color:#a3a3a3;color:#fff;text-align:center;width:100%}div#message a,div#error a{color:#fff}div#error{background-color:#edb43a}html,ul,body,header,input,span,form{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}html{font-family:Open Sans, Myriad Pro, Calibri, Droid Sans, Trebuchet MS, Sans-serif;height:100%}input{outline:0;box-shadow:none}img{max-width:100%;height:auto;margin:auto}a{color:#61748c;font-weight:700;outline:0;-webkit-transition:all 0.1s ease-in-out 0s;-moz-transition:all 0.1s ease-in-out 0s;-ms-transition:all 0.1s ease-in-out 0s;transition:all 0.1s ease-in-out 0s;text-decoration:none}a:hover,a:active{background-color:#eee;color:#800}a:active{border-bottom:1px solid #ccc}input.field{font-size:16px;padding:6px 12px;color:#555;border-bottom:1px dashed #d9d9d9;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;border-radius:1px;margin:0 auto;margin-bottom:5px;height:20px;width:70%;text-align:center}input[type="submit"]{font-size:90%;cursor:pointer;min-width:100px;height:40px;background-color:#e9e9e9;border:1px solid #c3c3c3;color:#333;padding:4px;outline:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;-webkit-transition:all 0.15s ease-in-out 0s;-moz-transition:all 0.15s ease-in-out 0s;-ms-transition:all 0.15s ease-in-out 0s;transition:all 0.15s ease-in-out 0s}input[type="submit"]:hover{border:1px solid #a3a3a3}input[type="submit"]:focus,input[type="submit"]:active{outline:0}input[type="submit"]:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}input::-moz-focus-inner{border:0}footer{margin:5em 0 0.5em 0;width:95%;color:#b0b0b0;font-size:12px;text-align:center}footer p{padding-top:10px}div#message,div#error{position:fixed;font-size:90%;overflow:hidden;padding:3px;top:0;background-color:#a3a3a3;color:#fff;text-align:center;width:100%}div#message a,div#error a{color:#fff}div#error{background-color:#edb43a}ul.articles,ul.tweets{margin:0 auto;width:400px}ul.articles li,ul.tweets li{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;column-break-inside:avoid;list-style:none}ul.articles{-webkit-column-count:1;-moz-column-count:1;column-count:1;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}ul.articles li{width:400px;margin-bottom:2em}ul.tweets{margin-top:2em;width:310px;-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:5px;-moz-column-gap:5px;column-gap:5px}ul.tweets li{width:150px;margin-bottom:5px}div.article,div.tweet{padding-bottom:10px;background-color:#fff;border:2px solid #efefef;position:relative;font-size:14px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px}div.article p{padding:5px}div.article a.title{color:#000;padding:3px 5px 5px 5px;margin-top:5px;margin-bottom:2px;font-size:28px;display:block}div.article a.title:hover,div.article a.title:active{background-color:rgba(255,255,255,0);border-bottom:none}div.article p.url{padding:5px;border-top:1px solid #e5e5e5;background-image:url("img/url.png");background-repeat:no-repeat;padding:10px 0 0 30px;height:30px;display:block;margin-bottom:-10px}div.article p.url a{color:#04bff4;text-decoration:none;width:385px;display:block;position:relative}div.article p.url a:hover,div.article p.url a:active{background-color:transparent;border-bottom:none}div.article img{width:100%}div.tweet{-webkit-transition:all 0.4s ease-in-out 0s;-moz-transition:all 0.4s ease-in-out 0s;-ms-transition:all 0.4s ease-in-out 0s;transition:all 0.4s ease-in-out 0s;padding:2px;overflow:hidden}div.tweet a{color:inherit;text-decoration:none}div.mad{border:2px solid #f90101}div.happy{border:2px solid #00933b}div.hovering{color:#000}div.no-hover{color:#c3c3c3;border:2px solid #f9f9f9}div.most-controversial{border:3px solid #f90101}div.least-controversial{border:3px solid #00933b}@media (min-width: 920px){ul.tweets{width:850px;-webkit-column-count:4;-moz-column-count:4;column-count:4}ul.tweets li{width:180px}}@media (max-width: 550px){ul.articles{width:320px}ul.articles li{width:315px}}footer{display:none}header{z-index:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;cursor:default;width:100%;height:55px;line-height:55px;background:#fff;border-bottom:1px solid #efefef;position:fixed;font-size:14px}header>div{padding:0 15px 0 5px;display:inline}header>div>a.mini{display:none}header>div a:active,header>div a:hover{border-bottom:none}header>div h1{text-align:left;display:inline;font-size:25px;opacity:0.8;font-variant:small-caps}header>div span#subtitle{opacity:0.4;padding-left:5px}header>div span#right-header{float:right;padding-right:10px}header>div form{display:inline}header>div>form input{font-size:16px;padding:6px 12px;line-height:1.5;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;border-bottom:1px solid #d9d9d9;margin:0 auto;height:15px;width:30%}header>div>form input:focus{background-color:#f1f8fb;color:#2b6dad}header input[type='text'].top_loading{background:url("img/loading.gif") no-repeat;background-position:98% 50%;background-size:20px 20px}main{padding:6em 1em}main input.loading{background:url("img/loading.gif") no-repeat;background-size:20px 20px;padding:10px 10px 10px 36px;background-position:10% 50%}main>form{margin-bottom:10px;text-align:center}main>form input[type="text"]{margin-bottom:10px;width:275px;border-bottom:1px solid #d9d9d9}main>form input[type="text"]:focus{color:#2b6dad;background-color:#f1f8fb}main div.featured_keywords{display:table;padding-bottom:1em;margin:0 auto}main div.featured_keywords dl.left{float:left;width:50%}main div.featured_keywords dl.right{float:right;width:50%}main div.featured_keywords dt{float:left;width:7.5em;padding:1ex .5em 0 .5em;text-align:right;font-weight:bold}main div.featured_keywords dd{margin:0 0 0 8.5em;padding:1ex 0.5em;text-align:left;border-left:1px solid #888}main div.featured_keywords dd span{white-space:nowrap}main ul.details{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;column-break-inside:avoid;list-style:none;margin:0 0 10px 0;padding:0}main ul.details li{display:inline}main ul.details li>span{line-height:30px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;border:1px solid #d9d9d9;padding:2px}main article{text-align:justify}main article a,main article a:hover,main article a:active{border-bottom:none;color:#fff;background-color:#337ab7}main article a{font-weight:700}main article a:hover,main article a:active{background-color:#2e6da4}main article+p{-webkit-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-ms-transition:all 0.3s ease-in-out 0s;transition:all 0.3s ease-in-out 0s;opacity:0.6}main article+p:hover{opacity:1.0}main mark{line-height:25px;color:#2b6dad;background-color:#f1f8fb;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;padding:2px}main .disabled{cursor:not-allowed;background-color:#f9f9f9}main .disabled:active{color:#fff;background-color:#edb43a}span.danger{color:#fff;background-color:#d43f3a;padding:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px}figcaption{margin:10px 0 10px 0}@media (max-width: 700px){header>div h1{font-size:22px}header>div span#right-header,header>div>a{font-size:12px}.non-essentials{display:none}}@media (max-width: 520px){main div.featured_keywords dl.left,main div.featured_keywords dl.right{float:none}span.danger{display:block}input[type='text'].top_loading{height:40px}}@media (max-width: 415px){header>div>a.mini{display:inline}header>div>a.lg{display:none}}main{padding:4em 1em}ul{margin:10px 10px 4em 10px;list-style:square}ul li{margin-left:20px}ul p{float:right;text-align:right}h3{border-bottom:1px dashed #d9d9d9;padding:5px;font-variant:small-caps;font-weight:400}ul.issues_list{list-style:none}form{padding:5px;border:1px solid #e9e9e9;display:inline-block}form #bug b{color:#f90101}form input{color:#edb43a}@media (max-width: 650px){input{display:block}}
/*# sourceMappingURL=account.css.map */
@import url(loading-bar.min.css);html,ul,body,header,input,span,form{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}html{font-family:Open Sans, Myriad Pro, Calibri, Droid Sans, Trebuchet MS, Sans-serif;height:100%}input{outline:0;box-shadow:none}img{max-width:100%;height:auto;margin:auto}a{color:#61748c;font-weight:700;outline:0;-webkit-transition:all 0.1s ease-in-out 0s;-moz-transition:all 0.1s ease-in-out 0s;-ms-transition:all 0.1s ease-in-out 0s;transition:all 0.1s ease-in-out 0s;text-decoration:none}a:hover,a:active{background-color:#eee;color:#800}a:active{border-bottom:1px solid #ccc}input.field{font-size:16px;padding:6px 12px;color:#555;border-bottom:1px dashed #d9d9d9;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;border-radius:1px;margin:0 auto;margin-bottom:5px;height:20px;width:70%;text-align:center}input[type="submit"]{font-size:90%;cursor:pointer;min-width:100px;height:40px;background-color:#e9e9e9;border:1px solid #c3c3c3;color:#333;padding:4px;outline:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;-webkit-transition:all 0.15s ease-in-out 0s;-moz-transition:all 0.15s ease-in-out 0s;-ms-transition:all 0.15s ease-in-out 0s;transition:all 0.15s ease-in-out 0s}input[type="submit"]:hover{border:1px solid #a3a3a3}input[type="submit"]:focus,input[type="submit"]:active{outline:0}input[type="submit"]:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}input::-moz-focus-inner{border:0}footer{margin:5em 0 0.5em 0;width:95%;color:#b0b0b0;font-size:12px;text-align:center}footer p{padding-top:10px}div#message,div#error{position:fixed;font-size:90%;overflow:hidden;padding:3px;top:0;background-color:#a3a3a3;color:#fff;text-align:center;width:100%}div#message a,div#error a{color:#fff}div#error{background-color:#edb43a}html,ul,body,header,input,span,form{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}html{font-family:Open Sans, Myriad Pro, Calibri, Droid Sans, Trebuchet MS, Sans-serif;height:100%}input{outline:0;box-shadow:none}img{max-width:100%;height:auto;margin:auto}a{color:#61748c;font-weight:700;outline:0;-webkit-transition:all 0.1s ease-in-out 0s;-moz-transition:all 0.1s ease-in-out 0s;-ms-transition:all 0.1s ease-in-out 0s;transition:all 0.1s ease-in-out 0s;text-decoration:none}a:hover,a:active{background-color:#eee;color:#800}a:active{border-bottom:1px solid #ccc}input.field{font-size:16px;padding:6px 12px;color:#555;border-bottom:1px dashed #d9d9d9;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;border-radius:1px;margin:0 auto;margin-bottom:5px;height:20px;width:70%;text-align:center}input[type="submit"]{font-size:90%;cursor:pointer;min-width:100px;height:40px;background-color:#e9e9e9;border:1px solid #c3c3c3;color:#333;padding:4px;outline:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;-webkit-transition:all 0.15s ease-in-out 0s;-moz-transition:all 0.15s ease-in-out 0s;-ms-transition:all 0.15s ease-in-out 0s;transition:all 0.15s ease-in-out 0s}input[type="submit"]:hover{border:1px solid #a3a3a3}input[type="submit"]:focus,input[type="submit"]:active{outline:0}input[type="submit"]:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}input::-moz-focus-inner{border:0}footer{margin:5em 0 0.5em 0;width:95%;color:#b0b0b0;font-size:12px;text-align:center}footer p{padding-top:10px}div#message,div#error{position:fixed;font-size:90%;overflow:hidden;padding:3px;top:0;background-color:#a3a3a3;color:#fff;text-align:center;width:100%}div#message a,div#error a{color:#fff}div#error{background-color:#edb43a}ul.articles,ul.tweets{margin:0 auto;width:400px}ul.articles li,ul.tweets li{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;column-break-inside:avoid;list-style:none}ul.articles{-webkit-column-count:1;-moz-column-count:1;column-count:1;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}ul.articles li{width:400px;margin-bottom:2em}ul.tweets{margin-top:2em;width:310px;-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:5px;-moz-column-gap:5px;column-gap:5px}ul.tweets li{width:150px;margin-bottom:5px}div.article,div.tweet{padding-bottom:10px;background-color:#fff;border:2px solid #efefef;position:relative;font-size:14px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px}div.article p{padding:5px}div.article a.title{color:#000;padding:3px 5px 5px 5px;margin-top:5px;margin-bottom:2px;font-size:28px;display:block}div.article a.title:hover,div.article a.title:active{background-color:rgba(255,255,255,0);border-bottom:none}div.article p.url{padding:5px;border-top:1px solid #e5e5e5;background-image:url("img/url.png");background-repeat:no-repeat;padding:10px 0 0 30px;height:30px;display:block;margin-bottom:-10px}div.article p.url a{color:#04bff4;text-decoration:none;width:385px;display:block;position:relative}div.article p.url a:hover,div.article p.url a:active{background-color:transparent;border-bottom:none}div.article img{width:100%}div.tweet{-webkit-transition:all 0.4s ease-in-out 0s;-moz-transition:all 0.4s ease-in-out 0s;-ms-transition:all 0.4s ease-in-out 0s;transition:all 0.4s ease-in-out 0s;padding:2px;overflow:hidden}div.tweet a{color:inherit;text-decoration:none}div.mad{border:2px solid #f90101}div.happy{border:2px solid #00933b}div.hovering{color:#000}div.no-hover{color:#c3c3c3;border:2px solid #f9f9f9}div.most-controversial{border:3px solid #f90101}div.least-controversial{border:3px solid #00933b}@media (min-width: 920px){ul.tweets{width:850px;-webkit-column-count:4;-moz-column-count:4;column-count:4}ul.tweets li{width:180px}}@media (max-width: 550px){ul.articles{width:320px}ul.articles li{width:315px}}footer{display:none}header{z-index:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;cursor:default;width:100%;height:55px;line-height:55px;background:#fff;border-bottom:1px solid #efefef;position:fixed;font-size:14px}header>div{padding:0 15px 0 5px;display:inline}header>div>a.mini{display:none}header>div a:active,header>div a:hover{border-bottom:none}header>div h1{text-align:left;display:inline;font-size:25px;opacity:0.8;font-variant:small-caps}header>div span#subtitle{opacity:0.4;padding-left:5px}header>div span#right-header{float:right;padding-right:10px}header>div form{display:inline}header>div>form input{font-size:16px;padding:6px 12px;line-height:1.5;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;border-bottom:1px solid #d9d9d9;margin:0 auto;height:15px;width:30%}header>div>form input:focus{background-color:#f1f8fb;color:#2b6dad}header input[type='text'].top_loading{background:url("img/loading.gif") no-repeat;background-position:98% 50%;background-size:20px 20px}main{padding:6em 1em}main input.loading{background:url("img/loading.gif") no-repeat;background-size:20px 20px;padding:10px 10px 10px 36px;background-position:10% 50%}main>form{margin-bottom:10px;text-align:center}main>form input[type="text"]{margin-bottom:10px;width:275px;border-bottom:1px solid #d9d9d9}main>form input[type="text"]:focus{color:#2b6dad;background-color:#f1f8fb}main div.featured_keywords{display:table;padding-bottom:1em;margin:0 auto}main div.featured_keywords dl.left{float:left;width:50%}main div.featured_keywords dl.right{float:right;width:50%}main div.featured_keywords dt{float:left;width:7.5em;padding:1ex .5em 0 .5em;text-align:right;font-weight:bold}main div.featured_keywords dd{margin:0 0 0 8.5em;padding:1ex 0.5em;text-align:left;border-left:1px solid #888}main div.featured_keywords dd span{white-space:nowrap}main ul.details{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;column-break-inside:avoid;list-style:none;margin:0 0 10px 0;padding:0}main ul.details li{display:inline}main ul.details li>span{line-height:30px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;border:1px solid #d9d9d9;padding:2px}main article{text-align:justify}main article a,main article a:hover,main article a:active{border-bottom:none;color:#fff;background-color:#337ab7}main article a{font-weight:700}main article a:hover,main article a:active{background-color:#2e6da4}main article+p{-webkit-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-ms-transition:all 0.3s ease-in-out 0s;transition:all 0.3s ease-in-out 0s;opacity:0.6}main article+p:hover{opacity:1.0}main mark{line-height:25px;color:#2b6dad;background-color:#f1f8fb;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;padding:2px}main .disabled{cursor:not-allowed;background-color:#f9f9f9}main .disabled:active{color:#fff;background-color:#edb43a}span.danger{color:#fff;background-color:#d43f3a;padding:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px}figcaption{margin:10px 0 10px 0}@media (max-width: 700px){header>div h1{font-size:22px}header>div span#right-header,header>div>a{font-size:12px}.non-essentials{display:none}}@media (max-width: 520px){main div.featured_keywords dl.left,main div.featured_keywords dl.right{float:none}span.danger{display:block}input[type='text'].top_loading{height:40px}}@media (max-width: 415px){header>div>a.mini{display:inline}header>div>a.lg{display:none}}ul.articles,ul.tweets{margin:0 auto;width:400px}ul.articles li,ul.tweets li{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;column-break-inside:avoid;list-style:none}ul.articles{-webkit-column-count:1;-moz-column-count:1;column-count:1;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}ul.articles li{width:400px;margin-bottom:2em}ul.tweets{margin-top:2em;width:310px;-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:5px;-moz-column-gap:5px;column-gap:5px}ul.tweets li{width:150px;margin-bottom:5px}div.article,div.tweet{padding-bottom:10px;background-color:#fff;border:2px solid #efefef;position:relative;font-size:14px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px}div.article p{padding:5px}div.article a.title{color:#000;padding:3px 5px 5px 5px;margin-top:5px;margin-bottom:2px;font-size:28px;display:block}div.article a.title:hover,div.article a.title:active{background-color:rgba(255,255,255,0);border-bottom:none}div.article p.url{padding:5px;border-top:1px solid #e5e5e5;background-image:url("img/url.png");background-repeat:no-repeat;padding:10px 0 0 30px;height:30px;display:block;margin-bottom:-10px}div.article p.url a{color:#04bff4;text-decoration:none;width:385px;display:block;position:relative}div.article p.url a:hover,div.article p.url a:active{background-color:transparent;border-bottom:none}div.article img{width:100%}div.tweet{-webkit-transition:all 0.4s ease-in-out 0s;-moz-transition:all 0.4s ease-in-out 0s;-ms-transition:all 0.4s ease-in-out 0s;transition:all 0.4s ease-in-out 0s;padding:2px;overflow:hidden}div.tweet a{color:inherit;text-decoration:none}div.mad{border:2px solid #f90101}div.happy{border:2px solid #00933b}div.hovering{color:#000}div.no-hover{color:#c3c3c3;border:2px solid #f9f9f9}div.most-controversial{border:3px solid #f90101}div.least-controversial{border:3px solid #00933b}@media (min-width: 920px){ul.tweets{width:850px;-webkit-column-count:4;-moz-column-count:4;column-count:4}ul.tweets li{width:180px}}@media (max-width: 550px){ul.articles{width:320px}ul.articles li{width:315px}}.pointer{cursor:pointer}
/*# sourceMappingURL=app.css.map */
html,ul,body,header,input,span,form{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}html{font-family:Open Sans, Myriad Pro, Calibri, Droid Sans, Trebuchet MS, Sans-serif;height:100%}input{outline:0;box-shadow:none}img{max-width:100%;height:auto;margin:auto}a{color:#61748c;font-weight:700;outline:0;-webkit-transition:all 0.1s ease-in-out 0s;-moz-transition:all 0.1s ease-in-out 0s;-ms-transition:all 0.1s ease-in-out 0s;transition:all 0.1s ease-in-out 0s;text-decoration:none}a:hover,a:active{background-color:#eee;color:#800}a:active{border-bottom:1px solid #ccc}input.field{font-size:16px;padding:6px 12px;color:#555;border-bottom:1px dashed #d9d9d9;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;border-radius:1px;margin:0 auto;margin-bottom:5px;height:20px;width:70%;text-align:center}input[type="submit"]{font-size:90%;cursor:pointer;min-width:100px;height:40px;background-color:#e9e9e9;border:1px solid #c3c3c3;color:#333;padding:4px;outline:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;-webkit-transition:all 0.15s ease-in-out 0s;-moz-transition:all 0.15s ease-in-out 0s;-ms-transition:all 0.15s ease-in-out 0s;transition:all 0.15s ease-in-out 0s}input[type="submit"]:hover{border:1px solid #a3a3a3}input[type="submit"]:focus,input[type="submit"]:active{outline:0}input[type="submit"]:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}input::-moz-focus-inner{border:0}footer{margin:5em 0 0.5em 0;width:95%;color:#b0b0b0;font-size:12px;text-align:center}footer p{padding-top:10px}div#message,div#error{position:fixed;font-size:90%;overflow:hidden;padding:3px;top:0;background-color:#a3a3a3;color:#fff;text-align:center;width:100%}div#message a,div#error a{color:#fff}div#error{background-color:#edb43a}ul.articles,ul.tweets{margin:0 auto;width:400px}ul.articles li,ul.tweets li{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;column-break-inside:avoid;list-style:none}ul.articles{-webkit-column-count:1;-moz-column-count:1;column-count:1;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}ul.articles li{width:400px;margin-bottom:2em}ul.tweets{margin-top:2em;width:310px;-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:5px;-moz-column-gap:5px;column-gap:5px}ul.tweets li{width:150px;margin-bottom:5px}div.article,div.tweet{padding-bottom:10px;background-color:#fff;border:2px solid #efefef;position:relative;font-size:14px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px}div.article p{padding:5px}div.article a.title{color:#000;padding:3px 5px 5px 5px;margin-top:5px;margin-bottom:2px;font-size:28px;display:block}div.article a.title:hover,div.article a.title:active{background-color:rgba(255,255,255,0);border-bottom:none}div.article p.url{padding:5px;border-top:1px solid #e5e5e5;background-image:url("img/url.png");background-repeat:no-repeat;padding:10px 0 0 30px;height:30px;display:block;margin-bottom:-10px}div.article p.url a{color:#04bff4;text-decoration:none;width:385px;display:block;position:relative}div.article p.url a:hover,div.article p.url a:active{background-color:transparent;border-bottom:none}div.article img{width:100%}div.tweet{-webkit-transition:all 0.4s ease-in-out 0s;-moz-transition:all 0.4s ease-in-out 0s;-ms-transition:all 0.4s ease-in-out 0s;transition:all 0.4s ease-in-out 0s;padding:2px;overflow:hidden}div.tweet a{color:inherit;text-decoration:none}div.mad{border:2px solid #f90101}div.happy{border:2px solid #00933b}div.hovering{color:#000}div.no-hover{color:#c3c3c3;border:2px solid #f9f9f9}div.most-controversial{border:3px solid #f90101}div.least-controversial{border:3px solid #00933b}@media (min-width: 920px){ul.tweets{width:850px;-webkit-column-count:4;-moz-column-count:4;column-count:4}ul.tweets li{width:180px}}@media (max-width: 550px){ul.articles{width:320px}ul.articles li{width:315px}}footer{display:none}header{z-index:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;cursor:default;width:100%;height:55px;line-height:55px;background:#fff;border-bottom:1px solid #efefef;position:fixed;font-size:14px}header>div{padding:0 15px 0 5px;display:inline}header>div>a.mini{display:none}header>div a:active,header>div a:hover{border-bottom:none}header>div h1{text-align:left;display:inline;font-size:25px;opacity:0.8;font-variant:small-caps}header>div span#subtitle{opacity:0.4;padding-left:5px}header>div span#right-header{float:right;padding-right:10px}header>div form{display:inline}header>div>form input{font-size:16px;padding:6px 12px;line-height:1.5;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;border-bottom:1px solid #d9d9d9;margin:0 auto;height:15px;width:30%}header>div>form input:focus{background-color:#f1f8fb;color:#2b6dad}header input[type='text'].top_loading{background:url("img/loading.gif") no-repeat;background-position:98% 50%;background-size:20px 20px}main{padding:6em 1em}main input.loading{background:url("img/loading.gif") no-repeat;background-size:20px 20px;padding:10px 10px 10px 36px;background-position:10% 50%}main>form{margin-bottom:10px;text-align:center}main>form input[type="text"]{margin-bottom:10px;width:275px;border-bottom:1px solid #d9d9d9}main>form input[type="text"]:focus{color:#2b6dad;background-color:#f1f8fb}main div.featured_keywords{display:table;padding-bottom:1em;margin:0 auto}main div.featured_keywords dl.left{float:left;width:50%}main div.featured_keywords dl.right{float:right;width:50%}main div.featured_keywords dt{float:left;width:7.5em;padding:1ex .5em 0 .5em;text-align:right;font-weight:bold}main div.featured_keywords dd{margin:0 0 0 8.5em;padding:1ex 0.5em;text-align:left;border-left:1px solid #888}main div.featured_keywords dd span{white-space:nowrap}main ul.details{-webkit-column-break-inside:avoid;-moz-column-break-inside:avoid;-ms-column-break-inside:avoid;column-break-inside:avoid;list-style:none;margin:0 0 10px 0;padding:0}main ul.details li{display:inline}main ul.details li>span{line-height:30px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;border:1px solid #d9d9d9;padding:2px}main article{text-align:justify}main article a,main article a:hover,main article a:active{border-bottom:none;color:#fff;background-color:#337ab7}main article a{font-weight:700}main article a:hover,main article a:active{background-color:#2e6da4}main article+p{-webkit-transition:all 0.3s ease-in-out 0s;-moz-transition:all 0.3s ease-in-out 0s;-ms-transition:all 0.3s ease-in-out 0s;transition:all 0.3s ease-in-out 0s;opacity:0.6}main article+p:hover{opacity:1.0}main mark{line-height:25px;color:#2b6dad;background-color:#f1f8fb;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;padding:2px}main .disabled{cursor:not-allowed;background-color:#f9f9f9}main .disabled:active{color:#fff;background-color:#edb43a}span.danger{color:#fff;background-color:#d43f3a;padding:2px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px}figcaption{margin:10px 0 10px 0}@media (max-width: 700px){header>div h1{font-size:22px}header>div span#right-header,header>div>a{font-size:12px}.non-essentials{display:none}}@media (max-width: 520px){main div.featured_keywords dl.left,main div.featured_keywords dl.right{float:none}span.danger{display:block}input[type='text'].top_loading{height:40px}}@media (max-width: 415px){header>div>a.mini{display:inline}header>div>a.lg{display:none}}
/*# sourceMappingURL=home.css.map */
#loading-bar,#loading-bar-spinner{pointer-events:none;-webkit-pointer-events:none;-webkit-transition:350ms linear all;-moz-transition:350ms linear all;-o-transition:350ms linear all;transition:350ms linear all}#loading-bar-spinner.ng-enter,#loading-bar-spinner.ng-leave.ng-leave-active,#loading-bar.ng-enter,#loading-bar.ng-leave.ng-leave-active{opacity:0}#loading-bar-spinner.ng-enter.ng-enter-active,#loading-bar-spinner.ng-leave,#loading-bar.ng-enter.ng-enter-active,#loading-bar.ng-leave{opacity:1}#loading-bar .bar{-webkit-transition:width 350ms;-moz-transition:width 350ms;-o-transition:width 350ms;transition:width 350ms;background:#29d;position:fixed;z-index:10002;top:0;left:0;width:100%;height:2px;border-bottom-right-radius:1px;border-top-right-radius:1px}#loading-bar .peg{position:absolute;width:70px;right:0;top:0;height:2px;opacity:.45;-moz-box-shadow:#29d 1px 0 6px 1px;-ms-box-shadow:#29d 1px 0 6px 1px;-webkit-box-shadow:#29d 1px 0 6px 1px;box-shadow:#29d 1px 0 6px 1px;-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%}#loading-bar-spinner{display:block;position:fixed;z-index:10002;top:10px;left:10px}#loading-bar-spinner .spinner-icon{width:14px;height:14px;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:loading-bar-spinner 400ms linear infinite;-moz-animation:loading-bar-spinner 400ms linear infinite;-ms-animation:loading-bar-spinner 400ms linear infinite;-o-animation:loading-bar-spinner 400ms linear infinite;animation:loading-bar-spinner 400ms linear infinite}@-webkit-keyframes loading-bar-spinner{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-moz-keyframes loading-bar-spinner{0%{-moz-transform:rotate(0);transform:rotate(0)}100%{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-o-keyframes loading-bar-spinner{0%{-o-transform:rotate(0);transform:rotate(0)}100%{-o-transform:rotate(360deg);transform:rotate(360deg)}}@-ms-keyframes loading-bar-spinner{0%{-ms-transform:rotate(0);transform:rotate(0)}100%{-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loading-bar-spinner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}
\ No newline at end of file
html,ul,body,header,input,span,form{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}html{font-family:Open Sans, Myriad Pro, Calibri, Droid Sans, Trebuchet MS, Sans-serif;height:100%}input{outline:0;box-shadow:none}img{max-width:100%;height:auto;margin:auto}a{color:#61748c;font-weight:700;outline:0;-webkit-transition:all 0.1s ease-in-out 0s;-moz-transition:all 0.1s ease-in-out 0s;-ms-transition:all 0.1s ease-in-out 0s;transition:all 0.1s ease-in-out 0s;text-decoration:none}a:hover,a:active{background-color:#eee;color:#800}a:active{border-bottom:1px solid #ccc}input.field{font-size:16px;padding:6px 12px;color:#555;border-bottom:1px dashed #d9d9d9;-webkit-border-radius:1px;-moz-border-radius:1px;-ms-border-radius:1px;border-radius:1px;margin:0 auto;margin-bottom:5px;height:20px;width:70%;text-align:center}input[type="submit"]{font-size:90%;cursor:pointer;min-width:100px;height:40px;background-color:#e9e9e9;border:1px solid #c3c3c3;color:#333;padding:4px;outline:0;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;border-radius:2px;-webkit-transition:all 0.15s ease-in-out 0s;-moz-transition:all 0.15s ease-in-out 0s;-ms-transition:all 0.15s ease-in-out 0s;transition:all 0.15s ease-in-out 0s}input[type="submit"]:hover{border:1px solid #a3a3a3}input[type="submit"]:focus,input[type="submit"]:active{outline:0}input[type="submit"]:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}input::-moz-focus-inner{border:0}footer{margin:5em 0 0.5em 0;width:95%;color:#b0b0b0;font-size:12px;text-align:center}footer p{padding-top:10px}div#message,div#error{position:fixed;font-size:90%;overflow:hidden;padding:3px;top:0;background-color:#a3a3a3;color:#fff;text-align:center;width:100%}div#message a,div#error a{color:#fff}div#error{background-color:#edb43a}div#login{padding:1px 5px 20px 5px;text-align:center;-webkit-box-shadow:0 1px 2px 2px #eee;-moz-box-shadow:0 1px 2px 2px #eee;-ms-box-shadow:0 1px 2px 2px #eee;box-shadow:0 1px 2px 2px #eee;width:450px;margin:5em auto 0 auto}div#login form{margin-top:10px}div#login div.g-recaptcha{display:table;margin:0 auto}div#login span#details{font-size:16px}div#login h1{font-size:26px;font-variant:small-caps;margin:20px 0 5px 0}@media (max-width: 520px){div#login{width:350px}div#login h1{font-size:22px}div#login span#details{font-size:14px}}@media (max-width: 390px){div#login{width:320px}}@media (max-width: 330px){div#login{width:250px}}
/*# sourceMappingURL=login.css.map */
This diff is collapsed.
@import url(bootstrap.min.css);*{font-family:'Open Sans', 'Roboto', 'Ubuntu', 'Source Sans Pro', 'Helvetica Nueue', 'Helvetica', sans-serif}h1{font-weight:700}blockquote{font-size:16px}blockquote.good{background-color:#dff0d8;border-left:5px solid #3c763d}blockquote.bad{background-color:#f2dede;border-left:5px solid #a94442}.col-md-3{background-color:#eee}#full_article{font-size:16px}#full_article span{cursor:pointer}#full_article span.controversial{color:#bada55;background-color:#800}#copyright{margin-bottom:14em}.top_bar{height:8px;background-color:#d9d9d9;margin-bottom:12px}#full_article{text-align:justify}#bot_bar{position:fixed;z-index:1;bottom:0}#bot_bar .col-md-12{padding:8px;background-color:#eee;margin-top:8px;text-align:right;height:61px}#bot_bar .col-md-12 .pull-left{padding:8px}@media (max-height: 400px){#bot_bar .col-md-12{height:40px}.btn-primary{height:30px;padding:0px 4px;font-size:14px}}@media (min-width: 1200px){#bot_bar{width:1170px}}@media (min-width: 992px){#bot_bar{width:970}}@media (min-width: 768px){#bot_bar{width:750}}
/*# sourceMappingURL=highlight.css.map */
......@@ -8,10 +8,10 @@ function timer() {
if (count <= 0) {
clearInterval(counter);
$("#time_left span").html("submit <b>whenever</b> you're ready");
$("#time_left")
.removeClass('alert-warning')
.addClass('alert-success');
$("#time_left").addClass('alert-success');
setTimeout(function() {
updateCanSubmit();
}, 1500);
setTimeout(function() {
markAvailable();
}, 30000);
......@@ -30,13 +30,13 @@ $(document).ready(function() {
});
$(window).bind('beforeunload', function() {
markAvailable();
});
function markAvailable() {
performRequest('mark_available',
function(data) {
alert(data['ok']);
console.log('marked available')
}, function(data) {
console.log(data);
});
......@@ -84,7 +84,7 @@ function updateCanSubmit() {
}
}
function displayError(message) {
function showError(message) {
$("#error").text(message);
setTimeout(function() {
$("#error").text('');
......@@ -107,7 +107,7 @@ function submitComplete() {
}
function submitSucess(data) {
function submitSuccess(data) {
$("#bot_bar img").hide();
console.log(data);
}
......@@ -118,43 +118,51 @@ function submitFailure(data) {
}
$("#submit").click(function() {
disable('#full_article');
// these checks will be done server-side too. They are duplicated here to reduce strain on the server.
if (!pastMinTime()) {
showError("your words per minute is too high");
return;
}
var n_highlights = controversial.length;
if (n_highlights === 0) {
showError("no highlights");
return;
}
if (n_highlights > n_sentences) {
displayError('invalid # of highlights!')
enable('#full_article')
showError('invalid # of highlights!');
enable('#full_article');
return;
}
for (var i = n_highlights - 1; i >= 0; i -= 1) {
var ei = controversial[i];
if (ei < 0 || ei > n_sentences) {
displayError('invalid sentence indices!');
showError('invalid sentence indices!');
return;
}
}
if (n_highlights < (n_sentences * 0.2) && !CONFIRMED_FEW_HIGHLIGHTS) {
showError("are you sure you've highlighted all controversial sentences? Submit again to confirm.");
CONFIRMED_HIGHLIGHTS = true;
if (n_highlights > (0.8 * n_sentences)) {
showError("too many sentences highlighted");
return;
}
if (n_highlights > (0.8 * n_sentences)) {
showError("too many sentences highlighted");
if (n_highlights < (n_sentences * 0.1) && !CONFIRMED_HIGHLIGHTS) {
showError("are you sure you've highlighted all controversial sentences? Submit again to confirm.");
CONFIRMED_HIGHLIGHTS = true;
return;
}
if (n_highlights > (0.5 * n_sentences)) {
if (n_highlights > (0.5 * n_sentences) && !CONFIRMED_HIGHLIGHTS) {
showError("are you sure you've highlighted only controversial sentences? Submit again to confirm.");
CONFIRMED_HIGHLIGHTS = true;
return
}
if (!pastMinTime()) {
showError("your words per minute is too high");
return;
}
controversial.sort();
var uri = 'submit?checked=' + controversial.join();
$("#bot_bar img").show();
performRequest(uri, submitSuccess, submitFailure);
......
@import 'bootstrap.min.css';
* { font-family: 'Open Sans', 'Ubuntu', 'Source Sans Pro', 'Roboto', 'Helvetica', sans-serif; }
* { font-family: 'Open Sans', 'Roboto', 'Ubuntu', 'Source Sans Pro', 'Helvetica Nueue', 'Helvetica', sans-serif; }
h1 { font-weight: 700; }
blockquote {
font-size: 16px; }
blockquote.good {
background-color: #dff0d8;
border-left: 5px solid #3c763d; }
blockquote.bad {
background-color: #f2dede;
border-left: 5px solid #a94442; }
.col-md-3 { background-color: #eee; }
#full_article {
font-size: 16px;
span { cursor: pointer; }
span.controversial {
color: #fff;
background-color: #337ab7; }
&::selection, &::-mox-selection { background-color: #fff; }
color: #bada55;
background-color: #800; }
}
#copyright { margin-bottom: 14em; }
.top_bar {
......
ul.tweets{width:310px;-webkit-column-count:1;-moz-column-count:1;column-count:1}ul.tweets li{width:300px}@media (min-width: 920px){ul.tweets{-webkit-column-count:1;-moz-column-count:1;column-count:1}ul.tweets li{width:320px}}@media (min-width: 1320px){ul.tweets{width:350px;-webkit-column-count:1;-moz-column-count:1;column-count:1}}
/*# sourceMappingURL=safari.css.map */
@media (min-width: 920px){ul.articles{width:850px;-webkit-column-count:2;-moz-column-count:2;column-count:2}ul.tweets{width:850px;-webkit-column-count:4;-moz-column-count:4;column-count:4}ul.tweets li{width:180px}}@media (min-width: 1320px){ul.articles{width:1250px;-webkit-column-count:3;-moz-column-count:3;column-count:3}ul.tweets{width:1250px;-webkit-column-count:6;-moz-column-count:6;column-count:6}}
/*# sourceMappingURL=webkit.css.map */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment