diff options
Diffstat (limited to 'public')
| -rw-r--r-- | public/assets/css/bucky.css | 27 | ||||
| -rw-r--r-- | public/assets/js/lib/router.js | 6 | ||||
| -rw-r--r-- | public/assets/js/lib/views/details/files.js | 6 | ||||
| -rw-r--r-- | public/assets/js/lib/views/index/lastlog.js | 2 | ||||
| -rw-r--r-- | public/assets/js/lib/views/index/threadbox.js | 15 | ||||
| -rw-r--r-- | public/assets/js/lib/views/profile/profile.js | 4 |
6 files changed, 50 insertions, 10 deletions
diff --git a/public/assets/css/bucky.css b/public/assets/css/bucky.css index 074da47..278e235 100644 --- a/public/assets/css/bucky.css +++ b/public/assets/css/bucky.css @@ -3,8 +3,12 @@ } html { padding-bottom: 300px; + width: 100:; + height: 100%; } body { + width: 100:; + height: 100%; background-color: #e6f0f0; transition: background-color 100ms; color: #111111; @@ -107,6 +111,8 @@ a:active { color: #a0a0c7; text-decoration: underline; } .desktop a:hover { color: #2040f0; text-decoration: underline; } hr { border-color: #000; + opacity: 0.6; + height: 2px; } input[type=text], input[type=password] { @@ -967,12 +973,12 @@ header .search_form { max-width: 300px; max-height: 300px; } -#profile td { +.profile_meta td { padding: 4px; font-size: 13px; color: #211; } -#profile td:first-child { +.profile_meta td:first-child { font-weight: bold; padding-right: 20px; color: #322; @@ -1017,6 +1023,20 @@ header .search_form { margin-left: 7px; } +/* ADMIN */ + +.admin { + height: 100%; + background-image: linear-gradient(to bottom, rgba(255,254,248,0.5) 0%,rgba(0,0,0,0) 100%); + background-position: fixed; +} +.admin h1, big { + text-shadow: 0 2px 4px #fff; +} +.admin #content { + padding-top: 10px; +} + /* 404 */ #error_404 { @@ -1113,6 +1133,9 @@ audio { #content { width: 100%; } + .admin #sidebar { + display: block; + } .index header .search_form { display: block; } diff --git a/public/assets/js/lib/router.js b/public/assets/js/lib/router.js index 9ac6336..b6eff73 100644 --- a/public/assets/js/lib/router.js +++ b/public/assets/js/lib/router.js @@ -25,6 +25,7 @@ var SiteRouter = Router.extend({ "/profile": 'profile', "/profile/:username": 'profile', "/profile/:username/edit": 'editProfile', + "/adminz": 'adminz', }, initialize: function(){ @@ -103,6 +104,11 @@ var SiteRouter = Router.extend({ app.view = new SearchResults () app.view.load() }, + + adminz: function(){ + app.view = new AdminView () + app.view.load() + }, error404: function(){ $("content").hide() diff --git a/public/assets/js/lib/views/details/files.js b/public/assets/js/lib/views/details/files.js index 00ca201..44c65c4 100644 --- a/public/assets/js/lib/views/details/files.js +++ b/public/assets/js/lib/views/details/files.js @@ -38,8 +38,10 @@ var FilesView = FormView.extend({ audio.init() } - const sort = this.thread.settings.sort || "name_asc" - this.resort(sort) + if (this.thread) { + const sort = this.thread.settings.sort || "name_asc" + this.resort(sort) + } }, files: [], diff --git a/public/assets/js/lib/views/index/lastlog.js b/public/assets/js/lib/views/index/lastlog.js index 02b3cca..7a738b7 100644 --- a/public/assets/js/lib/views/index/lastlog.js +++ b/public/assets/js/lib/views/index/lastlog.js @@ -29,7 +29,7 @@ var LastLog = View.extend({ parse: function(user){ if (Date.now()/1000 - user.lastseen > 86400 * 5 *10) return '' var t = this.template - .replace(/{{username}}/g, user.username) + .replace(/{{username}}/g, sanitize(user.username)) .replace(/{{age}}/g, get_age(user.lastseen) ) .replace(/{{age_class}}/g, carbon_date(user.lastseen) ) .trim() diff --git a/public/assets/js/lib/views/index/threadbox.js b/public/assets/js/lib/views/index/threadbox.js index e3a5193..34974b7 100644 --- a/public/assets/js/lib/views/index/threadbox.js +++ b/public/assets/js/lib/views/index/threadbox.js @@ -40,9 +40,18 @@ var ThreadBox = View.extend({ }) Object.keys(keywords).sort().forEach((keyword) => { this.appendKeyword({ keyword }) - this.appendThreads(keywords[keyword].sort( (a,b) => { - return a.title.localeCompare(b.title) // b.lastmodified - a.lastmodified - })) + switch (data.sort) { + case 'date': + this.appendThreads(keywords[keyword].sort( (a,b) => { + return b.lastmodified - a.lastmodified + })) + break + default: + this.appendThreads(keywords[keyword].sort( (a,b) => { + return a.title.localeCompare(b.title) + })) + break + } }) } if (is_mobile || window.innerWidth < 700) { diff --git a/public/assets/js/lib/views/profile/profile.js b/public/assets/js/lib/views/profile/profile.js index a738950..46ade8e 100644 --- a/public/assets/js/lib/views/profile/profile.js +++ b/public/assets/js/lib/views/profile/profile.js @@ -26,8 +26,8 @@ var ProfileView = View.extend({ // this.comments.load(data.comments, data.thread) this.gallery.load(files) this.files.load(files) - this.files.resort("date", "asc") - this.threadbox.load({ threads, user }) + this.files.resort("date_desc") + this.threadbox.load({ threads, user, sort: 'date' }) }, populate: function(user){ |
