DG MS; added a new layout for post pages.
This commit is contained in:
parent
e3ebf05ac2
commit
1c4a689af7
6 changed files with 58 additions and 9 deletions
|
|
@ -34,7 +34,7 @@ class PostsController < ApplicationController
|
||||||
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'}
|
||||||
format.json{ render :json => PostPresenter.new(@post).to_json }
|
format.json{ render :json => PostPresenter.new(@post).to_json }
|
||||||
format.any{render 'posts/show.html.haml'}
|
format.any{render 'posts/show.html.haml', :layout => 'layouts/post'}
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -60,8 +60,8 @@ module LayoutHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def include_base_css_framework
|
def include_base_css_framework(use_bootstrap=false)
|
||||||
if @aspect == :getting_started || @page == :logged_out
|
if use_bootstrap || @aspect == :getting_started || @page == :logged_out
|
||||||
include_stylesheets :bootstrap
|
include_stylesheets :bootstrap
|
||||||
else
|
else
|
||||||
include_stylesheets :blueprint, :media => 'screen'
|
include_stylesheets :blueprint, :media => 'screen'
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
%body
|
%body
|
||||||
= flash_messages
|
= flash_messages
|
||||||
|
|
||||||
- unless current_user
|
%header
|
||||||
%header
|
- unless current_user
|
||||||
= render 'layouts/header'
|
= render 'layouts/header'
|
||||||
|
|
||||||
.container
|
.container
|
||||||
|
|
|
||||||
49
app/views/layouts/post.html.haml
Normal file
49
app/views/layouts/post.html.haml
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||||
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
!!!
|
||||||
|
%html{:lang => I18n.locale.to_s, :dir => (rtl?) ? 'rtl' : 'ltr'}
|
||||||
|
%head
|
||||||
|
%meta{:charset => 'utf-8'}
|
||||||
|
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
|
||||||
|
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}
|
||||||
|
|
||||||
|
%meta{:name => "description", :content => "Diaspora*"}
|
||||||
|
%meta{:name => "author", :content => "Diaspora, Inc."}
|
||||||
|
|
||||||
|
%link{:rel => 'shortcut icon', :href => '/favicon.png'}
|
||||||
|
%link{:rel => 'apple-touch-icon', :href => '/apple-touch-icon.png'}
|
||||||
|
|
||||||
|
%title
|
||||||
|
= page_title yield(:page_title)
|
||||||
|
|
||||||
|
= include_base_css_framework(:bootstrap)
|
||||||
|
= include_stylesheets :login, :media => 'screen'
|
||||||
|
= include_stylesheets :default, :media => 'all'
|
||||||
|
|
||||||
|
- if rtl?
|
||||||
|
= include_stylesheets :rtl, :media => 'all'
|
||||||
|
|
||||||
|
= old_browser_js_support
|
||||||
|
<!--[if IE]>
|
||||||
|
= include_javascripts :ie
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
= jquery_include_tag
|
||||||
|
- unless @landing_page
|
||||||
|
= include_javascripts :main, :templates
|
||||||
|
= load_javascript_locales
|
||||||
|
|
||||||
|
= set_asset_host
|
||||||
|
= set_current_user_in_javascript
|
||||||
|
= translation_missing_warnings
|
||||||
|
= current_user_atom_tag
|
||||||
|
|
||||||
|
= yield(:head)
|
||||||
|
= csrf_meta_tag
|
||||||
|
|
||||||
|
%body
|
||||||
|
= flash_messages
|
||||||
|
|
||||||
|
= yield
|
||||||
|
|
@ -19,7 +19,7 @@ var app = {
|
||||||
|
|
||||||
if(this._user){
|
if(this._user){
|
||||||
app.header = new app.views.Header;
|
app.header = new app.views.Header;
|
||||||
$("body").prepend(app.header.el);
|
$("header").prepend(app.header.el);
|
||||||
app.header.render();
|
app.header.render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ app.views.Header = app.views.Base.extend({
|
||||||
|
|
||||||
templateName : "header",
|
templateName : "header",
|
||||||
|
|
||||||
tagName : "header",
|
className : "dark-header",
|
||||||
|
|
||||||
events : {
|
events : {
|
||||||
"click ul.dropdown li:first-child" : "toggleDropdown"
|
"click ul.dropdown li:first-child" : "toggleDropdown"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue