From de87631cf5d523ab2807a6ea23704459660db79d Mon Sep 17 00:00:00 2001
From: Ben Kurtovic
Date: Mon, 26 Aug 2013 18:41:51 -0400
Subject: [PATCH] HTML5
---
copyvios/settings.py | 2 +-
pages/index.mako | 18 +++++++++---------
pages/settings.mako | 12 ++++++------
pages/support/footer.mako | 2 +-
pages/support/header.mako | 6 +++---
static/style.css | 11 +----------
6 files changed, 21 insertions(+), 30 deletions(-)
diff --git a/copyvios/settings.py b/copyvios/settings.py
index 3385693..527d03d 100644
--- a/copyvios/settings.py
+++ b/copyvios/settings.py
@@ -45,7 +45,7 @@ def _do_set(query, headers, cookies):
def _do_delete(query, headers, cookies):
if query.cookie in cookies:
delete_cookie(headers, cookies, query.cookie.encode("utf8"))
- template = u"Deleted cookie {0} ."
+ template = u"Deleted cookie {0} ."
return template.format(escape(query.cookie))
elif query.all:
number = len(cookies)
diff --git a/pages/index.mako b/pages/index.mako
index d1d292f..7fcfcf3 100644
--- a/pages/index.mako
+++ b/pages/index.mako
@@ -4,7 +4,7 @@
<% query, bot, all_langs, all_projects, page, result = main(environ) %>\
% if query.project and query.lang and query.title and not page:
-
The given site (project=${query.project | h} , language=${query.lang | h} ) doesn't seem to exist. It may also be closed or private. Confirm its URL.
+
The given site (project=${query.project | h} , language=${query.lang | h} ) doesn't seem to exist. It may also be closed or private. Confirm its URL.
% elif query.project and query.lang and query.title and page and not result:
@@ -23,7 +23,7 @@
Site:
- http://
+ http://
<% selected_lang = query.orig_lang if query.orig_lang else cookies["CopyviosDefaultLang"].value if "CopyviosDefaultLang" in cookies else bot.wiki.get_site().lang %>\
% for code, name in all_langs:
@@ -34,7 +34,7 @@
% endif
% endfor
- .
+ .
<% selected_project = query.project if query.project else cookies["CopyviosDefaultProject"].value if "CopyviosDefaultProject" in cookies else bot.wiki.get_site().project %>\
% for code, name in all_projects:
@@ -45,7 +45,7 @@
% endif
% endfor
- .org
+ .org
@@ -97,13 +97,13 @@
No matches found.
% endif
% endif
- ${round(result.confidence * 100, 1)}% confidence of a violation.
+ ${round(result.confidence * 100, 1)}% confidence of a violation.
% if result.cached:
Results are cached
To save time (and money), this tool will retain the results of checks for up to 72 hours. This includes the URL of the "violated" source, but neither its content nor the content of the article. Future checks on the same page (assuming it remains unchanged) will not involve additional search queries, but a fresh comparison against the source URL will be made. If the page is modified, a new check will be run.
from ${result.cache_time} (${result.cache_age} ago). Bypass the cache.
% else:
- Results generated in ${round(result.time, 3)} seconds using ${result.queries} queries.
+ Results generated in ${round(result.time, 3)} seconds using ${result.queries} queries.
% endif
% if "CopyviosShowDetails" in cookies and cookies["CopyviosShowDetails"].value == "True":
Hide details:
@@ -117,12 +117,12 @@
% endif
- Trigrams: Article: ${result.article_chain.size()} / Source: ${result.source_chain.size()} / Delta: ${result.delta_chain.size()}
+ Trigrams: Article: ${result.article_chain.size()} / Source: ${result.source_chain.size()} / Delta: ${result.delta_chain.size()}
% if result.cached:
% if result.queries:
- Retrieved from cache in ${round(result.time, 3)} seconds (originally generated in ${round(result.original_time, 3)} s using ${result.queries} queries; ${round(result.original_time - result.time, 3)} s saved).
+ Retrieved from cache in ${round(result.time, 3)} seconds (originally generated in ${round(result.original_time, 3)} s using ${result.queries} queries; ${round(result.original_time - result.time, 3)} s saved).
% else:
- Retrieved from cache in ${round(result.time, 3)} seconds (originally generated in ${round(result.original_time, 3)} s; ${round(result.original_time - result.time, 3)} s saved).
+ Retrieved from cache in ${round(result.time, 3)} seconds (originally generated in ${round(result.original_time, 3)} s; ${round(result.original_time - result.time, 3)} s saved).
% endif
% endif
% if result.queries:
diff --git a/pages/settings.mako b/pages/settings.mako
index 420d095..b2a3dea 100644
--- a/pages/settings.mako
+++ b/pages/settings.mako
@@ -14,7 +14,7 @@
Default site:
- http://
+ http://
<% selected_lang = cookies["CopyviosDefaultLang"].value if "CopyviosDefaultLang" in cookies else bot.wiki.get_site().lang %>\
% for code, name in langs:
@@ -25,7 +25,7 @@
% endif
% endfor
- .
+ .
<% selected_project = cookies["CopyviosDefaultProject"].value if "CopyviosDefaultProject" in cookies else bot.wiki.get_site().project %>\
% for code, name in projects:
@@ -36,7 +36,7 @@
% endif
% endfor
- .org
+ .org
<%
@@ -74,16 +74,16 @@
% for key in [key for key in cookie_order if key in cookies]:
<% cookie = cookies[key] %>\
- ${key | h}
+ ${key | h}
% try:
<% lines = dumps(loads(cookie.value), indent=4).splitlines() %>\
% for line in lines:
- ${line | h}
+ ${line | h}
% endfor
% except ValueError:
- ${cookie.value | h}
+ ${cookie.value | h}
% endtry
diff --git a/pages/support/header.mako b/pages/support/header.mako
index 4057977..10082c8 100644
--- a/pages/support/header.mako
+++ b/pages/support/header.mako
@@ -6,10 +6,10 @@
<%
root = path.dirname(environ["SCRIPT_NAME"])
%>\
-
-
+
+
diff --git a/static/style.css b/static/style.css
index 10b8712..1aa3222 100644
--- a/static/style.css
+++ b/static/style.css
@@ -159,16 +159,6 @@ p.tooldesc {
margin: 6px 0 6px 0;
}
-span.offline {
- color: #900;
- font-weight: bold;
-}
-
-span.online {
- color: #090;
- font-weight: bold;
-}
-
td.cv-chain-cell {
width: 50%;
vertical-align: top;
@@ -198,6 +188,7 @@ span.cv-hl-out {
background: linear-gradient(left, #FAA, #FFF);
}
+span.mono { font-family: monospace; }
span.light { color: #CCC; }
span.medium { color: #AAA; }