improve new SPV

* Hopefully fix OEmbed view
* Fix OpenGraph view
* Fix middle border
* Add spacing at the bottom
* Fix comment styles by not including old SPV styles for them (TODO: maybe rescue some stuff there, like the code tag styling)
* Fix avatar size for default avatar
* Remove border below comment pane
* Fix overflow of post body with a lot of text
* Fix stylesheet inclusion
This commit is contained in:
Jonne Haß 2013-08-18 00:30:29 +02:00 committed by Roger Braun
parent b8fb70d44e
commit fa7b756d4d
7 changed files with 80 additions and 48 deletions

View file

@ -48,9 +48,9 @@ $default-border-radius: 3px;
/* Browser compatability */ /* Browser compatability */
@mixin box-shadow($left, $top, $blur, $color:#000){ @mixin box-shadow($left, $top, $blur, $color:#000){
-webkit-box-shadow: $left $top $blur $color; -webkit-box-shadow: $left $top $blur $color;
-moz-box-shadow: $left $top $blur $color; -moz-box-shadow: $left $top $blur $color;
box-shadow: $left $top $blur $color; box-shadow: $left $top $blur $color;
} }
@mixin linear-gradient($from, $to, $start:0%, $end:100%){ @mixin linear-gradient($from, $to, $start:0%, $end:100%){
@ -58,7 +58,7 @@ $default-border-radius: 3px;
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=$from, endColorstr=$to); filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=$from, endColorstr=$to);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#{$from}, endColorstr=#{$to})"; -ms-filter: "progid:DXImageTransform.Microsoft.gradient (GradientType=0, startColorstr=#{$from}, endColorstr=#{$to})";
background-image: -webkit-gradient(linear, 0% $start, 0% $end, from($from), to($to)); background-image: -webkit-gradient(linear, 0% $start, 0% $end, from($from), to($to));
background-image: -moz-linear-gradient(top, $from $start, $to $end); background-image: -moz-linear-gradient(top, $from $start, $to $end);
background-image: -o-linear-gradient(top, $from $start, $to $end); background-image: -o-linear-gradient(top, $from $start, $to $end);
@ -66,7 +66,7 @@ $default-border-radius: 3px;
@mixin horizontal-linear-gradient($from, $to, $start:0%, $end:100%){ @mixin horizontal-linear-gradient($from, $to, $start:0%, $end:100%){
background-image: mix($from,$to); background-image: mix($from,$to);
background-image: -moz-linear-gradient(left, $from $start, $to $end); background-image: -moz-linear-gradient(left, $from $start, $to $end);
background-image: -o-linear-gradient(left, $from $start, $to $end); background-image: -o-linear-gradient(left, $from $start, $to $end);
background-image: -webkit-linear-gradient(left, $from $start, $to $end); background-image: -webkit-linear-gradient(left, $from $start, $to $end);
@ -108,6 +108,9 @@ $default-border-radius: 3px;
} }
@mixin video-overlay(){ @mixin video-overlay(){
position: relative;
cursor: pointer;
.video-overlay { .video-overlay {
background : { background : {
color: rgba(0,0,0, .65); color: rgba(0,0,0, .65);
@ -124,7 +127,7 @@ $default-border-radius: 3px;
top : 50%; top : 50%;
left : 10%; left : 10%;
right : 10%; right : 10%;
height: 60px; height: 60px;
margin-top: -40px; margin-top: -40px;
padding: 10px 7px 10px 80px; padding: 10px 7px 10px 80px;

View file

@ -1,11 +1,13 @@
@import 'compass' @import 'compass'
@import 'ui.css.scss' @import 'ui'
@import '_mixins.css.scss' @import '_mixins'
@import '_flash_messages.scss' @import '_flash_messages'
@import 'new_styles/_spinner' @import 'new_styles/_spinner'
@import 'sidebar.css.scss'
@import 'header.css.scss' @import 'sidebar'
@import 'sprites.css.scss' @import 'header'
@import 'sprites'
@import 'opengraph'
/* ====== media ====== */ /* ====== media ====== */
.media .media
@ -526,7 +528,7 @@ form p
form#update_profile_form p.checkbox_select form#update_profile_form p.checkbox_select
label label
:top 0 :top 0
form p.checkbox_select form p.checkbox_select
label label
@ -1592,32 +1594,11 @@ ul#press_logos
:width 100% :width 100%
.thumb .thumb
:position relative
:cursor pointer
@include video-overlay() @include video-overlay()
iframe, .thumb img iframe, .thumb img
:width 100% :width 100%
.opengraph
:width 100%
a
:display block
:text-decoration none
:color #000
:margin 10px 0px 10px 0px
:border-top solid 1px #DDD
:border-bottom solid 1px #DDD
:padding 10px 0px 5px 0px
:overflow hidden
img
:margin 0px 5px 5px 0px
:float left
:max-width 155px
.og-title
:margin-bottom 5px
.conversation_participants .conversation_participants
:background :background
:color $background :color $background
@ -1730,7 +1711,7 @@ ul#press_logos
:clear right :clear right
:float right :float right
:color #aaa :color #aaa
.icons-users .icons-users
:display block :display block
:width 25px :width 25px
@ -2721,11 +2702,11 @@ body
#fileInfo #fileInfo
:font-size small :font-size small
:text-align right :text-align right
:margin 5px 2px :margin 5px 2px
.post_preview_button .post_preview_button
:padding 3px 9px 4px :padding 3px 9px 4px
.post_preview .post_preview
:padding :padding
:top 5px :top 5px
@ -2774,5 +2755,5 @@ body
a#hide_location:hover a#hide_location:hover
@include opacity(0) @include opacity(0)
:-khtml-opacity 1 :-khtml-opacity 1
:opacity 1 :opacity 1
:cursor pointer :cursor pointer

View file

@ -10,5 +10,4 @@
*= require vendor/facebox *= require vendor/facebox
*= require vendor/fileuploader *= require vendor/fileuploader
*= require vendor/autoSuggest *= require vendor/autoSuggest
*= require single-post-view
*/ */

View file

@ -4,11 +4,9 @@
/* core */ /* core */
@import 'new_styles/flash_messages'; @import 'new_styles/flash_messages';
@import 'sprites.css.scss'; @import 'sprites';
@import 'header.css.scss';
@import 'new_styles/base'; @import 'new_styles/base';
@import 'new_styles/interactions';
@import 'new_styles/viewer_nav'; @import 'new_styles/viewer_nav';
/* font overrides */ /* font overrides */
@ -21,5 +19,8 @@
@import 'new_styles/forms'; @import 'new_styles/forms';
/* new SPV */
@include video-overlay(); @import 'header';
@import 'bootstrap-headerfix';
@import 'opengraph';
@import 'single-post-view';

View file

@ -0,0 +1,24 @@
.opengraph {
width: 100%;
a {
display: block;
text-decoration: none;;
color: #000;
margin: 10px 0px 10px 0px;
border-top: solid 1px #DDD;
border-bottom: solid 1px #DDD;
padding: 10px 0px 5px 0px;
overflow: hidden;
img {
margin: 0px 5px 5px 0px;
float: left;
max-width: 155px;
}
.og-title {
margin-bottom: 5px;
}
}
}

View file

@ -1,10 +1,15 @@
#single-post-container #single-post-container
padding-top: 20px padding-top: 20px
padding-bottom: 3em
#single-post-content #single-post-content
#head #head
color: #aaa color: #aaa
font-size: 12px font-size: 12px
#author #author
.img
max-width: 25%
.avatar
.bd .bd
padding-left: 10px padding-left: 10px
border-right: solid 1px #ccc border-right: solid 1px #ccc
@ -12,6 +17,7 @@
#body #body
margin-left: 20px margin-left: 20px
padding-top: 20px padding-top: 20px
width: auto
.photo_attachments .photo_attachments
padding-bottom: 10px padding-bottom: 10px
img img
@ -21,21 +27,40 @@
padding-bottom: 5px padding-bottom: 5px
max-width: 90% max-width: 90%
.oembed
background: image-url('ajax-loader2.gif') no-repeat center center
float: left
width: 95%
.thumb
@include video-overlay()
iframe, .thumb img
width: 100%
min-height: 60%
#single-post-interactions #single-post-interactions
border-left: 1px solid #ccc
position: relative
left: -1px
margin-left: 0
padding-left: 2.5%
#likes, #reshares, #comments-meta #likes, #reshares, #comments-meta
padding-bottom: 5px padding-bottom: 5px
.comment .comment
border-bottom: solid 1px #ccc border-bottom: solid 1px #ccc
padding-top: 10px padding-top: 10px
padding-bottom: 10px padding-bottom: 10px
p p
margin: 0 margin: 0
textarea textarea
width: 95% width: 95%
.new_comment_form_wrapper
border-bottom: none
a a
color: #3f8fba color: #3f8fba
.timeago .timeago
color: #aaaaaa color: #aaaaaa
text-decoration: none text-decoration: none
font-size: smaller font-size: smaller

View file

@ -56,8 +56,7 @@ module LayoutHelper
def include_base_css_framework(use_bootstrap=false) def include_base_css_framework(use_bootstrap=false)
if use_bootstrap || @aspect == :getting_started if use_bootstrap || @aspect == :getting_started
stylesheet_link_tag('bootstrap-complete') + stylesheet_link_tag('bootstrap-complete')
stylesheet_link_tag('bootstrap-headerfix')
else else
stylesheet_link_tag 'blueprint', :media => 'screen' stylesheet_link_tag 'blueprint', :media => 'screen'
end end