[odrs-web] Switch to a GNOME website theme
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [odrs-web] Switch to a GNOME website theme
- Date: Fri, 23 Sep 2016 18:34:51 +0000 (UTC)
commit 0e30c279ffd06073bb8585ce0fac89a328db14c8
Author: Richard Hughes <richard hughsie com>
Date: Fri Sep 23 18:28:40 2016 +0100
Switch to a GNOME website theme
admin.py | 47 ++--
database.py | 20 +-
static/bar.png | Bin 0 -> 154 bytes
static/foot.png | Bin 0 -> 699 bytes
static/general_bg.png | Bin 0 -> 178 bytes
static/general_separator.png | Bin 0 -> 212 bytes
static/gnome-16.png | Bin 0 -> 650 bytes
static/gnome-odrs.png | Bin 0 -> 14485 bytes
static/layout.css | 698 ++++++++++++++++++++++++++++++++++++++++++
static/search-icon.png | Bin 0 -> 395 bytes
static/style.css | 263 ++++++++++++-----
static/t.png | Bin 0 -> 317 bytes
static/top_bar-bg.png | Bin 0 -> 185 bytes
templates/default.html | 203 +++++++++++--
templates/delete.html | 5 +-
templates/distros.html | 9 +-
templates/error.html | 5 +-
templates/graph-month.html | 12 +-
templates/graph-year.html | 12 +-
templates/index.html | 10 +-
templates/login.html | 4 -
templates/oars.html | 4 -
templates/popularity.html | 24 --
templates/show-all.html | 34 +--
templates/show.html | 6 +-
templates/stats.html | 27 +-
templates/users.html | 12 +-
27 files changed, 1151 insertions(+), 244 deletions(-)
---
diff --git a/admin.py b/admin.py
index b879012..c5cd2c5 100644
--- a/admin.py
+++ b/admin.py
@@ -115,26 +115,6 @@ def graph_year():
data_requests=data_fetch[::-1],
data_submitted=data_review[::-1])
-@admin.route('/popularity')
-@login_required
-def popularity():
- """
- Return the popularity page as HTML.
- """
- try:
- db = ReviewsDatabase(os.environ)
- except CursorError as e:
- return error_internal(str(e))
- results1 = []
- for review in db.get_analytics_fetch():
- results1.append((review[0].replace('.desktop', ''), review[1]))
- results2 = []
- for review in db.get_stats_fetch('reviewed'):
- results2.append((review[0].replace('.desktop', ''), review[1]))
- return render_template('popularity.html',
- results1=results1,
- results2=results2)
-
@admin.route('/stats')
@login_required
def stats():
@@ -146,10 +126,25 @@ def stats():
stats = db.get_stats()
except CursorError as e:
return error_internal(str(e))
- results = []
+
+ # stats
+ results_stats = []
for item in sorted(stats):
- results.append((item, stats[item]))
- return render_template('stats.html', results=results)
+ results_stats.append((item, stats[item]))
+
+ # popularity view
+ results_viewed = []
+ for review in db.get_analytics_fetch():
+ results_viewed.append((review[0].replace('.desktop', ''), review[1]))
+
+ # popularity reviews
+ results_submitted = []
+ for review in db.get_stats_fetch('reviewed'):
+ results_submitted.append((review[0].replace('.desktop', ''), review[1]))
+ return render_template('stats.html',
+ results_stats=results_stats,
+ results_viewed=results_viewed,
+ results_submitted=results_submitted)
@admin.route('/distros')
@login_required
@@ -419,8 +414,8 @@ def users_all():
"""
try:
db = ReviewsDatabase(os.environ)
- users1 = db.get_users_by_karma(best=True)
- users2 = db.get_users_by_karma(best=False)
+ users_awesome = db.get_users_by_karma(best=True)
+ users_haters = db.get_users_by_karma(best=False)
except CursorError as e:
return error_internal(str(e))
- return render_template('users.html', users1=users1, users2=users2)
+ return render_template('users.html', users_awesome=users_awesome, users_haters=users_haters)
diff --git a/database.py b/database.py
index decdf88..38e435e 100644
--- a/database.py
+++ b/database.py
@@ -493,7 +493,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['AllReviews'] = int(res[0][0])
+ item['Active reviews'] = int(res[0][0])
# unique reviewers
try:
@@ -501,7 +501,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['UniqueReviewers'] = int(res[0][0])
+ item['Unique reviewers'] = int(res[0][0])
# total votes
try:
@@ -509,13 +509,13 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['VotesUp'] = int(res[0][0])
+ item['User upvotes'] = int(res[0][0])
try:
cur.execute("SELECT COUNT(*) FROM votes WHERE val = -1;")
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['VotesDown'] = int(res[0][0])
+ item['User downvotes'] = int(res[0][0])
# unique voters
try:
@@ -523,7 +523,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['UniqueVoters'] = int(res[0][0])
+ item['Unique voters'] = int(res[0][0])
# unique languages
try:
@@ -531,7 +531,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['UniqueLocales'] = int(res[0][0])
+ item['Unique languages'] = int(res[0][0])
# unique distros
try:
@@ -539,7 +539,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['UniqueDistros'] = int(res[0][0])
+ item['Unique distros'] = int(res[0][0])
# unique apps
try:
@@ -547,7 +547,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['UniqueApps'] = int(res[0][0])
+ item['Unique apps reviewed'] = int(res[0][0])
# unique distros
try:
@@ -555,7 +555,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['ReviewsReported'] = int(res[0][0])
+ item['Reported reviews'] = int(res[0][0])
# star reviews
for star in range(1, 6):
@@ -565,7 +565,7 @@ class ReviewsDatabase(object):
except mdb.Error as e:
raise CursorError(cur, e)
res = cur.fetchall()
- item['RatingStars%03i' % star] = int(res[0][0])
+ item['%i star reviews' % star] = int(res[0][0])
# done
return item
diff --git a/static/bar.png b/static/bar.png
new file mode 100644
index 0000000..e5b354e
Binary files /dev/null and b/static/bar.png differ
diff --git a/static/foot.png b/static/foot.png
new file mode 100644
index 0000000..1138da1
Binary files /dev/null and b/static/foot.png differ
diff --git a/static/general_bg.png b/static/general_bg.png
new file mode 100644
index 0000000..8840fe2
Binary files /dev/null and b/static/general_bg.png differ
diff --git a/static/general_separator.png b/static/general_separator.png
new file mode 100644
index 0000000..bd865e8
Binary files /dev/null and b/static/general_separator.png differ
diff --git a/static/gnome-16.png b/static/gnome-16.png
new file mode 100644
index 0000000..95c4ff6
Binary files /dev/null and b/static/gnome-16.png differ
diff --git a/static/gnome-odrs.png b/static/gnome-odrs.png
new file mode 100644
index 0000000..7cb4098
Binary files /dev/null and b/static/gnome-odrs.png differ
diff --git a/static/layout.css b/static/layout.css
new file mode 100644
index 0000000..8c6fa56
--- /dev/null
+++ b/static/layout.css
@@ -0,0 +1,698 @@
+/* Basic tags */
+body {
+
+ padding: 0px;
+ background: url(https://static.gnome.org/img/html-bg.png) repeat-x scroll 0 10px #FFFFFF;
+ height: 100%;
+ margin-bottom: 0px;
+ color: #2E3436;
+ font-family: Cantarell,'Droid Sans',Ubuntu,'DejaVu Sans',Arial,sans-serif;
+ font-size: 14px;
+ line-height: 1.6;
+ width: 100%;
+}
+
+#body {
+ margin: 90px 230px 0px 10px;
+ padding: 0px;
+}
+
+a img {
+ border: 0px;
+ margin-top: 39px;
+}
+
+/* Anchors */
+a {
+ color: #0000ff;
+}
+
+a:visited {
+ color: #551a8b;
+}
+
+a:active {
+ color: #ff0000;
+}
+
+/* Basic classes */
+
+.none { /* to add paragraph spacing to various elements for ttys */
+ margin: 0px;
+ padding: 0px;
+}
+
+.invisible { /* stuff that should appear when this css isn't used */
+ margin: 0px;
+ border: 0px;
+ padding: 0px;
+ height: 0px;
+ visibility: hidden;
+}
+
+.left {
+ margin: 10px;
+ padding: 0px;
+ float: left;
+}
+
+.right {
+ margin-top: 10px;
+ padding: 0px;
+ float: right;
+}
+
+.center {
+ text-align: center;
+}
+
+/* Common page elements: Header, footer, etc. */
+
+#hdr {
+ position: absolute;
+ z-index: 5;
+
+ top: 0px;
+ left: 0px;
+ right: 0px;
+ width: 100%;
+ height: 48px;
+
+ text-align: right;
+
+ background-color: #e3ffc3;
+ text-decoration: underline;
+}
+
+#banner {
+ position: absolute;
+ z-index: 10;
+
+ top: 0px;
+ right: 0px;
+ border: 0px;
+
+ width: 300px;
+ height: 48px;
+
+}
+
+#banner a img {
+ width: 300px;
+ height: 48px;
+}
+
+#hdrNav {
+ position: absolute;
+ top: 54px;
+ left: 0px;
+
+ margin-left: 84px;
+ text-align: left;
+ vertical-align: middle;
+ font-size: small;
+}
+
+#hdrNav a {
+ color: #000000;
+}
+
+#hdrTitle {
+ height: 48px;
+ padding: 10px 10px 0px 0px;
+ font-weight: bold;
+}
+
+
+/* Search thingy */
+
+div#search {
+ position: absolute;
+ text-align: right;
+ right: 3em;
+ top: 12em;
+ font-size: 75%;
+}
+
+div#search form {
+ background: transparent;
+}
+
+input.searchTerms {
+ border: 1px solid #888888;
+}
+
+div#search input.searchTerms {
+ margin-right: 1ex;
+}
+
+input.searchButton {
+ background: white url(search_icon.gif) no-repeat scroll 2px center;
+ cursor: pointer;
+ padding: 1px 1px 1px 15px;
+ text-transform: none;
+ border: 1px solid #888888;
+ color: black;
+}
+
+
+
+/* Sidebar */
+
+#sidebar {
+ position: absolute;
+ top: 90px;
+ right: 0px;
+ width: 210px;
+
+ /*margin-right: 10px;*/
+ padding-right: 10px;
+ padding-bottom: 0px;
+ border-left: 1px dashed #dddddd;
+ background-color: #ffffff;
+}
+
+#sidebar p {
+ margin-top: 0px;
+ padding-left: 10px;
+ padding-right: 10px;
+}
+
+#sidebar p.section {
+ text-align: center;
+ font-weight: bold;
+ padding-top: 3px;
+ padding-bottom: 3px;
+ color: #999999;
+ background-color: #eeeeee;
+}
+
+#sidebar ul {
+ margin: 0em;
+ margin-bottom: 15px;
+ padding-left: 10px;
+ padding-right: 10px;
+ list-style-type: none;
+}
+
+#sidebar ul ul {
+ padding-left: 2em;
+ padding-right: 0em;
+ list-style-type: square;
+}
+
+
+/* Copyright footer */
+
+#copyright {
+ text-align: center;
+ font-size: small;
+ clear: both;
+
+ margin-top: 10px;
+ padding: 5px 0px 5px 0px;
+ color: #aaaaaa;
+}
+
+#copyright a {
+ color: #aaaaff;
+}
+
+#copyright a:visited {
+ color: #ffaaaa;
+}
+
+
+/* News Sections */
+
+p.newsitem {
+ clear: left;
+ margin-bottom: 20px;
+}
+
+p.newsitem img.newsicon {
+ float: left;
+ margin: 0px 10px 10px 10px;
+ border: 0px;
+}
+
+
+/* Generic Classes */
+
+div.code {
+ background-color: #e0e0e0;
+ color: #000000;
+ white-space: pre;
+ font-family: monospace;
+}
+
+
+#page {
+ margin: 0px;
+ padding: 0px;
+}
+
+div.in-column {
+ margin: 0 0 2em 1em;
+ float: right;
+ max-width: 12em;
+}
+
+hr {
+ color: #888;
+ background: #888;
+ border: 0;
+ height: 1px;
+ width: 100%;
+ text-align: center;
+ clear: both;
+}
+
+
+div.body {
+ clear: both;
+ padding-top: 1px;
+}
+
+
+div.sidebar {
+ position: absolute;
+ text-align: left;
+ right: 0px;
+ top: 60px;
+ width: 27ex;
+ padding-left: 1ex;
+ border-left: 1ex solid #eee;
+ margin-top: 4em;
+}
+
+div.sidebar h2 {
+ margin-top: 0;
+ padding: 5px 2ex 5px 2ex;
+ background: url(t.png) top left repeat-y;
+ font-size: 100%;
+}
+
+ul.toc {
+ padding: 0;
+ padding-left: 20px;
+ margin-left: 0;
+ margin-right: 10px;
+ list-style: none;
+}
+
+ul.toc li {
+ list-style: circle;
+}
+
+ul.toc li a {
+ text-decoration: none;
+ color: black;
+}
+
+ul.toc li a:hover {
+ text-decoration: underline;
+}
+
+#general {
+ list-style: none;
+ background: #2E3436 url(general_bg.png) 0 100% repeat-x;
+ text-align: right;
+ padding: 0 1ex;
+ margin: 0;
+ font-size: 70%;
+}
+
+#general li {
+ display: inline;
+ background: url(general_separator.png) 0 0 no-repeat;
+ padding-top: 10px;
+ padding-bottom: 8px;
+ margin-left: 0px;
+ margin-top: 0px;
+}
+
+#general li a {
+ font-weight: bold;
+ color: #FFFFFF;
+ margin: 0 2ex;
+ text-decoration: none;
+ line-height: 30px;
+}
+
+#general li a:hover {
+ text-decoration: underline;
+}
+
+#general .home {
+ float: left;
+ background: url(general_separator.png) 100% 0 no-repeat;
+ padding-top: 0;
+ padding-bottom: 0;
+}
+
+#general .home a {
+ float: left;
+ background: url(foot.png) 7px 50% no-repeat;
+ margin-left: 0;
+ padding-left: 27px;
+}
+
+#header h1 {
+ margin-left: 20px;
+ padding-top: 85px;
+ font-size: 130%;
+ color: #3F4448;
+ font-weight: inherit;
+}
+
+#tabs {
+ position: absolute;
+ width: 100%;
+ float: left;
+ right: 22em;
+ text-align: right;
+ top: 8.2em;
+}
+
+#portal-globalnav {
+ float: right;
+ list-style: none;
+ margin: 0;
+ margin-right: 3ex;
+}
+
+#portal-globalnav li {
+ float: left;
+ margin: 0;
+ margin-left: 0.2ex;
+ font-size: 2ex;
+}
+
+#portal-globalnav li a:hover {
+ color: #111111;
+}
+
+#portal-globalnav li a {
+ float: left;
+ text-decoration: none;
+ color: #555555;
+ background: url(tab_left.png) 0 0 no-repeat;
+ padding: 7px 0 7px 7px;
+ border-bottom: 2px solid #CCCCCC;
+}
+
+#portal-globalnav li span {
+ background: url(tab_right.png) 100% 0 no-repeat;
+ padding: 7px 28px 7px 19px;
+}
+
+#portal-globalnav li.selected a {
+ color: #3566A5;
+ background: url(tab_left.png) 0 -57px no-repeat;
+ border-bottom: none;
+ padding-top: 8px;
+ padding-bottom: 8px;
+}
+
+#portal-globalnav li.selected a span {
+ background: url(tab_right.png) 100% -57px no-repeat;
+ padding-top: 8px;
+ padding-bottom: 8px;
+}
+
+/* page content */
+
+div#content {
+ clear: both;
+ padding-top: 0.3em;
+ margin: 1em;
+}
+
+#search_and_tabs {
+ display: block;
+ color: #000;
+}
+
+/* global domain bar */
+
+#global_domain_bar {
+ width: 960px;
+ margin: auto;
+}
+
+#global_domain_bar .maxwidth {
+ margin: 10px;
+ margin-top: -16px;
+}
+
+
+#global_domain_bar .tab {
+ background: none repeat scroll 0 0 #FFFFFF;
+ border-radius: 5px 5px 5px 5px;
+ box-shadow: 0 4px 2px -2px #8FB3D9;
+ float: right;
+ font-size: 12px;
+ line-height: 16px;
+ padding: 6px 8px;
+ position: relative;
+ right: 0;
+}
+
+#global_domain_bar .tab a.root:last-child {
+ border-right: 0 none;
+ margin-right: 0;
+ padding-right: 0;
+}
+
+#global_domain_bar .tab a.root {
+ background: url(https://static.gnome.org/img/favicon.png) no-repeat scroll 0 0 #FFFFFF;
+ border-right: 1px solid #CCCCCC;
+ color: #555753;
+ font-weight: bold;
+ margin-right: 3px;
+ padding-left: 18px;
+ padding-right: 6px;
+ text-decoration: none;
+}
+
+
+/* Footer Grass & community */
+
+#footer_grass {
+ background: url(https://static.gnome.org/img/grass.png) repeat-x scroll top transparent;
+ height: 39px;
+ margin-top: -33px;
+ bottom: 0;
+}
+
+#footer_community {
+ background: url(https://static.gnome.org/img/footer_arts/community.png) center no-repeat;
+ height: 180px;
+ bottom: 0;
+}
+
+/* FOOTER */
+
+#footer div.links > div > ul > li {
+ float: left;
+ margin: 0 40px 10px 0;
+}
+
+#footer ul li {
+ margin: 0;
+ padding: 0;
+}
+
+#footer p {
+ color: #3F4448;
+ margin: 0em;
+}
+
+#footer #footnotes {
+/* font-size: 9px;*/
+ margin-top: 4px;
+}
+
+#footer ul.menu > li > a {
+ font-weight: bold;
+}
+
+#footer div.links div a, #footer div.links div strong {
+ display: block;
+ text-decoration: none;
+}
+
+#footer .links a {
+ -moz-transition: background-color 100ms ease-in 0s;
+ color: inherit;
+}
+
+/*top bar*/
+
+.left {
+ float: left;
+}
+
+#top_bar ul {
+ list-style: none outside none;
+ margin: 0;
+ padding: 0 5px;
+}
+
+#top_bar ul li {
+ display: inline;
+ margin: 0 5px 0 0;
+}
+
+#top_bar a {
+ -moz-transition: background 100ms linear 0s;
+ border-radius: 4px 4px 4px 4px;
+ color: #FFFFFF;
+ outline: 0 none;
+ padding: 4px 8px;
+ text-decoration: none;
+ text-shadow: 0 1px 0 #000000;
+}
+
+#top_bar a:hover {
+ background: none repeat scroll 0 0 rgba(255, 255, 255, 0.2);
+}
+
+#top_bar a:focus {
+ background: none repeat scroll 0 0 rgba(255, 255, 255, 0.15);
+}
+
+#top_bar a:active, #top_bar li.current-menu-item a, #top_bar li.current-page-ancestor a {
+ background: url("images/top_bar-item-bg.png") repeat-x scroll center top #1C2021;
+ box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.4) inset, 0 1px 3px rgba(0, 0, 0, 0.4) inset;
+}
+
+.right {
+ float: right;
+}
+
+.hidden {
+ display: none;
+}
+
+#top_bar input {
+ -moz-border-bottom-colors: none;
+ -moz-border-image: none;
+ -moz-border-left-colors: none;
+ -moz-border-right-colors: none;
+ -moz-border-top-colors: none;
+ background: url("search-icon.png") no-repeat scroll 8px center transparent;
+ border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgba(255, 255, 255, 0.3);
+ border-style: none none none solid;
+ border-width: 0 0 0 1px;
+ color: #FFFFFF;
+ font: inherit;
+ margin: -8px 0 -8px -8px;
+ outline: medium none;
+ padding: 8px 8px 8px 28px;
+ width: 150px;
+}
+
+input:-moz-read-write, textarea:-moz-read-write {
+ -moz-user-modify: read-write !important;
+}
+
+#top_bar {
+ background: url("top_bar-bg.png") repeat-x scroll center top #2E3436;
+ border-radius: 6px 6px 6px 6px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+ float: right;
+ font-size: 13px;
+ line-height: normal;
+ margin-top: 48px;
+}
+
+.container_12 .grid_9, .container_16 .grid_12 {
+ width: 700px;
+}
+
+.container_12, .container_16 {
+ margin-left: auto;
+ margin-right: auto;
+ width: 960px;
+}
+
+.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11,
.grid_12, .grid_13, .grid_14, .grid_15, .grid_16 {
+ display: inline;
+ float: left;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
+input {
+ -moz-appearance: textfield;
+ -moz-binding: url("chrome://global/content/platformHTMLBindings.xml#inputFields");
+ -moz-user-select: text;
+ background-color: -moz-field;
+ border: 2px inset threedface;
+ color: -moz-fieldtext;
+ cursor: text;
+ font: -moz-field;
+ letter-spacing: normal;
+ line-height: normal !important;
+ padding: 1px 0;
+ text-align: start;
+ text-indent: 0;
+ text-rendering: optimizelegibility;
+ text-shadow: none;
+ text-transform: none;
+ word-spacing: normal;
+}
+
+
+/*logo*/
+
+#header #logo {
+ float: left;
+}
+
+.grid_3, .container_16, .grid_4 {
+ width: 220px;
+}
+
+
+#header #logo img {
+ -moz-transition: opacity 200ms ease-out 0s;
+ height: 78px;
+ margin-left: 10px;
+ opacity: 1;
+ width: 250px;
+ left: 10px;
+ margin-top: 5px;
+}
+
+#header {
+ margin: 20px auto 0;
+ width: 960px;
+ float: center;
+ font-size: 75%;
+}
+
+
+#except_footer {
+ width: 960px;
+ margin: auto;
+}
+
+#logo_bar {
+ font-size: 75%;
+ margin: 20px auto 0;
+ width: 960px;
+ padding-top: 10px;
+}
+
+select {
+ height: 27px;
+ margin-left: 53px;
+ margin-top: 55px;
+ text-align: center;
+ width: 205px;
+}
+
+
diff --git a/static/search-icon.png b/static/search-icon.png
new file mode 100644
index 0000000..90e8d2c
Binary files /dev/null and b/static/search-icon.png differ
diff --git a/static/style.css b/static/style.css
index e643d4a..8a156e4 100644
--- a/static/style.css
+++ b/static/style.css
@@ -1,110 +1,223 @@
+/**
+ * Styles that are not a part of page layout.
+ *
+ * For example:
+ * Fonts
+ * Sizes
+ * Decoration
+ * Separators
+ */
body {
- background: #fefeff;
- color: #000000;
- font-family: "Open Sans", Sans-Serif;
- font-weight: 300;
- max-width: 100em;
- margin: 0em auto;
- padding: 0 2em;
- line-height: 150%;
+ margin: 0;
+ padding: 0;
}
-h1, h2, h3 {
- color: #000000;
- font-family: "Open Sans", Sans-Serif;
- font-weight: 300;
+div#content a {
+ color: #3465a4;
+ border-bottom: 1px #888;
+ text-decoration: none;
}
-.history th {
- font-size: 120%;
- white-space: nowrap;
- padding-right: 1em;
+div#content a:hover {
+ text-decoration: underline;
+}
+
+
+h1.first {
+ margin-top: 0;
+ padding-top: 0;
+}
+
+h2, h3, h4, h5, h6 {
+ color: #3f3f3f;
+}
+
+h1 {
+ font-size: 1.4em;
+}
+
+h2 {
+ font-size: 25px;
+}
+
+h3, dt {
+ font-size: 21px;
+ margin: 0.4em 0 0.5em;
+ color: #2E3436;
+}
+
+p, dd, .action_box, ul, ol {
+ margin: 0.4em 0 1em;
+}
+
+/* lists */
+.list {
+ margin-top:.5em;
+}
+.list tr td {
+ padding:.2em;
+ text-align:left;
+}
+.list td label {
+ border-bottom:1px dashed #999;
+ font-weight:normal;
+}
+.list th {
+ background: #ccf;
+ border: 1px solid #000;
+ font-weight: bold;
+ padding: 2px;
+}
+.list th a {
+ display: block;
+ padding:.2em 1.2em .2em .2em;
text-align: left;
}
+.list th a:hover {
+ background-color: #fff;
+}
+.row1 {
+ background-color: #eee;
+}
+.row2 {
+ background-color: #ddd;
+}
+.row1:hover, .row2:hover {
+ background-color: #fff;
+}
-.important {
- color: #ff0000;
+.record th {
+ text-align: right;
}
-.history td {
- padding: .5em .5em .5em 0;
+/* styling page content */
+
+h1 {
+ font-size: 1.5em;
+ color: #3f3f3f;
}
-a:hover {
- color: #147;
- text-decoration: none;
+/* styling form widgets like bugzilla.gnome.org */
+input,textarea {
+ border: 1px solid #6f6f6f;
+/* background: #dddddd; */
}
-a {
- color: #147;
- text-decoration: none;
+input.login_small {
+ border-style: none;
}
-ul.navigation {
- list-style-type: none;
- margin: 1em -1em 2em;
- padding: 0;
- overflow: hidden;
- box-shadow: inset 0 -1px #ececec;
+input:focus,textarea:focus {
+ background-color: #f7f2d0;
+ color: #000000;
}
-li.navigation {
- float: left;
+/* select {
+ border: groove
+} */
+
+option {
+ border: 0px none #ffffff;
}
-li.navigation2 {
- float: right;
+input[type=radio] {
+ margin-left: 1em;
}
-a:link.navigation, a:visited.navigation {
- display: block;
- width: 8em;
- color: #4c4c4c;
- text-align: center;
- text-decoration: none;
- border-bottom: 3px solid transparent;
+/* footer */
+
+#footer {
+ background: none repeat scroll 0 0 #D3D7CF;
+ clear: left;
+ color: #555753;
+ padding: 14px 0 195px;
+ margin-bottom: 0;
}
-a:hover.navigation {
- color: #0c0c0c;
- border-bottom-color: #9c9c9c;
+#footer {
+ font-size: 12px;
+ line-height: 1.4em;
}
-a:active.navigation {
- color: #3e78b4;
- border-bottom-color: #3e78b4;
+#footer ul {
+ list-style: none outside none;
+ margin: 0;
+ padding: 0;
}
-textarea {
- vertical-align: middle;
+#footer li {
+ display: inline;
+ padding: 0 0;
}
-button.inline {
- vertical-align: middle;
- display: inline-block;
- float: right;
+#footer a {
+ color: #3465a4;
+ text-decoration: none;
}
-button.action {
- background-color: #555555;
- border: 1px solid black;
- color: white;
- padding: 15px 32px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 16px;
- float: right;
+#footer #footnotes small {
+ font-size: 88%;
+}
+#footer div.links div a:hover{
+ display: block;
+ text-decoration: underline;
+}
+h1 {
+ margin: auto;
+ width: 960px;
+}
+
+h2 {
+ font-size: 25px;
+}
+h3, dt {
+ font-size: 21px;
+ margin: 0.4em 0 0.5em;
+ color: #2E3436;
+}
+dt {
+ color: #E36615;
+}
+dt a:hover {
+ color: #fa7721;
+}
+h4 {
+ font-size: 16px;
+ color: #ce5c00;
+}
+h5 {
+ font-size: 14px;
+}
+h6 {
+ font-size: 12px;
+}
+ol {
+ list-style:decimal;
+}
+ul {
+ list-style:square;
+}
+
+dl,dt,h2,h3,h4,h5,h6,pre,table,address,fieldset {
+ margin: 0.8em 0 0.4em;
+}
+p, dd, .action_box, ul, ol {
+ margin: 0.4em 0 1em;
+}
+code {
+ background: #ececec;
+ background: rgba(0,0,0,0.1);
+ padding: 1px;
+}
+
+/* added for ODRS */
+
+th {
+ font-size: 120%;
+ white-space: nowrap;
+ padding-right: 1em;
}
-button.destructive-action {
- background-color: #f44336;
- border: 1px solid black;
- color: white;
- padding: 15px 32px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 16px;
- float: right;
+td {
+ padding: .5em 0 .5em 0;
}
diff --git a/static/t.png b/static/t.png
new file mode 100644
index 0000000..7b67341
Binary files /dev/null and b/static/t.png differ
diff --git a/static/top_bar-bg.png b/static/top_bar-bg.png
new file mode 100644
index 0000000..567188c
Binary files /dev/null and b/static/top_bar-bg.png differ
diff --git a/templates/default.html b/templates/default.html
index 6dd0634..bc522a9 100644
--- a/templates/default.html
+++ b/templates/default.html
@@ -4,33 +4,70 @@
Licensed under the GNU General Public License Version 2 -->
<html lang="en">
<head>
-<title>{% block title %}{% endblock %}</title>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
-<link rel="stylesheet" href="/style.css" type="text/css" media="screen"/>
-<link rel="shortcut icon" href="/favicon.ico"/>
+ <title>{% block title %}{% endblock %}</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+ <!--<base href="https://odrs.gnome.org/" />-->
+ <base href="http://127.0.0.1:5000/" />
+ <link href="layout.css" rel="stylesheet" type="text/css" media="screen" />
+ <link href="style.css" rel="stylesheet" type="text/css" media="all" />
+ <link rel="icon" type="image/png" href="https://www.gnome.org/img/logo/foot-16.png" />
+ <link rel="SHORTCUT ICON" type="image/png" href=
+ "https://www.gnome.org/img/logo/foot-16.png" />
</head>
<body>
-{% block navigation %}
-<ul class="navigation">
- <li class="navigation"><a class="navigation" href="/">Home</a></li>
- <li class="navigation"><a class="navigation" href="/admin/show/all">All Reviews</a></li>
+<body id="mail_gnome">
+ <div id="except_footer">
+ <div id="header" class="container_12">
+ <div id="global_domain_bar">
+ <div class="maxwidth">
+ <div class="tab">
+ <a class="root" href="https://www.gnome.org/">GNOME.org</a>
+ </div>
+ </div>
+ </div>
+ </div><!-- header -->
+
+ <div id="logo_bar" class="container_12">
+ <div id="logo" class="grid_3">
+ <a title="Go to home page" href="https://odrs.gnome.org/"><img src="gnome-odrs.png" alt="GNOME: Open
Desktop Review Server" /></a>
+ </div>
+
+ <div id="top_bar" class="grid_9">
+ <div class="left">
+ <div class="menu-globalnav-container">
+ <ul id="menu-globalnav" class="menu">
+ <li><a href="/">Home</a></li>
+ <li><a href="/admin/show/all">All Reviews</a></li>
+{% if current_user.is_authenticated %}
+ <li><a href="/admin/show/reported">Reported</a></li>
+ <li><a href="/admin/stats">Statistics</a></li>
+ <li><a href="/admin/users/all">Users</a></li>
+ <li><a href="/admin/distros">Distributions</a></li>
+ <li><a href="/admin/graph_month">Usage</a></li>
+{% endif %}
+ </ul>
+ </div>
+ </div>
+ <div class="right">
+ <div class="menu-globalnav-container">
+ <ul id="menu-globalnav" class="menu">
{% if current_user.is_authenticated %}
- <li class="navigation"><a class="navigation" href="/admin/show/reported">Reported</a></li>
- <li class="navigation"><a class="navigation" href="/admin/stats">Statistics</a></li>
- <li class="navigation"><a class="navigation" href="/admin/popularity">Popularity</a></li>
- <li class="navigation"><a class="navigation" href="/admin/users/all">Users</a></li>
- <li class="navigation"><a class="navigation" href="/admin/distros">Distributions</a></li>
- <li class="navigation"><a class="navigation" href="/admin/graph_month">Graph Month</a></li>
- <li class="navigation"><a class="navigation" href="/admin/graph_year">Graph Year</a></li>
- <li class="navigation2"><a class="navigation" href="/logout">Logout</a></li>
+ <li class="navigation2"><a href="/logout">Logout</a></li>
{% else %}
- <li class="navigation2"><a class="navigation" href="/login">Login</a></li>
+ <li class="navigation2"><a href="/login">Login</a></li>
{% endif %}
-</ul>
-{% endblock %}
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <div class="body">
+ <div id="content">
-{% block page_header %}{% endblock %}
+{% block navigation %}
+{% endblock %}
<!-- any flashed messages -->
<div id="messages">
@@ -41,8 +78,128 @@
{% block content %}{% endblock %}
-<p class="footer">
- Copyright <a href="mailto:richard hughsie com">Richard Hughes 2016</a>
-</p>
+ </div><!-- end of content --> </div>
+ </div><!--end of except_footer-->
+
+ <div id="footer_community"></div>
+
+ <div id="footer_grass"></div>
+
+ <div id="footer">
+ <div class="container_12" id="container_12">
+ <div class="links grid_9">
+ <div class="menu-footer-container">
+ <ul id="menu-footer" class="menu">
+ <li id="menu-item-1048" class=
+ "menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item
menu-item-1048">
+ <a href="/">The GNOME Project</a>
+
+ <ul class="sub-menu">
+ <li id="menu-item-1049" class=
+ "menu-item menu-item-type-post_type menu-item-object-page menu-item-1049">
+ <a href="https://www.gnome.org/about/">About Us</a></li>
+
+ <li id="menu-item-1050" class=
+ "menu-item menu-item-type-post_type menu-item-object-page menu-item-1050">
+ <a href="https://www.gnome.org/get-involved/">Get Involved</a></li>
+
+ <li id="menu-item-1051" class=
+ "menu-item menu-item-type-post_type menu-item-object-page menu-item-1051">
+ <a href="https://www.gnome.org/teams/">Teams</a></li>
+
+ <li id="menu-item-1053" class=
+ "menu-item menu-item-type-post_type menu-item-object-page menu-item-1053">
+ <a href="https://www.gnome.org/support-gnome/">Support GNOME</a></li>
+
+ <li id="menu-item-1054" class=
+ "menu-item menu-item-type-post_type menu-item-object-page menu-item-1054">
+ <a href="https://www.gnome.org/contact/">Contact Us</a></li>
+
+ <li id="menu-item-2246" class=
+ "menu-item menu-item-type-post_type menu-item-object-page menu-item-2246">
+ <a href="https://www.gnome.org/foundation/">The GNOME Foundation</a></li>
+ </ul>
+ </li>
+
+ <li id="menu-item-1047" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1047">
+ <a href="#">Resources</a>
+
+ <ul class="sub-menu">
+ <li id="menu-item-1055" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1055">
+ <a href="https://developer.gnome.org">Developer Center</a></li>
+
+ <li id="menu-item-1056" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1056">
+ <a href="https://help.gnome.org">Documentation</a></li>
+
+ <li id="menu-item-1057" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1057">
+ <a href="https://wiki.gnome.org">Wiki</a></li>
+
+ <li id="menu-item-1058" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1058">
+ <a href="https://mail.gnome.org/mailman/listinfo">Mailing Lists</a></li>
+
+ <li id="menu-item-1059" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1059">
+ <a href="https://wiki.gnome.org/GnomeIrcChannels">IRC Channels</a></li>
+
+ <li id="menu-item-1060" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1060">
+ <a href="https://bugzilla.gnome.org/">Bug Tracker</a></li>
+
+ <li id="menu-item-1061" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1061">
+ <a href="https://git.gnome.org/browse/">Development Code</a></li>
+
+ <li id="menu-item-1062" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1062">
+ <a href="https://wiki.gnome.org/Jhbuild">Build Tool</a></li>
+ </ul>
+ </li>
+
+ <li id="menu-item-1046" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1046">
+ <a href="/news">News</a>
+
+ <ul class="sub-menu">
+ <li id="menu-item-1063" class=
+ "menu-item menu-item-type-post_type menu-item-object-page menu-item-1063">
+ <a href="https://www.gnome.org/press/">Press Releases</a></li>
+
+ <li id="menu-item-1064" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1064">
+ <a href="https://www.gnome.org/start/stable">Latest Release</a></li>
+
+ <li id="menu-item-1065" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1065">
+ <a href="https://planet.gnome.org">Planet GNOME</a></li>
+
+ <li id="menu-item-1067" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1067">
+ <a href="https://news.gnome.org">Development News</a></li>
+
+ <li id="menu-item-1068" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1068">
+ <a href="https://identi.ca/gnome">Identi.ca</a></li>
+
+ <li id="menu-item-1069" class=
+ "menu-item menu-item-type-custom menu-item-object-custom menu-item-1069">
+ <a href="https://twitter.com/gnome">Twitter</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ <div id="footnotes" class="grid_9">
+ <p> Copyright © 2015 - 2016 <a href="https://www.gnome.org/"><strong>The GNOME
Project</strong></a>.<br />
+ <small><a href="http://validator.w3.org/check/referer">Optimised</a> for <a href=
+ "http://www.w3.org/">standards</a>. Hosted by <a href="http://www.redhat.com/">Red Hat</a>.
+ </div>
+ </div>
+ </div>
</body>
</html>
diff --git a/templates/delete.html b/templates/delete.html
index a9dbc23..591e1c0 100644
--- a/templates/delete.html
+++ b/templates/delete.html
@@ -1,11 +1,8 @@
{% extends "default.html" %}
{% block title %}Confirm Removal?{% endblock %}
-{% block page_header %}
-<h1>Confirm Removal?</h1>
-{% endblock %}
-
{% block content %}
+<h1>Confirm Removal?</h1>
<p>
Once deleted, reviews are gone <b>forever</b>.
</p>
diff --git a/templates/distros.html b/templates/distros.html
index 0028812..5fc98bc 100644
--- a/templates/distros.html
+++ b/templates/distros.html
@@ -1,9 +1,5 @@
{% extends "default.html" %}
-{% block title %}Statistics{% endblock %}
-
-{% block page_header %}
-<h1>Reviews from Distributions</h1>
-{% endblock %}
+{% block title %}Reviews from Distributions{% endblock %}
{% block content %}
<script src="/static/Chart.js"></script>
@@ -11,7 +7,8 @@
Chart.defaults.global.animation = false;
</script>
-<canvas id="reviewsChart" width="800" height="400"></canvas>
+<h2>Where Reviews Come From</h2>
+<canvas id="reviewsChart" width="900" height="400"></canvas>
<script>
var ctx = document.getElementById("reviewsChart").getContext("2d");
var data = {
diff --git a/templates/error.html b/templates/error.html
index 5469eb4..477ddd6 100644
--- a/templates/error.html
+++ b/templates/error.html
@@ -1,6 +1,7 @@
{% extends "default.html" %}
{% block title %}Error{% endblock %}
-{% block page_header %}<h1>Error!</h1>{% endblock %}
-{% block content %}{% endblock %}
+{% block content %}
+<h1>Error!</h1>
+{% endblock %}
diff --git a/templates/graph-month.html b/templates/graph-month.html
index a80dc85..e3fca8b 100644
--- a/templates/graph-month.html
+++ b/templates/graph-month.html
@@ -1,9 +1,5 @@
{% extends "default.html" %}
-{% block title %}Analytics{% endblock %}
-
-{% block page_header %}
-<h1>Review Activity (day)</h1>
-{% endblock %}
+{% block title %}Review Activity (day){% endblock %}
{% block content %}
<script src="/static/Chart.js"></script>
@@ -11,8 +7,10 @@
Chart.defaults.global.animation = false;
</script>
+<a href="/admin/graph_year">Show the graphs for the last year...</a>
+
<h2>Review Requests</h2>
-<canvas id="reviewsChart" width="1200" height="400"></canvas>
+<canvas id="reviewsChart" width="900" height="400"></canvas>
<script>
var ctx = document.getElementById("reviewsChart").getContext("2d");
var data = {
@@ -34,7 +32,7 @@ var myLineChartDays = new Chart(ctx).Line(data, null);
</script>
<h2>Submitted Reviews</h2>
-<canvas id="reviewsChart2" width="1200" height="400"></canvas>
+<canvas id="reviewsChart2" width="900" height="400"></canvas>
<script>
var ctx = document.getElementById("reviewsChart2").getContext("2d");
var data = {
diff --git a/templates/graph-year.html b/templates/graph-year.html
index df0180c..b0a7f5f 100644
--- a/templates/graph-year.html
+++ b/templates/graph-year.html
@@ -1,9 +1,5 @@
{% extends "default.html" %}
-{% block title %}Analytics{% endblock %}
-
-{% block page_header %}
-<h1>Review Activity (month)</h1>
-{% endblock %}
+{% block title %}Review Activity (month){% endblock %}
{% block content %}
<script src="/static/Chart.js"></script>
@@ -11,8 +7,10 @@
Chart.defaults.global.animation = false;
</script>
+<a href="/admin/graph_year">Show the graphs for the last month...</a>
+
<h2>Review Requests</h2>
-<canvas id="reviewsChart" width="1200" height="400"></canvas>
+<canvas id="reviewsChart" width="900" height="400"></canvas>
<script>
var ctx = document.getElementById("reviewsChart").getContext("2d");
var data = {
@@ -34,7 +32,7 @@ var myLineChartDays = new Chart(ctx).Line(data, null);
</script>
<h2>Submitted Reviews</h2>
-<canvas id="reviewsChart2" width="1200" height="400"></canvas>
+<canvas id="reviewsChart2" width="900" height="400"></canvas>
<script>
var ctx = document.getElementById("reviewsChart2").getContext("2d");
var data = {
diff --git a/templates/index.html b/templates/index.html
index b9ccf95..5f4eb85 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -3,12 +3,7 @@
{% block content %}
-<h1>ODRS: Open Desktop Ratings Service</h1>
-<p>
-A Flask web service for submitting application reviews.
-</p>
-
-<h2>Concept</h2>
+<h2>GNOME Open Desktop Ratings</h2>
<p>
Choosing an application to install is hard when there are lots of
possible projects matching a specific search term.
@@ -32,9 +27,6 @@ A Flask web service for submitting application reviews.
abuse the service although this reviewing facility will go away if it
starts being misused.
</p>
-<p>
- <b>The API might change, and without warning. Caveat Emptor!</b>
-</p>
<h2>Privacy</h2>
<p>
diff --git a/templates/login.html b/templates/login.html
index 084dfc0..4db6db6 100644
--- a/templates/login.html
+++ b/templates/login.html
@@ -1,10 +1,6 @@
{% extends "default.html" %}
{% block title %}Login{% endblock %}
-{% block page_header %}
-<h1>Please Login</h1>
-{% endblock %}
-
{% block content %}
<p>
You can request an account if you think it is required.
diff --git a/templates/oars.html b/templates/oars.html
index ec02089..3b1a741 100644
--- a/templates/oars.html
+++ b/templates/oars.html
@@ -1,10 +1,6 @@
{% extends "default.html" %}
{% block title %}OARS: Open Age Ratings Service{% endblock %}
-{% block page_header %}
-<h1>Open Age Ratings Service</h1>
-{% endblock %}
-
{% block content %}
<script>
diff --git a/templates/show-all.html b/templates/show-all.html
index 89e458c..ab55c9b 100644
--- a/templates/show-all.html
+++ b/templates/show-all.html
@@ -1,10 +1,6 @@
{% extends "default.html" %}
{% block title %}All Reviews{% endblock %}
-{% block page_header %}
-<h1>All Reviews</h1>
-{% endblock %}
-
{% block content %}
{% if reviews|length == 0 %}
@@ -12,7 +8,7 @@
There are no results for this query.
</p>
{% else %}
-<table class="history">
+<table>
<tr>
<th>#</th>
<th>Created / Deleted</th>
@@ -25,37 +21,35 @@
<th>Locale</th>
<th>Name</th>
<th>Summary</th>
- <th>Description</th>
</tr>
{% for r in reviews %}
<tr>
- <td class="history"><a href="/admin/review/{{ r.review_id }}">{{ r.review_id }}</a></td>
- <td class="history">
+ <td><a href="/admin/review/{{ r.review_id }}">{{ r.review_id }}</a></td>
+ <td>
{{ format_timestamp(r.date_created) }}
{% if r.date_deleted %}
<br/>
<i class="important">{{ format_timestamp(r.date_deleted) }}</i>
{% endif %}
</td>
- <td class="history">{{ r.app_id.replace('.desktop', '') }}</td>
- <td class="history">{{ r.version }}</td>
- <td class="history">{{ format_rating(r.rating) }}</td>
- <td class="history">{{ r.karma_up }}</td>
+ <td>{{ r.app_id.replace('.desktop', '').replace('.Application', '') }}</td>
+ <td>{{ r.version }}</td>
+ <td>{{ format_rating(r.rating) }}</td>
+ <td>{{ r.karma_up }}</td>
{% if r.reported > 0 %}
- <td class="history"><i class="important">{{ r.karma_down }}</i></td>
+ <td><i class="important">{{ r.karma_down }}</i></td>
{% else %}
- <td class="history">{{ r.karma_down }}</td>
+ <td>{{ r.karma_down }}</td>
{% endif %}
- <td class="history">{{ r.distro }}</td>
- <td class="history">{{ r.locale }}</td>
+ <td>{{ r.distro.replace(' GNU/Linux', '') }}</td>
+ <td>{{ r.locale }}</td>
{% if r.user_display %}
- <td class="history">{{ r.user_display }}</td>
+ <td>{{ format_truncate(r.user_display, 15) }}</td>
{% else %}
- <td class="history"><i>Unknown</i></td>
+ <td><i>Unknown</i></td>
{% endif %}
- <td class="history">{{ format_truncate(r.summary, 20) }}</td>
- <td class="history">{{ format_truncate(r.description, 40) }}</td>
+ <td>{{ format_truncate(r.summary, 15) }}</td>
</tr>
{% endfor %}
diff --git a/templates/show.html b/templates/show.html
index 1c9b8ba..e2c8af7 100644
--- a/templates/show.html
+++ b/templates/show.html
@@ -1,14 +1,10 @@
{% extends "default.html" %}
{% block title %}Review #{{ review_id }}{% endblock %}
-{% block page_header %}
-<h1>Review #{{ r.review_id }}</h1>
-{% endblock %}
-
{% block content %}
<form name="myform" action="/admin/modify/{{ r.review_id }}" method="POST">
-<table class="history">
+<table>
<tr>
<th>Application</th>
<td>
diff --git a/templates/stats.html b/templates/stats.html
index 9c81813..5cfedac 100644
--- a/templates/stats.html
+++ b/templates/stats.html
@@ -1,18 +1,11 @@
{% extends "default.html" %}
{% block title %}Statistics{% endblock %}
-{% block page_header %}
-<h1>Service Statistics</h1>
-{% endblock %}
-
{% block content %}
-<table class="history">
- <tr>
- <th>Event</th>
- <th>Value</th>
- </tr>
-{% for key, value in results %}
+<h2>Web Service Statistics</h2>
+<table>
+{% for key, value in results_stats %}
<tr>
<td> {{ key }} </td>
<td> {{ value }} </td>
@@ -20,4 +13,18 @@
{% endfor %}
</table>
+<h2>Popularity By Page View</h2>
+<ol>
+{% for name, cnt in results_viewed %}
+ <li>{{ name }} ({{ cnt }})</li>
+{% endfor %}
+</ol>
+
+<h2>Popularity By Submitted Reviews</h2>
+<ol>
+{% for name, cnt in results_submitted %}
+ <li>{{ name }} ({{ cnt }})</li>
+{% endfor %}
+</ol>
+
{% endblock %}
diff --git a/templates/users.html b/templates/users.html
index afc8580..df18abf 100644
--- a/templates/users.html
+++ b/templates/users.html
@@ -1,14 +1,10 @@
{% extends "default.html" %}
{% block title %}Users{% endblock %}
-{% block page_header %}
-<h1>User Statistics</h1>
-{% endblock %}
-
{% block content %}
<h2>Most Awesome Users</h2>
-<table class="history">
+<table>
<tr>
<th>User</th>
<th>Karma</th>
@@ -16,7 +12,7 @@
<th>Created</th>
<th>Banned</th>
</tr>
-{% for u in users1 %}
+{% for u in users_awesome %}
<tr>
<td> {{ u.id }} </td>
<td> {{ u.karma }} </td>
@@ -36,7 +32,7 @@
</table>
<h2>Haters Gonna Hate</h2>
-<table class="history">
+<table>
<tr>
<th>User</th>
<th>Karma</th>
@@ -44,7 +40,7 @@
<th>Created</th>
<th>Banned</th>
</tr>
-{% for u in users2 %}
+{% for u in users_haters %}
<tr>
<td> {{ u.id }} </td>
<td> {{ u.karma }} </td>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]