From 32eba62ef650d54773fb8b334031ee58aece9ee7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 20 Jun 2013 16:19:17 -0400 Subject: [PATCH] developed during a merge... I am going to hell for this. - also new topics tab in admin panel --- public/css/admin.less | 159 +++++++++++++++++------------- public/css/mixins.less | 10 ++ public/css/noscript.less | 9 +- public/templates/admin/header.tpl | 2 +- public/templates/admin/themes.tpl | 2 +- public/templates/admin/topics.tpl | 65 +++--------- src/routes/admin.js | 11 ++- src/threadTools.js | 30 ++++++ src/topics.js | 17 +++- 9 files changed, 175 insertions(+), 130 deletions(-) diff --git a/public/css/admin.less b/public/css/admin.less index 97615c5f24d4..86bb72c1e7b6 100644 --- a/public/css/admin.less +++ b/public/css/admin.less @@ -1,84 +1,109 @@ @import "mixins"; -.entry-row { - border-radius: 10px; - margin-bottom: 10px; - padding: 10px; - cursor: move; - width: 555px; -} -.admin-categories { - form { - margin: 0 0 0px; - } +.admin { - input { - height: 20px; - padding: 5px; - margin-left: 10px; - width: 150px; - border: 0; - border-radius: 5px; - margin-top: -8px; + .entry-row { + border-radius: 10px; + margin-bottom: 10px; + padding: 10px; + cursor: move; + width: 555px; } - select { - border: 0; - margin-left: 10px; - padding: 5px; - margin-top: -8px; - } + .admin-categories { + form { + margin: 0 0 0px; + } - button { - margin-top: -7px; - } + input { + height: 20px; + padding: 5px; + margin-left: 10px; + width: 150px; + border: 0; + border-radius: 5px; + margin-top: -8px; + } - .icon{ - width: 30px; - height: 30px; - text-align: center; - line-height: 35px; - display: inline-block; - } -} - -.themes { - margin: 0; - padding: 0; - - li { - padding: 10px 16px; - margin: 0.25em 1em; - list-style-type: none; - .pointer; - -webkit-border-radius: 10px; - -moz-border-radius: 10px; - border-radius: 10px; - -webkit-transition: background-color 250ms linear; - -moz-transition: background-color 250ms linear; - -ms-transition: background-color 250ms linear; - -o-transition: background-color 250ms linear; - transition: background-color 250ms linear; - - img { - max-width: 150px; - float: left; + select { + border: 0; + margin-left: 10px; + padding: 5px; + margin-top: -8px; } - h4, p { - margin-left: 170px; + button { + margin-top: -7px; } - p { - font-size: 0.9em; + .icon{ + width: 30px; + height: 30px; + text-align: center; + line-height: 35px; + display: inline-block; + } + } + + .themes { + margin: 0; + padding: 0; + + li { + padding: 10px 16px; + margin: 0.25em 1em; + list-style-type: none; + .pointer; + -webkit-border-radius: 10px; + -moz-border-radius: 10px; + border-radius: 10px; + -webkit-transition: background-color 250ms linear; + -moz-transition: background-color 250ms linear; + -ms-transition: background-color 250ms linear; + -o-transition: background-color 250ms linear; + transition: background-color 250ms linear; + + img { + max-width: 150px; + float: left; + } + + h4, p { + margin-left: 170px; + } + + p { + font-size: 0.9em; + } + + &:hover { + background-color: rgba(128, 128, 128, 0.2); + } } + } + + .motd textarea { + width: 100%; + } + + .topics { + margin: 0; + padding: 0; + + > li { + .zebra; + list-style-type: none; + padding: 1em; + margin-bottom: 1em; + + ul { + margin: 0.5em 0; - &:hover { - background-color: rgba(128, 128, 128, 0.2); + li { + list-style-type: none; + } + } } } -} -.motd textarea { - width: 100%; } \ No newline at end of file diff --git a/public/css/mixins.less b/public/css/mixins.less index fec0b45add01..fbf97b250325 100644 --- a/public/css/mixins.less +++ b/public/css/mixins.less @@ -20,4 +20,14 @@ .clear { clear: both; +} + +.zebra { + &:nth-child(even) { + background: rgba(191,191,191,0.2); + } + + &:nth-child(odd) { + background: rgba(223,223,223,0.2); + } } \ No newline at end of file diff --git a/public/css/noscript.less b/public/css/noscript.less index 3e5508e56016..76f15d2325bc 100644 --- a/public/css/noscript.less +++ b/public/css/noscript.less @@ -5,14 +5,7 @@ noscript { list-style-type: none; padding: 1em; margin-bottom: 1em; - - &:nth-child(even) { - background: rgba(191,191,191,0.2); - } - - &:nth-child(odd) { - background: rgba(223,223,223,0.2); - } + .zebra; } .categories { diff --git a/public/templates/admin/header.tpl b/public/templates/admin/header.tpl index 2a586dad4ad4..35c842149132 100644 --- a/public/templates/admin/header.tpl +++ b/public/templates/admin/header.tpl @@ -26,7 +26,7 @@ - +