diff --git a/public/css/admin.less b/public/css/admin.less new file mode 100644 index 0000000000..a46acef14c --- /dev/null +++ b/public/css/admin.less @@ -0,0 +1,76 @@ +.inline-block { + display: inline-block; + *display: inline; + zoom: 1; +} + +.pointer { + cursor: pointer; + *cursor: hand; +} + +.entry-row { + border-radius: 10px; + margin-bottom: 10px; + padding: 10px; + cursor: move; + width: 555px; +} +.admin-categories { + form { + margin: 0 0 0px; + } + + input { + height: 20px; + padding: 5px; + margin-left: 10px; + width: 150px; + border: 0; + border-radius: 5px; + margin-top: -8px; + } + + select { + border: 0; + margin-left: 10px; + padding: 5px; + margin-top: -8px; + } + + button { + margin-top: -7px; + } + + .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; + .inline-block; + .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; + + &:hover { + background-color: rgba(128, 128, 128, 0.2); + } + } +} \ No newline at end of file diff --git a/public/templates/admin/themes.tpl b/public/templates/admin/themes.tpl index 557badf03b..6bb6cedb3c 100644 --- a/public/templates/admin/themes.tpl +++ b/public/templates/admin/themes.tpl @@ -21,6 +21,7 @@ for(var x=0;x' + '
' + '
' + @@ -52,6 +53,17 @@ cssEl.href = cssSrc; break; + case 'use': + var parentEl = $(e.target).parents('li'), + cssSrc = parentEl.attr('data-css'), + cssName = parentEl.attr('data-theme'); + socket.emit('api:config.set', { + key: 'theme:id', value: 'bootswatch:' + cssName + }); + socket.emit('api:config.set', { + key: 'theme:src', value: cssSrc + }); + break; } } }, false); diff --git a/src/websockets.js b/src/websockets.js index 540945eff3..38855755eb 100644 --- a/src/websockets.js +++ b/src/websockets.js @@ -300,7 +300,6 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }), }); socket.on('api:config.set', function(data) { - console.log('saving', data); meta.config.set(data.key, data.value, function(err) { if (!err) socket.emit('api:config.set', { status: 'ok' }); });