From 7d04a9461eb80975b95a4e2c3166bb6d947f7249 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Mon, 5 Oct 2015 01:14:29 +0200 Subject: [PATCH 1/5] Move animations.scss --- app/assets/stylesheets/_application.scss | 1 + app/assets/stylesheets/_flash_messages.scss | 3 --- app/assets/stylesheets/admin.scss | 2 +- app/assets/stylesheets/animations.scss | 23 +++++++++++++++++++ app/assets/stylesheets/mobile/mobile.scss | 1 + .../stylesheets/new_styles/_animations.scss | 22 ------------------ 6 files changed, 26 insertions(+), 26 deletions(-) create mode 100644 app/assets/stylesheets/animations.scss delete mode 100644 app/assets/stylesheets/new_styles/_animations.scss diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index 38302959e..ab54a70be 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -10,6 +10,7 @@ @import 'entypo'; @import 'icons'; @import 'mentions'; +@import 'animations'; @import 'flash_messages'; @import 'sprites'; @import 'hovercard'; diff --git a/app/assets/stylesheets/_flash_messages.scss b/app/assets/stylesheets/_flash_messages.scss index e4b4e46c4..851d9eae8 100644 --- a/app/assets/stylesheets/_flash_messages.scss +++ b/app/assets/stylesheets/_flash_messages.scss @@ -1,6 +1,3 @@ - -@import 'new_styles/animations'; - #flash_notice, #flash_alert, #flash_error { diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index f796777a6..866bba6b3 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -1,5 +1,5 @@ @import 'colors'; -@import 'new_styles/animations'; +@import 'animations'; /** ADMIN STYlES **/ /** user search **/ diff --git a/app/assets/stylesheets/animations.scss b/app/assets/stylesheets/animations.scss new file mode 100644 index 000000000..f42ff32ef --- /dev/null +++ b/app/assets/stylesheets/animations.scss @@ -0,0 +1,23 @@ +// flash message animations - header height is about 50px +@keyframes expose { + 0% { top: -100px; } + 15% { top: 44px; } + 85% { top: 44px; } + 100% { top: -100px; } +} + +// spinner animation +@keyframes spinner { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + +@keyframes pulsate { + from { + opacity: 1; + } + + to { + opacity: .1; + } +} diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index fd433a115..8ee50ef1d 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -2,6 +2,7 @@ @import "bootstrap-complete"; @import "_mixins"; @import "vendor/autoSuggest"; +@import 'animations'; @import "_flash_messages"; @import 'entypo'; @import 'icons'; diff --git a/app/assets/stylesheets/new_styles/_animations.scss b/app/assets/stylesheets/new_styles/_animations.scss deleted file mode 100644 index 64b47cf20..000000000 --- a/app/assets/stylesheets/new_styles/_animations.scss +++ /dev/null @@ -1,22 +0,0 @@ -/* flash message animations - header height is about 50px */ -@keyframes expose { - 0% { top : -100px; } - 15% { top : 44px; } - 85% { top : 44px; } - 100% { top : -100px; } -} - -/* spinner animation */ -@keyframes spinner { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} - -@keyframes pulsate { - from { - opacity: 1; - } - to { - opacity: .1; - } -} From 052d20d30d54b05ae5f214e0e21c26783f61b1f9 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Mon, 5 Oct 2015 01:21:39 +0200 Subject: [PATCH 2/5] Move base.scss --- app/assets/stylesheets/_application.scss | 2 +- .../{new_styles/_base.scss => base.scss} | 67 +++++++++---------- app/views/people/contacts.haml | 2 +- app/views/people/index.html.haml | 2 +- app/views/people/show.html.haml | 2 +- app/views/streams/main_stream.html.haml | 2 +- app/views/tags/show.haml | 2 +- 7 files changed, 38 insertions(+), 41 deletions(-) rename app/assets/stylesheets/{new_styles/_base.scss => base.scss} (57%) diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index ab54a70be..98ee7cc9b 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -14,7 +14,7 @@ @import 'flash_messages'; @import 'sprites'; @import 'hovercard'; -@import 'new_styles/base'; +@import 'base'; @import 'new_styles/interactions'; @import 'spinner'; @import 'timeago'; diff --git a/app/assets/stylesheets/new_styles/_base.scss b/app/assets/stylesheets/base.scss similarity index 57% rename from app/assets/stylesheets/new_styles/_base.scss rename to app/assets/stylesheets/base.scss index 31a5aabfd..b701adb49 100644 --- a/app/assets/stylesheets/new_styles/_base.scss +++ b/app/assets/stylesheets/base.scss @@ -1,19 +1,21 @@ body { margin-top: $navbar-height; - padding : none; - - &.lock { - overflow: hidden; - } + padding: none; } -/* Overflow */ -h1, h2, h3, h4, h5, h6, +// Overflow +h1, +h2, +h3, +h4, +h5, +h6, p, blockquote, code, pre { word-wrap: break-word; } -a.tag { word-break: break-all; } + +.tag { word-break: break-all; } .avatar { border-radius: 4px; @@ -30,8 +32,8 @@ a.tag { word-break: break-all; } &.medium { height: auto; - width: auto; max-width: 75px; + width: auto; } } @@ -39,41 +41,36 @@ a.tag { word-break: break-all; } color: inherit; } -#back-to-top { - display: block; - color: white; - position: fixed; - z-index: 49; - right: 54px; - bottom: 20px; - opacity: 0; - font-size: 2.9em; - padding: 0 12px 0 12px; +.back-to-top { + background-color: $border-dark-grey; border-radius: 10px; - background-color: #aaa; - &:hover { opacity: 0.85 !important; } - &.visible { opacity: 0.5; } + bottom: 20px; + color: $white; + display: block; + font-size: 2.9em; line-height: 1.5; + opacity: 0; + padding: 0 12px; + position: fixed; + right: 54px; + z-index: 49; + + &:hover, + &.visible:hover { + color: $white; + opacity: .85; + } + + &.visible { opacity: .5; } } -/* general purpose classes */ +// general purpose classes .small-horizontal-spacer { min-height: 20px; } -.big-horizontal-spacer { - height: 50px; -} - -/* responsive */ -@media (max-width: 767px) { - body { - padding : 0; - } -} - -/* badge color */ +// badge color .badge-important { background-color: $red; } diff --git a/app/views/people/contacts.haml b/app/views/people/contacts.haml index b1f416448..b1e993f79 100644 --- a/app/views/people/contacts.haml +++ b/app/views/people/contacts.haml @@ -23,7 +23,7 @@ = render partial: 'people/person', locals: hash = will_paginate @contacts_of_contact, renderer: WillPaginate::ActionView::BootstrapLinkRenderer - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ -if user_signed_in? && @person diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml index a2076c3b2..79a2f6595 100644 --- a/app/views/people/index.html.haml +++ b/app/views/people/index.html.haml @@ -37,7 +37,7 @@ = will_paginate(@people) - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ .col-md-4 diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index 56b51eb53..618b6616d 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -33,7 +33,7 @@ %span.loader.hidden .spinner - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ -if user_signed_in? && @person diff --git a/app/views/streams/main_stream.html.haml b/app/views/streams/main_stream.html.haml index 6c9479bd2..3b40e59df 100644 --- a/app/views/streams/main_stream.html.haml +++ b/app/views/streams/main_stream.html.haml @@ -57,5 +57,5 @@ = render 'shared/right_sections' - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ diff --git a/app/views/tags/show.haml b/app/views/tags/show.haml index 8a29d2ca1..67ce26712 100644 --- a/app/views/tags/show.haml +++ b/app/views/tags/show.haml @@ -36,5 +36,5 @@ .col-lg-1.visible-lg#right-sidebar-fixed-sub-background - %a{id:"back-to-top", title:"#{t('layouts.application.back_to_top')}", href:"#"} + %a.back-to-top#back-to-top{title: "#{t('layouts.application.back_to_top')}", href: "#"} ⇧ From e7e1242227c0d5b15aee2dec7d54fe02378edce1 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Mon, 5 Oct 2015 01:55:13 +0200 Subject: [PATCH 3/5] Move code.scss --- app/assets/stylesheets/_application.scss | 2 +- app/assets/stylesheets/{new_styles/_code.scss => code.scss} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename app/assets/stylesheets/{new_styles/_code.scss => code.scss} (100%) diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index 98ee7cc9b..390edbf5d 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -92,7 +92,7 @@ @import 'navbar_left'; /* code */ -@import 'new_styles/code'; +@import 'code'; @import 'highlightjs/github'; /* statistics */ diff --git a/app/assets/stylesheets/new_styles/_code.scss b/app/assets/stylesheets/code.scss similarity index 100% rename from app/assets/stylesheets/new_styles/_code.scss rename to app/assets/stylesheets/code.scss From 92ba0b637407b2f8d9be74f65189b21868832ec7 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Mon, 5 Oct 2015 01:57:34 +0200 Subject: [PATCH 4/5] Move poll.scss --- app/assets/stylesheets/_application.scss | 2 +- .../{new_styles/_poll.scss => poll.scss} | 28 +++++++++++-------- app/assets/templates/poll_tpl.jst.hbs | 4 +-- 3 files changed, 19 insertions(+), 15 deletions(-) rename app/assets/stylesheets/{new_styles/_poll.scss => poll.scss} (75%) diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index 390edbf5d..d1de1a6c2 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -41,7 +41,7 @@ @import 'footer'; @import 'opengraph'; @import 'single-post-view'; -@import 'new_styles/poll'; +@import 'poll'; /* map*/ @import 'leaflet'; diff --git a/app/assets/stylesheets/new_styles/_poll.scss b/app/assets/stylesheets/poll.scss similarity index 75% rename from app/assets/stylesheets/new_styles/_poll.scss rename to app/assets/stylesheets/poll.scss index 1bb65f328..a561aeff2 100644 --- a/app/assets/stylesheets/new_styles/_poll.scss +++ b/app/assets/stylesheets/poll.scss @@ -1,18 +1,20 @@ .poll_form { - border-top: 1px solid $border-grey; border-bottom: 1px solid $border-grey; - margin: 10px 0px 10px 0px; - padding: 10px 0px 5px 0px; + border-top: 1px solid $border-grey; + margin: 10px 0; + padding: 10px 0 5px; - .poll_content { + .poll-content { margin-top: 5px; } - .toggle_result_wrapper { + + .toggle-result-wrapper { display: inline-block; margin-top: 10px; } + form { - margin-bottom: 0px; + margin-bottom: 0; } .result-row > label { width: 100%; } @@ -20,21 +22,23 @@ .progress { background-image: none; box-shadow: 0 0 0; + height: 10px; margin-bottom: 5px; - height: 10px !important; .bar { background: $border-dark-grey none; color: $text-dark-grey; - text-align: left; height: 100%; + text-align: left; } } - .submit[disabled] { - cursor: default; - color: $text-grey; - &:hover, &:active { + .submit[disabled] { + color: $text-grey; + cursor: default; + + &:hover, + &:active { background-image: none; } } diff --git a/app/assets/templates/poll_tpl.jst.hbs b/app/assets/templates/poll_tpl.jst.hbs index 3c834fcf8..9fda886df 100644 --- a/app/assets/templates/poll_tpl.jst.hbs +++ b/app/assets/templates/poll_tpl.jst.hbs @@ -6,7 +6,7 @@ {{t "poll.count" count=poll.participation_count}} -
+
{{#if show_form}}
{{#poll.poll_answers}} @@ -21,7 +21,7 @@
{{/poll.poll_answers}} -
+ From a6d1556502022c0ff338313c9112603b36543840 Mon Sep 17 00:00:00 2001 From: Steffen van Bergerem Date: Mon, 5 Oct 2015 02:22:45 +0200 Subject: [PATCH 5/5] Move typography.scss --- app/assets/stylesheets/_application.scss | 2 +- app/assets/stylesheets/mobile/mobile.scss | 2 +- .../stylesheets/new_styles/_typography.scss | 26 ------------------ app/assets/stylesheets/typography.scss | 27 +++++++++++++++++++ 4 files changed, 29 insertions(+), 28 deletions(-) delete mode 100644 app/assets/stylesheets/new_styles/_typography.scss create mode 100644 app/assets/stylesheets/typography.scss diff --git a/app/assets/stylesheets/_application.scss b/app/assets/stylesheets/_application.scss index d1de1a6c2..b5993d6d9 100644 --- a/app/assets/stylesheets/_application.scss +++ b/app/assets/stylesheets/_application.scss @@ -23,7 +23,7 @@ @import 'typeahead'; /* font overrides */ -@import 'new_styles/typography'; +@import 'typography'; /* login */ @import 'new_styles/login'; diff --git a/app/assets/stylesheets/mobile/mobile.scss b/app/assets/stylesheets/mobile/mobile.scss index 8ee50ef1d..c3639ee68 100644 --- a/app/assets/stylesheets/mobile/mobile.scss +++ b/app/assets/stylesheets/mobile/mobile.scss @@ -14,7 +14,7 @@ @import "mobile/stream_element"; @import "mobile/comments"; -@import "new_styles/typography"; +@import 'typography'; a { color: #2489ce; diff --git a/app/assets/stylesheets/new_styles/_typography.scss b/app/assets/stylesheets/new_styles/_typography.scss deleted file mode 100644 index 0b7b945e6..000000000 --- a/app/assets/stylesheets/new_styles/_typography.scss +++ /dev/null @@ -1,26 +0,0 @@ -/* diaspora custom icons font */ -@font-face { - font-family: "diaspora-custom"; - src: image-url("fonts/diaspora-custom.ttf"); - font-weight: normal; - font-style: normal; - -} - -[class^="diaspora-custom-"]:before, -[class*=" diaspora-custom-"]:before { - font-family: "diaspora-custom" !important; - font-style: normal !important; - font-weight: normal !important; - font-variant: normal !important; - text-transform: none !important; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.diaspora-custom-compose:before { - content: "a"; -} -.diaspora-custom-mail:before { - content: "b"; -} diff --git a/app/assets/stylesheets/typography.scss b/app/assets/stylesheets/typography.scss new file mode 100644 index 000000000..f94253f80 --- /dev/null +++ b/app/assets/stylesheets/typography.scss @@ -0,0 +1,27 @@ +// diaspora custom icons font +@font-face { + font-family: 'diaspora-custom'; + src: image-url('fonts/diaspora-custom.ttf'); + font-weight: normal; + font-style: normal; + +} + +[class^="diaspora-custom-"]:before, +[class*=" diaspora-custom-"]:before { + font-family: 'diaspora-custom'; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-style: normal; + font-variant: normal; + font-weight: normal; + text-transform: none; +} + +.diaspora-custom-compose:before { + content: 'a'; +} + +.diaspora-custom-mail:before { + content: 'b'; +}