Skip to content
Extraits de code Groupes Projets
Valider bafc3ae7 rédigé par Dennis Schubert's avatar Dennis Schubert
Parcourir les fichiers

Merge pull request #5822 from jhass/default_view

Replace default.html with a regular view
parents 61c2fbf5 e274470d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
body {
margin-top: 50px;
background-color: white;
background-image : none;
}
li {
list-style: none;
}
footer h3 {
margin-bottom: 25px;
text-align: center;
}
footer {
margin-bottom: 12px;
padding: 42px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
width: auto
}
#header {
/* Hack to hide the header */
box-shadow:none;
border:none;
background:none;
left: 0px;
padding: 15px 0px;
}
#header img {
margin-left: 15px;
}
#login-link {
float: right;
margin-right: 15px;
}
#steps {
text-align: center;
}
#banner {
border-bottom : 1px solid #ccc;
border-top : 1px solid #eee;
padding : 30px;
margin-top: 20px;
text-align: center;
box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7);
}
#links {
margin: 0;
padding: 0;
text-align: center;
}
#links .section {
margin: 0;
padding: 0;
display: inline-block;
vertical-align: top;
width: 24%;
max-width: 24%;
}
#change-page {
color: #999;
text-align: center;
font-style: italic;
}
.helpful {
cursor: help;
}
.row {
margin-bottom: 60px;
}
......@@ -4,12 +4,12 @@
class HomeController < ApplicationController
def show
partial_dir = Rails.root.join('app', 'views', 'home')
partial_dir = Rails.root.join("app", "views", "home")
if user_signed_in?
redirect_to stream_path
elsif is_mobile_device?
if partial_dir.join('_show.mobile.haml').exist? ||
partial_dir.join('_show.mobile.erb').exist?
if partial_dir.join("_show.mobile.haml").exist? ||
partial_dir.join("_show.mobile.erb").exist?
render :show
else
redirect_to user_session_path
......@@ -18,8 +18,8 @@ class HomeController < ApplicationController
partial_dir.join("_show.html.erb").exist?
render :show
else
render file: Rails.root.join("public", "default.html"),
layout: 'application'
render :default,
layout: "application"
end
end
......
- content_for(:head) do
= stylesheet_link_tag :home, media: "all"
#page.container
%header#header
%a#login-link.btn{href: "login"} Log In
= image_tag "branding/logo.png"
#banner.row
%h1 Welcome, friend.
%h3 You're about to change the Internet. Let's get you set up, shall we?
#steps.row
.span4
%h2
Configure your
%abbr.helpful{title: "A Diaspora installation"} pod
= image_tag "icons/cog.png"
%p
Look at
%code.helpful{title: "General pod configuration (location to upload photos, SSL certs, etc.)"}
config/diaspora.yml.example
and
%code.helpful{title: "MySQL username/password"}
config/database.yml.example
for help.
.span4
%h2 Try it out
= image_tag "icons/smiley_laughing.png"
%p
Start by
= link_to "creating an account", new_user_registration_path
.span4
%h2 Make a contribution!
= image_tag "icons/pen_write.png"
%p
Make Diaspora even better! Fork the project on
= link_to "Github", "http://github.com/diaspora/diaspora"
make some changes, and submit a pull request.
%footer
%h3 Useful Resources
%ul#links
%ul.section
%li= link_to "Codebase", "http://github.com/diaspora/diaspora", title: "Git repository"
%li= link_to "Documentation", "http://wiki.diasporafoundation.org", title: "Wiki on github"
%ul.section
%li= link_to "IRC - General", "http://webchat.freenode.net/?channels=diaspora", title: "#diaspora"
%li= link_to "IRC - Development", "http://webchat.freenode.net/?channels=diaspora-dev", title: "#diaspora-dev"
%ul.section
%li= link_to "Discussion - General", "http://groups.google.com/group/diaspora-discuss", title: "General discussion mailing list"
%li= link_to "Discussion - Development", "http://groups.google.com/group/diaspora-dev", title: "Dev mailing list"
%ul.section
%li= link_to "Find & Report bugs", "https://github.com/diaspora/diaspora/issues", title: "Bug tracker"
%li= link_to "Learn more about Ruby On Rails!", "http://guides.rubyonrails.org/"
#change-page
This page can be changed to a custom landing page by creating
%code app/views/home/_show.html.haml
......@@ -88,6 +88,7 @@ module Diaspora
admin.css
mobile/mobile.css
rtl.css
home.css
}
# Version of your assets, change this if you want to expire all your assets
......
<style type="text/css">
body {
margin-top: 50px;
background-color: white;
background-image : none;
}
li {
list-style: none;
}
footer h3 {
margin-bottom: 25px;
text-align: center;
}
footer {
margin-bottom: 12px;
padding: 42px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
#header {
/* Hack to hide the header */
-webkit-box-shadow:none;
-moz-box-shadow:none;
box-shadow:none;
border:none;
background:none;
left: 0px;
padding: 15px 0px;
}
#header img {
margin-left: 15px;
}
#login-link {
float: right;
margin-right: 15px;
}
#steps {
text-align: center;
}
#banner {
border-bottom : 1px solid #ccc;
border-top : 1px solid #eee;
padding : 30px;
margin-top: 20px;
text-align: center;
-webkit-box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7);
-moz-box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7);
-khtml-box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7);
-o-box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7);
-ms-box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7);
box-shadow : 0 9px 15px -10px rgba(0,0,0,0.7);
}
#links {
margin: 0;
padding: 0;
text-align: center;
}
#links .section {
margin: 0;
padding: 0;
display: inline-block;
vertical-align: top;
width: 24%;
max-width: 24%;
}
#change-page {
color: #999;
text-align: center;
font-style: italic;
}
.helpful {
cursor: help;
}
.row {
margin-bottom: 60px;
}
</style>
<div id="page" class="container">
<header id="header">
<a id="login-link" href="login" class="btn">Log In</a>
<img src="assets/branding/logo.png" />
</header>
<div id="banner" class="row">
<h1>Welcome, friend.</h1>
<h3>You're about to change the Internet. Let's get you set up, shall we?</h3>
</div>
<div id="steps" class="row">
<div class="span4">
<h2>Configure your <abbr class="helpful" title="A Diaspora installation">pod</abbr></h2>
<img src="assets/icons/cog.png" />
<p>Look at
<code class="helpful" title='General pod configuration (location to upload photos, SSL certs, etc.)'>
config/diaspora.yml.example</code> and <code class="helpful" title="mySQL username/password">
config/database.yml.example</code> for help.</p>
</div>
<div class="span4">
<h2>Try it out</h2>
<img src="assets/icons/smiley_laughing.png" />
<p>Start by <a href="users/sign_up">creating an account</a>.</p>
</div>
<div class="span4">
<h2>Make a contribution!</h2>
<img src="assets/icons/pen_write.png" />
<p>Make Diaspora even better! Fork the project on
<a href="http://github.com/diaspora/diaspora/" title="github">github</a>,
make some changes, and submit a pull request.</p>
</div>
</div>
<footer>
<h3>Useful Resources</h3>
<ul id="links">
<ul class="section">
<li><a href="http://github.com/diaspora/diaspora/" title="Git repository">Codebase</a></li>
<li><a href="http://wiki.diasporafoundation.org" title="Wiki on github">Documentation</a></li>
</ul>
<ul class="section">
<li><a href="http://webchat.freenode.net/?channels=diaspora" title="#diaspora">IRC - General</a></li>
<li><a href="http://webchat.freenode.net/?channels=diaspora-dev" title="#diaspora-dev">IRC - Development</a></li>
</ul>
<ul class="section">
<li><a href="http://groups.google.com/group/diaspora-discuss" title="General discussion mailing list">Discussion - General</a></li>
<li><a href="http://groups.google.com/group/diaspora-dev" title="Dev mailing list">Discussion - Development</a></li>
</ul>
<ul class="section">
<li><a href="https://github.com/diaspora/diaspora/issues" title="Bug tracker">Find & Report bugs</a></li>
<li><a href="http://guides.rubyonrails.org/">Learn more about Ruby On Rails!</a></li>
</ul>
</ul>
</footer>
<div id="change-page">
This page can be changed to a custom landing page by creating <code>app/views/home/_show.html.haml</code>
</div>
</div>
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter