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
|
||||
end
|
||||
|
||||
if is_mobile_device?
|
||||
@comments = @post.comments
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
format.xml{ render :xml => @post.to_diaspora_xml }
|
||||
format.mobile{render 'posts/show.mobile.haml'}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,11 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
%h2
|
||||
%h2{:style => "padding:0 10px;display:none;"}
|
||||
- if @stream.for_all_aspects?
|
||||
= t('all_aspects')
|
||||
- else
|
||||
= @stream.aspect
|
||||
= link_to 'Post', new_status_message_path, :id => 'publisher_button'
|
||||
|
||||
#main_stream.stream
|
||||
= render 'shared/stream', :posts => @stream.posts
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
||||
/ 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 => "MobileOptimized", :content => "320"}
|
||||
/ Force cleartype on WP7
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
%link{:rel => 'shortcut icon', :href => '/apple-touch-icon.png'}
|
||||
|
||||
/ iOS mobile web app indicator
|
||||
/%meta{:name => "apple-mobile-web-app-capable", :content => "yes"}
|
||||
/%link{:rel => "apple-touch-startup-image", :href => "/images/apple-splash.png"}
|
||||
%meta{:name => "apple-mobile-web-app-capable", :content => "yes"}
|
||||
%link{:rel => "apple-touch-startup-image", :href => "/images/apple-splash.png"}
|
||||
|
||||
/ Stylesheets
|
||||
= include_stylesheets :mobile
|
||||
|
|
@ -45,7 +45,8 @@
|
|||
|
||||
%body
|
||||
%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?
|
||||
%p
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@
|
|||
:locals => {:post => @post, :commenting_disabled => defined?(@commenting_disabled),
|
||||
:expanded_info => true}
|
||||
|
||||
.stream.show{:data=>{:guid=>@post.id}}
|
||||
= render "comments/comments", :post => @post, :comments => @post.comments, :comments_expanded => true
|
||||
/.stream.show{:data=>{:guid=>@post.id}}
|
||||
/ = render "comments/comments", :post => @post, :comments => @post.comments, :comments_expanded => true
|
||||
|
|
|
|||
|
|
@ -49,10 +49,13 @@
|
|||
= link_to '', '#', :class => "image_link like_action active", 'data-post-id' => post.id, 'data-like-id' => current_user.like_for(post).id
|
||||
- else
|
||||
= link_to '', '#', :class => "image_link like_action inactive", 'data-post-id' => post.id
|
||||
|
||||
.reshare_count.tab
|
||||
= post.comments.size
|
||||
= link_to '', post_path(post), :class => "image_link comment_action"
|
||||
|
||||
/.reshare_count.tab
|
||||
/ = post.comments.size
|
||||
/ = link_to '', post_path(post), :class => "image_link comment_action"
|
||||
|
||||
= render "comments/comments", :post => post, :comments => post.comments, :comments_expanded => true
|
||||
|
||||
|
||||
- else
|
||||
.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 {
|
||||
background: #555555;
|
||||
max-width: 100%;
|
||||
margin-top: 55px;
|
||||
}
|
||||
|
||||
#login_form {
|
||||
|
|
@ -83,20 +84,22 @@ body {
|
|||
bottom: 0; };
|
||||
padding: 0 !important; }
|
||||
|
||||
.comments {
|
||||
color: #cccccc;
|
||||
.from {
|
||||
a {
|
||||
color: #888888 !important; } } }
|
||||
|
||||
.new_comment {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.comments {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
.content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.comment {
|
||||
padding: 4px 0;
|
||||
border: {
|
||||
bottom: 1px dotted #444444; };
|
||||
bottom: 1px dotted #ccc; };
|
||||
}
|
||||
|
||||
.stream_element {
|
||||
|
|
@ -106,7 +109,10 @@ body {
|
|||
color: white; };
|
||||
border: {
|
||||
top: 1px solid black;
|
||||
bottom: 1px solid black; }; }
|
||||
bottom: 1px solid black; };
|
||||
|
||||
max-width: 700px;
|
||||
}
|
||||
|
||||
.photo_attachments {
|
||||
position: relative;
|
||||
|
|
@ -208,6 +214,11 @@ body {
|
|||
header {
|
||||
@include linear-gradient(#444444, black);
|
||||
@include box-shadow(0,1px,1px,rgba(0,0,0,0.7));
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
top: 0;
|
||||
|
||||
border: {
|
||||
bottom: 1px solid #222;
|
||||
}
|
||||
|
|
@ -216,7 +227,6 @@ header {
|
|||
float: right; } }
|
||||
|
||||
footer {
|
||||
font-size: larger;
|
||||
text-align: center;
|
||||
a,
|
||||
a:visited {
|
||||
|
|
@ -236,9 +246,7 @@ footer {
|
|||
top: 10px; };
|
||||
border: {
|
||||
top: 1px solid #dddddd; };
|
||||
height: 24px;
|
||||
font: {
|
||||
size: larger; };
|
||||
min-height: 24px;
|
||||
a {
|
||||
color: #999999 !important;
|
||||
font-weight: bold !important; }
|
||||
|
|
@ -249,12 +257,18 @@ footer {
|
|||
text: {
|
||||
align: center;
|
||||
}
|
||||
border: {
|
||||
bottom: 1px solid #ccc;
|
||||
}
|
||||
font: {
|
||||
size: 28px;
|
||||
}
|
||||
color: #ccc;
|
||||
|
||||
.tab {
|
||||
display: table-cell;
|
||||
position:relative;
|
||||
top: -5px;
|
||||
|
||||
border: {
|
||||
right: 1px solid #ccc;
|
||||
|
|
@ -309,3 +323,9 @@ form {
|
|||
input {
|
||||
font: {
|
||||
size: larger; }; } }
|
||||
|
||||
.compose_icon {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 15px;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue