From 5c6eea6606459a89eeba9d23e968884b6299933e Mon Sep 17 00:00:00 2001 From: Shaker Islam Date: Thu, 17 Apr 2014 15:04:03 -0500 Subject: [PATCH 1/5] everything except the @ vars --- app/styles/main.less | 260 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 260 insertions(+) create mode 100644 app/styles/main.less diff --git a/app/styles/main.less b/app/styles/main.less new file mode 100644 index 000000000..7721e54cd --- /dev/null +++ b/app/styles/main.less @@ -0,0 +1,260 @@ +.cf:before, +.cf:after { + content: " "; /* 1 */ + display: table; /* 2 */ +} + +.cf:after { + clear: both; +} + +/** + * For IE 6/7 only + * Include this rule to trigger hasLayout and contain floats. + */ +.cf { + *zoom: 1; +} + +textarea, input, button { outline: none; } + +.image img{ width: 100%; } + +body { background-color: #F1F1F1 } + +#footer { text-align: center } + +#results { + + .label { margin-left: 4px; + + &:first-child { margin-left: 0 } } } + +#refine { + + legend { font-size: 1em; line-height: 1.786em; font-weight: bold; text-transform: uppercase; + + a { display: block } } + + .nav-header { padding-left: 0 } + + &.form-horizontal .control-group, &.form-horizontal legend { margin-bottom: 10px } } + +#logo { width: 50px; height: 50px; + + img { width: 50px; height: 50px; } } + +.navbar-brand { padding: 0px; margin-left: 15px; } + +#button-area { position: fixed; right: 25px; top: 25px; display: block; } + +#appbar { position: absolute; top: 0px; left: 0px; background-color: #333333; width: 100%; font-size: 13px; + + a { padding: 5px; color: #fff; } + + a:hover { text-decoration: none } } + +.pagination a { cursor: pointer } + +.autocomplete.dropdown { position: absolute; background-color: #fff; border: 1px solid #CCCCCC; border-top: 0; z-index: 1000; + + .entry.selected { background-color: #4A88CE; color: #fff; } + + .entry { cursor: pointer; + + .glyphicon { margin-right: 5px } } } + +#nprogress .bar { z-index: 1000 } + +.progress-overlay { display: none; position: absolute; width: 100%; height: 100%; top: 0; left: 0; z-index: 999; background-color: rgba(50, 50, 50, 0.5); } + +.callout { border-left: 5px solid #eee; margin: 10px 0 0 0; padding: 10px 30px 15px 15px; + + p:last-child { margin-bottom: 0 } + + &:first-child { margin-top: 0; } + + code, .highlight { background-color: #fff } + + h4 { margin-top: 0 } } + +.edit-page .editor a { background-color: red !important; + + /* href that doesn't begin with HTTP or a / */ + &[href^=http], &[href^=mailto], &[href^="/"] { background-color: transparent !important; } } + +/* Content page */ +.hideOverflow { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; } + +body { overflow-x: hidden; } + +.panel-heading .published { display: inline-block; vertical-align: bottom; float: none; text-align: left; } + +.publish-widget > a { cursor: pointer; } + +td.preview { min-width: 120px; } + +td.feature-type abbr { max-width: 100px; float: left; } + +td.author { max-width: 150px; } + +.no-image { color: #EEEEEE; display: block; font-size: 100px; text-align: center; width: 100%; transition: all 0.2s ease-in-out 0s; + + &:hover { color: #dedede; } + + .fa + span { clear: both; display: block; font-size: 12px; font-weight: bold; margin-bottom: 20px; margin-top: -20px; } } + +.filter-object-container { .TypeStackLg; margin-top: 5px; + + .clear-button:first-child { display: none; } + + .label { padding: 0.3em 0.6em; margin-right: 3px; cursor: pointer; + + span { margin-right: 3px; } } } + +.filterwidget { + + .filter-input:focus { outline: 0; } + + .dropdown-menu { top: 43px; + + li a { cursor: pointer; } + + .glyphicon { margin-left: -7px; margin-right: 7px; } } } + +.panel .panel-heading { overflow: hidden; text-overflow: ellipsis; cursor: pointer; padding: 6px 10px 7px 10px; + + .small { line-height: 16px; } + + .panel-title { font-size: inherit; white-space: nowrap; } } + +#contentListAccordion { + + .thumbnail { text-decoration: none !important; } + + .panel-heading { padding: 4px 5px; + + + .panel-collapse { margin-top: 5px; + + .panel-body { + + > div { padding-right: 0; padding-left: 0; } + + dt { margin-top: 10px; + + &:first-child { margin-top: 0; } } } } } } + +/* Create content */ +#create { + + .enter-title-back{ margin-left: -25px; } + + .modal-body{ padding-bottom: 0; + + button.go{ width: 100%; margin-top: 5px; } } } + +/* navbar */ +nav.navbar{ + ul li:not(:first-child){ + border-left: 1px solid #F1F1F1; + } +} + + +.filterwidget { position: relative; } + +#page-prev { margin-bottom: 10px; + + .h5 { margin-bottom: 10px; cursor: pointer; margin-bottom: 0; + + + div { margin-top: 10px; } + + .fa { padding: 4px 2px; } } + + .tab-pane { position: relative; margin: 0 auto; + + > div { + + .inner { width: auto; margin: 0 auto; background: #fff; max-width: 300px; width: auto; padding: 10px; } + + img { border: 1px solid #fff; } } } + + .nav { margin-right: 10px; + + a { position: relative; } } + + .tab-content { overflow: hidden; } + + #device-sm { + + .article-01, .article-02 { width: 100%; } + + .article-03, .article-04, .article-05, .article-06 { width: 40%; clear: both; margin-top: 10px; } } + + #device-md { + + .article-01, .article-02 { width: 100%; } + + .article-03, .article-04, .article-05, .article-06 { width: 50%; } } + + #device-lg { + + .inner { max-width: 600px; } + + .article-01, .article-02 { width: 50%; } + + .article-03, .article-04, .article-05, .article-06 { width: 25%; } } } + +.promotion-container { + + .promotion-area { margin-bottom: 20px; } + + .panel-body { margin-bottom: 0; } + + .article { position: relative; } + + .media { margin-top: 10px; border-bottom: 1px solid #ccc; padding-bottom: 10px; padding-right: 40px; } + + .move-up, .move-down { margin: 0; position: absolute; right: 10px; z-index: 10; } + + .move-up { top: 5px } + + .move-down { bottom: 10px } + + .sidebar-articles-container { position: relative } + + .sidebar-article-container { border: 1px solid #CCC; border-radius: 4px; overflow: auto; position: relative; + + .button-container { height: 100%; position: absolute; width: 60px; + + button { height: 50%; width: 65px; } } } + + .promotion-area.select-mode .article-container { border: 1px solid #CCC; box-shadow: 0px 0px 70px #CCC; cursor: pointer; + + &:hover { border: 1px solid #428BCA; box-shadow: 0px 0px 70px #428BCA; } } + + .promotion-container { + + .filterwidget { padding: 0; width: 100%; } + + .sidebar-articles-container { width: 100% } } + + .save-button-container { opacity: 0.8; position: fixed; right: 50px; top: 10px; width: 100px; z-index: 1000; } } + +#targeting { + + .panel-heading { cursor: default; } + + .targeting-group { margin-bottom: 0; + + th { padding-top: 0; } + + td, th { border-top: 0 !important; } } + + .targeting-table { padding-top: 0; } } + +#pzone-content { + + .close { margin-top: 5px; } } + +#targeting .panel-heading, #pzone-content .panel-heading { cursor: default; } \ No newline at end of file From 623229878cd8175bf64befa6cc232da1a58ace15 Mon Sep 17 00:00:00 2001 From: Shaker Islam Date: Thu, 17 Apr 2014 15:11:28 -0500 Subject: [PATCH 2/5] console logs --- app/scripts/directives/imagedrawer.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/scripts/directives/imagedrawer.js b/app/scripts/directives/imagedrawer.js index 57b11e47a..73708d7c0 100644 --- a/app/scripts/directives/imagedrawer.js +++ b/app/scripts/directives/imagedrawer.js @@ -43,7 +43,6 @@ angular.module('bulbsCmsApp') //which makes ng-repeat fully refresh the library //can make this a lot smarter params = params || {}; - console.log(BC_API_KEY) $http({ method: 'GET', url: routes.BC_ADMIN_URL + '/api/search', @@ -68,7 +67,6 @@ angular.module('bulbsCmsApp') }; var refreshCurrentImage = function (id, field) { - console.log(BC_API_KEY) $http({ url: routes.BC_ADMIN_URL + '/api/' + id, method: 'GET', From eb821304c9a78886f75f21d2ab27b9ecdb2a18c9 Mon Sep 17 00:00:00 2001 From: Shaker Islam Date: Thu, 17 Apr 2014 15:20:29 -0500 Subject: [PATCH 3/5] some bugs, gitignore --- .gitignore | 1 + app/styles/main.less | 18 +++++------------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 7911b28d5..4f6bf23c3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ dist .tmp .sass-cache app/bower_components +app/styles/*.css diff --git a/app/styles/main.less b/app/styles/main.less index 7721e54cd..894c169ca 100644 --- a/app/styles/main.less +++ b/app/styles/main.less @@ -30,13 +30,13 @@ body { background-color: #F1F1F1 } &:first-child { margin-left: 0 } } } -#refine { +#refine { legend { font-size: 1em; line-height: 1.786em; font-weight: bold; text-transform: uppercase; a { display: block } } - .nav-header { padding-left: 0 } + .nav-header { padding-left: 0 } &.form-horizontal .control-group, &.form-horizontal legend { margin-bottom: 10px } } @@ -104,14 +104,6 @@ td.author { max-width: 150px; } .fa + span { clear: both; display: block; font-size: 12px; font-weight: bold; margin-bottom: 20px; margin-top: -20px; } } -.filter-object-container { .TypeStackLg; margin-top: 5px; - - .clear-button:first-child { display: none; } - - .label { padding: 0.3em 0.6em; margin-right: 3px; cursor: pointer; - - span { margin-right: 3px; } } } - .filterwidget { .filter-input:focus { outline: 0; } @@ -242,7 +234,7 @@ nav.navbar{ .save-button-container { opacity: 0.8; position: fixed; right: 50px; top: 10px; width: 100px; z-index: 1000; } } #targeting { - + .panel-heading { cursor: default; } .targeting-group { margin-bottom: 0; @@ -254,7 +246,7 @@ nav.navbar{ .targeting-table { padding-top: 0; } } #pzone-content { - + .close { margin-top: 5px; } } -#targeting .panel-heading, #pzone-content .panel-heading { cursor: default; } \ No newline at end of file +#targeting .panel-heading, #pzone-content .panel-heading { cursor: default; } From 25d34b70fb29aa15c76afb8527b747ba1541698d Mon Sep 17 00:00:00 2001 From: Shaker Islam Date: Thu, 17 Apr 2014 15:24:53 -0500 Subject: [PATCH 4/5] adding this back --- app/styles/main.less | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/styles/main.less b/app/styles/main.less index 894c169ca..ebe2a85f6 100644 --- a/app/styles/main.less +++ b/app/styles/main.less @@ -104,6 +104,16 @@ td.author { max-width: 150px; } .fa + span { clear: both; display: block; font-size: 12px; font-weight: bold; margin-bottom: 20px; margin-top: -20px; } } +.filter-object-container { + + margin-top: 5px; + + .clear-button:first-child { display: none; } + + .label { padding: 0.3em 0.6em; margin-right: 3px; cursor: pointer; + + span { margin-right: 3px; } } } + .filterwidget { .filter-input:focus { outline: 0; } From 9888b7e084fc496a362e43720f8b39c0f344a6ed Mon Sep 17 00:00:00 2001 From: Shaker Islam Date: Thu, 17 Apr 2014 15:27:02 -0500 Subject: [PATCH 5/5] refactoring --- app/styles/main.less | 48 --------------------------------------- app/styles/promotion.less | 35 ++++++++++++++++++++++++++++ app/styles/targeting.less | 11 +++++++++ 3 files changed, 46 insertions(+), 48 deletions(-) create mode 100644 app/styles/promotion.less create mode 100644 app/styles/targeting.less diff --git a/app/styles/main.less b/app/styles/main.less index ebe2a85f6..b7e11f59b 100644 --- a/app/styles/main.less +++ b/app/styles/main.less @@ -207,54 +207,6 @@ nav.navbar{ .article-03, .article-04, .article-05, .article-06 { width: 25%; } } } -.promotion-container { - - .promotion-area { margin-bottom: 20px; } - - .panel-body { margin-bottom: 0; } - - .article { position: relative; } - - .media { margin-top: 10px; border-bottom: 1px solid #ccc; padding-bottom: 10px; padding-right: 40px; } - - .move-up, .move-down { margin: 0; position: absolute; right: 10px; z-index: 10; } - - .move-up { top: 5px } - - .move-down { bottom: 10px } - - .sidebar-articles-container { position: relative } - - .sidebar-article-container { border: 1px solid #CCC; border-radius: 4px; overflow: auto; position: relative; - - .button-container { height: 100%; position: absolute; width: 60px; - - button { height: 50%; width: 65px; } } } - - .promotion-area.select-mode .article-container { border: 1px solid #CCC; box-shadow: 0px 0px 70px #CCC; cursor: pointer; - - &:hover { border: 1px solid #428BCA; box-shadow: 0px 0px 70px #428BCA; } } - - .promotion-container { - - .filterwidget { padding: 0; width: 100%; } - - .sidebar-articles-container { width: 100% } } - - .save-button-container { opacity: 0.8; position: fixed; right: 50px; top: 10px; width: 100px; z-index: 1000; } } - -#targeting { - - .panel-heading { cursor: default; } - - .targeting-group { margin-bottom: 0; - - th { padding-top: 0; } - - td, th { border-top: 0 !important; } } - - .targeting-table { padding-top: 0; } } - #pzone-content { .close { margin-top: 5px; } } diff --git a/app/styles/promotion.less b/app/styles/promotion.less new file mode 100644 index 000000000..4105c6c2f --- /dev/null +++ b/app/styles/promotion.less @@ -0,0 +1,35 @@ +.promotion-container { + + .promotion-area { margin-bottom: 20px; } + + .panel-body { margin-bottom: 0; } + + .article { position: relative; } + + .media { margin-top: 10px; border-bottom: 1px solid #ccc; padding-bottom: 10px; padding-right: 40px; } + + .move-up, .move-down { margin: 0; position: absolute; right: 10px; z-index: 10; } + + .move-up { top: 5px } + + .move-down { bottom: 10px } + + .sidebar-articles-container { position: relative } + + .sidebar-article-container { border: 1px solid #CCC; border-radius: 4px; overflow: auto; position: relative; + + .button-container { height: 100%; position: absolute; width: 60px; + + button { height: 50%; width: 65px; } } } + + .promotion-area.select-mode .article-container { border: 1px solid #CCC; box-shadow: 0px 0px 70px #CCC; cursor: pointer; + + &:hover { border: 1px solid #428BCA; box-shadow: 0px 0px 70px #428BCA; } } + + .promotion-container { + + .filterwidget { padding: 0; width: 100%; } + + .sidebar-articles-container { width: 100% } } + + .save-button-container { opacity: 0.8; position: fixed; right: 50px; top: 10px; width: 100px; z-index: 1000; } } \ No newline at end of file diff --git a/app/styles/targeting.less b/app/styles/targeting.less new file mode 100644 index 000000000..a110087d6 --- /dev/null +++ b/app/styles/targeting.less @@ -0,0 +1,11 @@ +#targeting { + + .panel-heading { cursor: default; } + + .targeting-group { margin-bottom: 0; + + th { padding-top: 0; } + + td, th { border-top: 0 !important; } } + + .targeting-table { padding-top: 0; } } \ No newline at end of file