fixed header; compose message on top right
This commit is contained in:
parent
645af37358
commit
6deb924c32
8 changed files with 51 additions and 24 deletions
|
|
@ -27,6 +27,10 @@ class PostsController < ApplicationController
|
||||||
notification.save
|
notification.save
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if is_mobile_device?
|
||||||
|
@comments = @post.comments
|
||||||
|
end
|
||||||
|
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.xml{ render :xml => @post.to_diaspora_xml }
|
format.xml{ render :xml => @post.to_diaspora_xml }
|
||||||
format.mobile{render 'posts/show.mobile.haml'}
|
format.mobile{render 'posts/show.mobile.haml'}
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,11 @@
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
-# the COPYRIGHT file.
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
%h2
|
%h2{:style => "padding:0 10px;display:none;"}
|
||||||
- if @stream.for_all_aspects?
|
- if @stream.for_all_aspects?
|
||||||
= t('all_aspects')
|
= t('all_aspects')
|
||||||
- else
|
- else
|
||||||
= @stream.aspect
|
= @stream.aspect
|
||||||
= link_to 'Post', new_status_message_path, :id => 'publisher_button'
|
|
||||||
|
|
||||||
#main_stream.stream
|
#main_stream.stream
|
||||||
= render 'shared/stream', :posts => @stream.posts
|
= render 'shared/stream', :posts => @stream.posts
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
||||||
/ Viewport scale
|
/ Viewport scale
|
||||||
%meta{:name =>'viewport', :content => "width=device-width, initial-scale=1"}
|
%meta{:name =>'viewport', :content => "width=device-width, minimum-scale=1 maximum-scale=1"}
|
||||||
%meta{:name => "HandheldFriendly", :content => "True"}
|
%meta{:name => "HandheldFriendly", :content => "True"}
|
||||||
%meta{:name => "MobileOptimized", :content => "320"}
|
%meta{:name => "MobileOptimized", :content => "320"}
|
||||||
/ Force cleartype on WP7
|
/ Force cleartype on WP7
|
||||||
|
|
@ -25,8 +25,8 @@
|
||||||
%link{:rel => 'shortcut icon', :href => '/apple-touch-icon.png'}
|
%link{:rel => 'shortcut icon', :href => '/apple-touch-icon.png'}
|
||||||
|
|
||||||
/ iOS mobile web app indicator
|
/ iOS mobile web app indicator
|
||||||
/%meta{:name => "apple-mobile-web-app-capable", :content => "yes"}
|
%meta{:name => "apple-mobile-web-app-capable", :content => "yes"}
|
||||||
/%link{:rel => "apple-touch-startup-image", :href => "/images/apple-splash.png"}
|
%link{:rel => "apple-touch-startup-image", :href => "/images/apple-splash.png"}
|
||||||
|
|
||||||
/ Stylesheets
|
/ Stylesheets
|
||||||
= include_stylesheets :mobile
|
= include_stylesheets :mobile
|
||||||
|
|
@ -45,7 +45,8 @@
|
||||||
|
|
||||||
%body
|
%body
|
||||||
%header
|
%header
|
||||||
= link_to(image_tag('white@2x.png', :height => 22, :width => 136, :id => 'header_title'), aspects_path)
|
= link_to(image_tag('icons/compose_mobile2.png', :height => 28, :width => 28), new_status_message_path, :class => 'compose_icon')
|
||||||
|
= link_to(image_tag('white@2x.png', :height => 20, :width => 127, :id => 'header_title'), aspects_path)
|
||||||
|
|
||||||
- if flash.present?
|
- if flash.present?
|
||||||
%p
|
%p
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@
|
||||||
:locals => {:post => @post, :commenting_disabled => defined?(@commenting_disabled),
|
:locals => {:post => @post, :commenting_disabled => defined?(@commenting_disabled),
|
||||||
:expanded_info => true}
|
:expanded_info => true}
|
||||||
|
|
||||||
.stream.show{:data=>{:guid=>@post.id}}
|
/.stream.show{:data=>{:guid=>@post.id}}
|
||||||
= render "comments/comments", :post => @post, :comments => @post.comments, :comments_expanded => true
|
/ = render "comments/comments", :post => @post, :comments => @post.comments, :comments_expanded => true
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,12 @@
|
||||||
- else
|
- else
|
||||||
= link_to '', '#', :class => "image_link like_action inactive", 'data-post-id' => post.id
|
= link_to '', '#', :class => "image_link like_action inactive", 'data-post-id' => post.id
|
||||||
|
|
||||||
.reshare_count.tab
|
/.reshare_count.tab
|
||||||
= post.comments.size
|
/ = post.comments.size
|
||||||
= link_to '', post_path(post), :class => "image_link comment_action"
|
/ = link_to '', post_path(post), :class => "image_link comment_action"
|
||||||
|
|
||||||
|
= render "comments/comments", :post => post, :comments => post.comments, :comments_expanded => true
|
||||||
|
|
||||||
|
|
||||||
- else
|
- else
|
||||||
.floater
|
.floater
|
||||||
|
|
|
||||||
BIN
public/images/icons/compose_mobile.png
Normal file
BIN
public/images/icons/compose_mobile.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
public/images/icons/compose_mobile2.png
Normal file
BIN
public/images/icons/compose_mobile2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
|
|
@ -21,6 +21,7 @@ a {
|
||||||
body {
|
body {
|
||||||
background: #555555;
|
background: #555555;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
margin-top: 55px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#login_form {
|
#login_form {
|
||||||
|
|
@ -83,20 +84,22 @@ body {
|
||||||
bottom: 0; };
|
bottom: 0; };
|
||||||
padding: 0 !important; }
|
padding: 0 !important; }
|
||||||
|
|
||||||
.comments {
|
|
||||||
color: #cccccc;
|
|
||||||
.from {
|
|
||||||
a {
|
|
||||||
color: #888888 !important; } } }
|
|
||||||
|
|
||||||
.new_comment {
|
.new_comment {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.comments {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
.content {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.comment {
|
.comment {
|
||||||
padding: 4px 0;
|
padding: 4px 0;
|
||||||
border: {
|
border: {
|
||||||
bottom: 1px dotted #444444; };
|
bottom: 1px dotted #ccc; };
|
||||||
}
|
}
|
||||||
|
|
||||||
.stream_element {
|
.stream_element {
|
||||||
|
|
@ -106,7 +109,10 @@ body {
|
||||||
color: white; };
|
color: white; };
|
||||||
border: {
|
border: {
|
||||||
top: 1px solid black;
|
top: 1px solid black;
|
||||||
bottom: 1px solid black; }; }
|
bottom: 1px solid black; };
|
||||||
|
|
||||||
|
max-width: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
.photo_attachments {
|
.photo_attachments {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -208,6 +214,11 @@ body {
|
||||||
header {
|
header {
|
||||||
@include linear-gradient(#444444, black);
|
@include linear-gradient(#444444, black);
|
||||||
@include box-shadow(0,1px,1px,rgba(0,0,0,0.7));
|
@include box-shadow(0,1px,1px,rgba(0,0,0,0.7));
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 10;
|
||||||
|
top: 0;
|
||||||
|
|
||||||
border: {
|
border: {
|
||||||
bottom: 1px solid #222;
|
bottom: 1px solid #222;
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +227,6 @@ header {
|
||||||
float: right; } }
|
float: right; } }
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
font-size: larger;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
a,
|
a,
|
||||||
a:visited {
|
a:visited {
|
||||||
|
|
@ -236,9 +246,7 @@ footer {
|
||||||
top: 10px; };
|
top: 10px; };
|
||||||
border: {
|
border: {
|
||||||
top: 1px solid #dddddd; };
|
top: 1px solid #dddddd; };
|
||||||
height: 24px;
|
min-height: 24px;
|
||||||
font: {
|
|
||||||
size: larger; };
|
|
||||||
a {
|
a {
|
||||||
color: #999999 !important;
|
color: #999999 !important;
|
||||||
font-weight: bold !important; }
|
font-weight: bold !important; }
|
||||||
|
|
@ -249,12 +257,18 @@ footer {
|
||||||
text: {
|
text: {
|
||||||
align: center;
|
align: center;
|
||||||
}
|
}
|
||||||
|
border: {
|
||||||
|
bottom: 1px solid #ccc;
|
||||||
|
}
|
||||||
font: {
|
font: {
|
||||||
size: 28px;
|
size: 28px;
|
||||||
}
|
}
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
|
|
||||||
.tab {
|
.tab {
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
|
position:relative;
|
||||||
|
top: -5px;
|
||||||
|
|
||||||
border: {
|
border: {
|
||||||
right: 1px solid #ccc;
|
right: 1px solid #ccc;
|
||||||
|
|
@ -309,3 +323,9 @@ form {
|
||||||
input {
|
input {
|
||||||
font: {
|
font: {
|
||||||
size: larger; }; } }
|
size: larger; }; } }
|
||||||
|
|
||||||
|
.compose_icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 6px;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue