-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARI-119 #time 8h - Landing pages created.
- Loading branch information
esref.viduslu
committed
Nov 30, 2017
1 parent
3fb4c48
commit 941958b
Showing
16 changed files
with
190 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# frozen_string_literal: true | ||
|
||
module Cybele | ||
module Helpers | ||
module LandingPages | ||
def generate_landing_pages | ||
# Edit application file | ||
template 'landing_pages/application.html.haml.erb', | ||
'app/views/layouts/application.html.haml', force: true | ||
|
||
# Welcome_controller route | ||
inject_into_file 'config/routes.rb', | ||
template_content('landing_pages/landing_route.erb'), | ||
before: ' if Rails.env.production? || Rails.env.staging?' | ||
|
||
# Welcome_controller and welcome/index.html.haml | ||
copy_file 'landing_pages/welcome_controller.rb', 'app/controllers/welcome_controller.rb' | ||
template 'landing_pages/welcome_index.html.haml.erb', 'app/views/welcome/index.html.haml', force: true | ||
template 'landing_pages/about.html.haml.erb', 'app/views/welcome/about.html.haml', force: true | ||
template 'landing_pages/contact.html.haml.erb', 'app/views/welcome/contact.html.haml', force: true | ||
|
||
# Partials | ||
template 'landing_pages/partials/_warnings.html.haml.erb', | ||
'app/views/layouts/partials/_warnings.html.haml', force: true | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.row.about-contact | ||
%h4 About | ||
%p Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
!!! | ||
%html{lang: I18n.locale} | ||
%head | ||
%title= content_for?(:title) ? "#{yield(:title)} - <%= app_name.capitalize %>" : '<%= app_name.capitalize %>' | ||
%meta(http-equiv="content-type" content="text/html" charset="utf-8") | ||
%meta(http-equiv="x-ua-compatible" content="ie=edge,chrome=1") | ||
%meta(name="description" content="<%= app_name.capitalize %>") | ||
%meta(name="author" content="<%= app_name.capitalize %>") | ||
%link(rel="shortcut icon" href="/images/favicon.png") | ||
|
||
= stylesheet_link_tag 'application', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', | ||
media: 'all', 'data-turbolinks-track' => true | ||
= javascript_include_tag 'application', 'data-turbolinks-track' => true | ||
= csrf_meta_tags | ||
= yield :headls | ||
%body | ||
= render 'layouts/partials/warnings' | ||
.container-narrow | ||
.header | ||
%nav | ||
/ Brand and toggle get grouped for better mobile display | ||
= link_to root_path, class: 'navbar-brand' do | ||
%i.fa.fa-home | ||
= "<%= app_name.capitalize %>" | ||
%ul.nav.nav-pills.float-right | ||
%li.nav-item | ||
%a.nav-link{href: about_welcome_index_path} | ||
= t('navbar.about') | ||
%li.nav-item | ||
%a.nav-link{href: contact_welcome_index_path} | ||
= t('navbar.contact') | ||
= yield | ||
.footer | ||
%p Dummy_app Copyright © #{Time.zone.now.year} Tüm Hakları Saklıdır. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.row.about-contact | ||
%h4 Contact | ||
%p Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
# Common pages | ||
root to: 'welcome#index' | ||
|
||
resources :welcome, path: '', only: :index do | ||
get :about, on: :collection | ||
get :contact, on: :collection | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- if Rails.env.staging? | ||
#warnings.alert.alert-warning.panel-reset.text-center{style: 'margin-bottom: 10px;' } | ||
= t('staging_warning').html_safe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class WelcomeController < ApplicationController | ||
def index | ||
end | ||
|
||
def about | ||
end | ||
|
||
def contact | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.jumbotron | ||
%h1 Welcome to <%= app_name.capitalize %> | ||
- if current_user | ||
= link_to t('navbar.sign_out'), destroy_user_session_path, class: 'btn btn-large', method: :delete | ||
.row-fluid.marketing | ||
%p | ||
%strong Name: | ||
= current_user.name | ||
%p | ||
%strong Email: | ||
= current_user.email | ||
= link_to t('navbar.edit_login_info'), edit_user_registration_path, class: 'btn btn-large' | ||
= link_to t('navbar.profile'), user_profile_path(current_user), class: 'btn btn-link' | ||
- else | ||
= link_to t('navbar.signup'), new_user_registration_path, class: 'btn btn-large btn-success' | ||
= link_to t('navbar.signin'), new_user_session_path, class: 'btn btn-large' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters