summaryrefslogtreecommitdiff
path: root/public/assets
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets')
-rw-r--r--public/assets/css/bucky.css14
-rw-r--r--public/assets/js/lib/views/index/threadbox.js2
-rw-r--r--public/assets/js/util/format.js34
3 files changed, 47 insertions, 3 deletions
diff --git a/public/assets/css/bucky.css b/public/assets/css/bucky.css
index d404fe8..7077308 100644
--- a/public/assets/css/bucky.css
+++ b/public/assets/css/bucky.css
@@ -142,7 +142,12 @@ hr {
border-left: 1px solid #b6aeab; border-right: 1px solid #b6aeab;
}
.threads td:nth-child(3) {
- padding-left: 10px;
+ padding-left: 20px;
+ padding-right: 10px;
+}
+.threads td:nth-child(4),
+.threads td:nth-child(5) {
+ padding-right: 10px;
}
.threads tr:first-child td:nth-child(2) {
border-top: 1px solid #b6aeab;
@@ -209,3 +214,10 @@ tr:nth-child(odd) td.black { background-color: #ccc; border-bottom: 1px so
tr:nth-child(odd) td.black:hover { background-color: #f8f8f8; color: #000000; border-bottom: 1px solid #aaa; }
tr:nth-child(even) td.black { background-color: #eee; border-bottom: 1px solid #aaa; }
tr:nth-child(even) td.black:hover { background-color: #f8f8f8; color: #000000; border-bottom: 1px solid #aaa; }
+
+.new { color: #000000; font-weight: bold; }
+.recent { color: #001111; }
+.med { color: #203838; }
+.old { color: #425050; }
+.older { color: #5D6464; }
+.quiet { color: #787878; }
diff --git a/public/assets/js/lib/views/index/threadbox.js b/public/assets/js/lib/views/index/threadbox.js
index 069f85d..2e7d211 100644
--- a/public/assets/js/lib/views/index/threadbox.js
+++ b/public/assets/js/lib/views/index/threadbox.js
@@ -33,7 +33,7 @@ var ThreadBox = View.extend({
.replace(/{{username}}/g, thread.username)
.replace(/{{privacy_dot}}/g, dot)
.replace(/{{title}}/g, thread.title)
- .replace(/{{age}}/g, get_age(thread.lastmodified) )
+ .replace(/{{age}}/g, verbose_date(thread.lastmodified) )
.replace(/{{age_class}}/g, carbon_date(thread.lastmodified) )
.replace(/{{views}}/g, views[1])
.replace(/{{comments}}/g, comments[1])
diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js
index 7c773d4..90a19d2 100644
--- a/public/assets/js/util/format.js
+++ b/public/assets/js/util/format.js
@@ -21,8 +21,40 @@ function privacy_dot (p) {
else return "·:"
}
+var short_months = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")
+function verbose_date (date) {
+ var date = new Date(date * 1000)
+ var d = date.getDate()
+ var m = date.getMinutes()
+ var h = date.getHours()
+ var meridian
+
+ if (h == 0) {
+ h = 12
+ meridian = " am"
+ }
+ else if (h == 12) {
+ meridian = " pm"
+ }
+ else if (h > 12) {
+ h -= 12
+ meridian = " pm"
+ }
+ else {
+ meridian = " am"
+ }
+
+ if (d < 10) d = "0" + d
+ if (m < 10) m = "0" + m
+ if (h < 10) h = "0" + h
+
+ var date = d + '-' + short_months[date.getMonth()] + '-' + date.getFullYear()
+ var time = h + ':' + m + meridian
+
+ return date + "&nbsp;<small>" + time + "</small>"
+}
function carbon_date (date, no_bold) {
- var span = (+new Date() - date * 1000)
+ var span = (+new Date() / 1000 - date)
if (! no_bold && span < 86400) // modified today
{ color = "new" }
else if (span < 604800) // modifed this week