bootstrap basic layout

This commit is contained in:
Min Zeya Phyo
2017-04-04 02:29:03 +06:30
parent 23998e9f31
commit 7595ed183b
7 changed files with 26 additions and 113 deletions

View File

@@ -22,6 +22,7 @@ gem 'coffee-rails', '~> 4.2'
# gem 'therubyracer', platforms: :ruby # gem 'therubyracer', platforms: :ruby
gem 'simple_form' gem 'simple_form'
gem 'bootstrap', '~> 4.0.0.alpha3' gem 'bootstrap', '~> 4.0.0.alpha3'
gem "font-awesome-rails"
# Use jquery as the JavaScript library # Use jquery as the JavaScript library

View File

@@ -67,6 +67,8 @@ GEM
faker (1.7.3) faker (1.7.3)
i18n (~> 0.5) i18n (~> 0.5)
ffi (1.9.18) ffi (1.9.18)
font-awesome-rails (4.7.0.1)
railties (>= 3.2, < 5.1)
globalid (0.3.7) globalid (0.3.7)
activesupport (>= 4.1.0) activesupport (>= 4.1.0)
i18n (0.8.1) i18n (0.8.1)
@@ -198,6 +200,7 @@ DEPENDENCIES
database_cleaner database_cleaner
factory_girl_rails (~> 4.0) factory_girl_rails (~> 4.0)
faker faker
font-awesome-rails
jbuilder (~> 2.5) jbuilder (~> 2.5)
jquery-rails jquery-rails
listen (~> 3.0.5) listen (~> 3.0.5)

View File

@@ -1 +1,8 @@
@import "bootstrap"; @import "bootstrap";
@import "font-awesome";
/* Show it is fixed to the top */
body {
min-height: 75rem;
padding-top: 4.5rem;
}

View File

@@ -1,89 +0,0 @@
body {
background-color: #fff;
color: #333;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
margin: 33px;
}
p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
margin: 33px;
}
pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}
a {
color: #000;
&:visited {
color: #666;
}
&:hover {
color: #fff;
background-color: #000;
}
}
th {
padding-bottom: 5px;
}
td {
padding-bottom: 7px;
padding-left: 5px;
padding-right: 5px;
}
div {
&.field, &.actions {
margin-bottom: 10px;
}
}
#notice {
color: green;
}
.field_with_errors {
padding: 2px;
background-color: red;
display: table;
}
#error_explanation {
width: 450px;
border: 2px solid red;
padding: 7px;
padding-bottom: 0;
margin-bottom: 20px;
background-color: #f0f0f0;
h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
margin-bottom: 0;
background-color: #c00;
color: #fff;
}
ul li {
font-size: 12px;
list-style: square;
}
}
label {
display: block;
}

View File

@@ -1,6 +1,11 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<meta name="description" content=""/>
<meta name="author" content=""/>
<title>Film Buff</title> <title>Film Buff</title>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
@@ -10,11 +15,9 @@
<body> <body>
<%= render 'layouts/header' %> <%= render 'layouts/header' %>
<div class="container"> <div class="container-fluid">
<% flash.each do |name, msg| %> <%= yield %>
<%= content_tag(:div, msg, class: "alert alert-info") %>
<% end %>
<%= yield %>
</div> </div>
</body> </body>
</html> </html>

View File

@@ -1,16 +0,0 @@
<nav class="navbar navbar-dark bg-inverse">
<%= link_to "Movie Reviews", root_path, class: "navbar-brand" %>
<ul class="nav navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="movies/new">New Movie <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">About</a>
</li>
</ul>
<form class="form-inline pull-xs-right">
<input class="form-control" type="text" placeholder="Search">
<button class="btn btn-success-outline" type="submit">Search</button>
</form>
</nav>

View File

@@ -1,10 +1,14 @@
Rails.application.routes.draw do Rails.application.routes.draw do
root 'home#index'
#Login for Web
post 'authenticate' => 'home#create'
delete 'authenticate' => 'home/destroy'
namespace :api, :defaults => { :format => 'json' } do namespace :api, :defaults => { :format => 'json' } do
#Session Login and Logout #Session Login and Logout
post 'autheticate' => "autheticate#create" post 'authenticate' => "autheticate#create"
delete 'autheticate' => "autheticate#destroy" delete 'authenticate' => "autheticate#destroy"
namespace :restaurant do namespace :restaurant do
get 'zones' => "zones#index" get 'zones' => "zones#index"