0
0
Fork 0

Adding landing page

This commit is contained in:
Eugen Rochko 2016-09-27 23:12:33 +02:00
parent 45a96e899e
commit e63aebff7a
16 changed files with 141 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

View file

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

View file

@ -19,8 +19,29 @@ const Button = React.createClass({
},
render () {
const style = {
fontFamily: 'Roboto',
display: this.props.block ? 'block' : 'inline-block',
width: this.props.block ? '100%' : 'auto',
position: 'relative',
boxSizing: 'border-box',
textAlign: 'center',
border: '10px none',
color: '#fff',
fontSize: '14px',
fontWeight: '500',
letterSpacing: '0',
textTransform: 'uppercase',
padding: '0 16px',
height: '36px',
cursor: 'pointer',
lineHeight: '36px',
borderRadius: '4px',
textDecoration: 'none'
};
return (
<button className={`button ${this.props.secondary ? 'button-secondary' : ''}`} disabled={this.props.disabled} onClick={this.handleClick} style={{ fontFamily: 'Roboto', display: this.props.block ? 'block' : 'inline-block', width: this.props.block ? '100%' : 'auto', position: 'relative', boxSizing: 'border-box', textAlign: 'center', border: '10px none', color: '#fff', fontSize: '14px', fontWeight: '500', letterSpacing: '0', textTransform: 'uppercase', padding: '0 16px', height: '36px', cursor: 'pointer', lineHeight: '36px', borderRadius: '4px', textDecoration: 'none' }}>
<button className={`button ${this.props.secondary ? 'button-secondary' : ''}`} disabled={this.props.disabled} onClick={this.handleClick} style={style}>
{this.props.text || this.props.children}
</button>
);

View file

@ -0,0 +1,41 @@
@import url(https://fonts.googleapis.com/css?family=Montserrat);
@import url(https://fonts.googleapis.com/css?family=Judson);
.about-body {
.wrapper {
width: 600px;
margin: 0 auto;
color: #9baec8;
padding-top: 200px;
}
h1 {
font: 46px/52px 'Roboto', sans-serif;
font-weight: 600;
margin-bottom: 20px;
color: #2b90d9;
padding: 20px 0;
img {
margin-bottom: -5px;
margin-right: 5px;
width: 46px;
height: 46px;
}
}
p {
font: 20px/28px 'Judson', sans-serif;
font-weight: 300;
margin-bottom: 26px;
}
em {
display: inline-block;
padding: 7px 7px 5px 7px;
background: #9baec8;
color: #282c37;
font: 16px/16px 'Montserrat', sans-serif;
font-weight: 300;
}
}

View file

@ -59,7 +59,7 @@ table {
body {
font-family: 'Roboto', sans-serif;
background: #282c37 image-url('background-photo.jpg');
background: #282c37 image-url('background-photo.jpeg');
background-size: cover;
background-attachment: fixed;
font-size: 13px;
@ -334,4 +334,5 @@ body {
@import 'accounts';
@import 'stream_entries';
@import 'components'
@import 'components';
@import 'about';

View file

@ -1,5 +1,22 @@
.button {
background-color: #2b90d9;
font-family: 'Roboto';
display: inline-block;
position: relative;
box-sizing: border-box;
text-align: center;
border: 10px none;
color: #fff;
font-size: 14px;
font-weight: 500;
letter-spacing: 0;
text-transform: uppercase;
padding: 0 16px;
height: 36px;
cursor: pointer;
line-height: 36px;
border-radius: 4px;
text-decoration: none;
&:hover {
background-color: #489fde;

View file

@ -0,0 +1,5 @@
class AboutController < ApplicationController
def index
@body_classes = 'about-body'
end
end

View file

@ -10,6 +10,10 @@ class HomeController < ApplicationController
private
def authenticate_user!
redirect_to about_path unless user_signed_in?
end
def find_or_create_access_token
Doorkeeper::AccessToken.find_or_create_for(Doorkeeper::Application.where(superapp: true).first, current_user.id, nil, Doorkeeper.configuration.access_token_expires_in, Doorkeeper.configuration.refresh_token_enabled?)
end

View file

@ -0,0 +1,2 @@
module AboutHelper
end

View file

@ -0,0 +1,19 @@
.wrapper
%h1
= image_tag 'logo.png'
Mastodon
%p
Mastodon is a
%em free, open-source
social network server. A
%em decentralized
alternative to commercial platforms, it avoids the risks of a single company monopolizing your communication. Anyone can run Mastodon and participate in the
%em social network
seamlessly.
%p
%em= Rails.configuration.x.local_domain
is a Mastodon instance.
.actions
= link_to 'Get started', new_user_session_path, class: 'button'