diff options
| -rw-r--r-- | public/assets/css/bucky.css | 38 | ||||
| -rw-r--r-- | public/assets/js/lib/views/details/comments.js | 2 | ||||
| -rw-r--r-- | public/assets/js/lib/views/details/files.js | 2 | ||||
| -rw-r--r-- | public/assets/js/util/format.js | 4 | ||||
| -rw-r--r-- | views/pages/details.ejs | 12 |
5 files changed, 49 insertions, 9 deletions
diff --git a/public/assets/css/bucky.css b/public/assets/css/bucky.css index 9f19341..5305999 100644 --- a/public/assets/css/bucky.css +++ b/public/assets/css/bucky.css @@ -55,6 +55,10 @@ h1 { top: 1px; margin-bottom: 5px; } +a:link { color: #2050ca; text-decoration: underline; } +a:visited { color: #1030aa; text-decoration: none; } +a:active { color: #a0a0c7; text-decoration: underline; } +a:hover { color: #2040f0; text-decoration: underline; } hr { border-color: #000; } @@ -220,3 +224,37 @@ tr:nth-child(even) td.black:hover { background-color: #f8f8f8; color: #000000; .old { color: #425050; } .older { color: #5D6464; } .quiet { color: #787878; } + + +#comments, #comments tr { + margin: 0; padding: 0; + border-spacing: 0; +} +.comment { + padding: 4px 6px 8px 6px; + border-bottom: 1px solid #ccc; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; +} +tr .user { + padding: 4px; + text-align: center; +} +tr .user img { + border: 1px solid; +} +tr:first-child .comment { + border-top: 1px solid #ccc; +} +.comment div { + font-size: 12px; + padding-top: 3px; + padding-bottom: 20px; +} +.comment .date { + float: right; +} +.comment .edit-links { +} +tr:nth-child(even) td.comment { background-color: #f3f1f2; } +tr:nth-child(odd) td.comment { background-color: #fcf8f8; } diff --git a/public/assets/js/lib/views/details/comments.js b/public/assets/js/lib/views/details/comments.js index 164a3b1..168cc3f 100644 --- a/public/assets/js/lib/views/details/comments.js +++ b/public/assets/js/lib/views/details/comments.js @@ -15,7 +15,7 @@ var CommentsView = FormView.extend({ }, parse: function(comment){ - var datetime = verbose_date(comment.date) + var datetime = verbose_date(comment.date, true) var t = this.template.replace(/{{username}}/g, comment.username) .replace(/{{comment}}/g, comment.comment) .replace(/{{date}}/g, datetime[0]) diff --git a/public/assets/js/lib/views/details/files.js b/public/assets/js/lib/views/details/files.js index 5a19519..b19cf3c 100644 --- a/public/assets/js/lib/views/details/files.js +++ b/public/assets/js/lib/views/details/files.js @@ -29,7 +29,7 @@ var FilesView = FormView.extend({ parse: function(file){ var size = hush_size(file.size) - var datetime = verbose_date(file.date) + var datetime = verbose_date(file.date, true) var date_class = carbon_date(file.date) var t = this.template.replace(/{{username}}/g, file.username) diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js index de8fd65..b789602 100644 --- a/public/assets/js/util/format.js +++ b/public/assets/js/util/format.js @@ -22,7 +22,7 @@ function privacy_dot (p) { } var short_months = "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ") -function verbose_date (date) { +function verbose_date (date, no_pad_hours) { var date = new Date(date * 1000) var d = date.getDate() var m = date.getMinutes() @@ -46,7 +46,7 @@ function verbose_date (date) { if (d < 10) d = "0" + d if (m < 10) m = "0" + m - if (h < 10) h = "0" + h + if (! no_pad_hours && h < 10) h = "0" + h var date = d + '‑' + short_months[date.getMonth()] + '‑' + date.getFullYear() var time = h + ':' + m + meridian diff --git a/views/pages/details.ejs b/views/pages/details.ejs index ea3333c..1f36ab4 100644 --- a/views/pages/details.ejs +++ b/views/pages/details.ejs @@ -6,12 +6,14 @@ <table id="comments"> <script class="template" type="text/html"> <tr> - <td> - <a href="/profile/{{username}}"><img src="//www.carbonpictures.com/bucky/data/profile/.thumb/am.{{username}}.jpg"></a> + <td class="user"> + <a href="/profile/{{username}}"><img src="//www.carbonpictures.com/bucky/data/profile/.thumb/al.{{username}}.jpg"></a> <a href="/profile/{{username}}">{{username}}</a> - <td colspan="2"> - {{comment}} - <br><br> + </td> + <td colspan="2" class="comment"> + <div> + {{comment}} + </div> <span class="date"> {{date}} {{time}} </span> |
