Commit f1acce90 by Son Do Hong

Merge branch 'feature/top_page' into 'master'

Feature/top page - applying bootstrap

See merge request !5
parents c993fe46 639a75a6
//= link_tree ../images
//= link_directory ../stylesheets .css
//= link application.js
//= require jquery
//= require bootstrap.min
//= require rails-ujs
//= require turbolinks
//= require_tree .
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -12,4 +12,5 @@
*
*= require_tree .
*= require_self
*= require bootstrap.min
*/
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
@import "bootstrap.min";
/* mixin, variables, etc. */
$gray-medium-light: #eaeaea;
$light-gray: #777;
@mixin box_sizing {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/* universal */
body {
padding-top: 30px;
}
section {
overflow: auto;
}
textarea {
resize: vertical;
}
.center {
text-align: center;
h1 {
margin-bottom: 10px;
}
}
/* header */
/* footer */
footer {
margin-top: 45px;
padding-top: 5px;
border-top: 1px solid $gray-medium-light;
color: $light-gray;
ul {
float: right;
list-style: none;
li {
float: left;
margin-left: 15px;
}
}
}
class StaticPagesController < ApplicationController
def index
end
end
module ApplicationHelper
def full_title(page_title = '')
base_title = "VeNJOB"
if page_title.empty?
base_title
else
page_title + " | " + base_title
end
end
end
<footer class="footer">
<nav>
<ul>
<li>ZIGExN VeNtura</li>
<li><%= Time.now.year %></li>
</ul>
</nav>
</footer>
<header class="navbar navbar-fixed-top navbar-inverse navbar-dark bg-dark">
<div class="container">
<%= link_to image_tag("venjob_logo.png", alt: "VeNJOB Logo") , root_path, id: "logo" %>
<nav>
<ul class="nav navbar-nav navbar-right">
<ul class="list">
<li class="list-item">
<li class="list-inline-item"><%= link_to "Login", "#" %></li>
<li class="list-inline-item"><%= link_to "Register", "#" %></li>
</li>
<li class="list-item">
<li class="list-inline-item"><%= link_to "Favorite", "#" %></li>
<li class="list-inline-item"><%= link_to "History", "#" %></li>
</li>
</ul>
</ul>
</nav>
</div>
</header>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track": "reload" %>
<%= javascript_pack_tag "application", "data-turbolinks-track": "reload" %>
<!DOCTYPE html>
<html>
<head>
<title>Venjob</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<title><%= full_title(yield(:title)) %></title>
<%= render "layouts/rails_default" %>
</head>
<body>
<%= render "layouts/header" %>
<div class="container">
<%= yield %>
<%= render "layouts/footer" %>
</div>
</body>
</html>
<% provide(:title, "Favorite") %>
<h1>VeNJOB Favorite</h1>
<% provide(:title, "History") %>
<h1>VeNJOB History</h1>
<h1>VeNJOB Top page</h1>
<div class="container">
<div class="banner">
</div>
</div>
Rails.application.routes.draw do
devise_for :users
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
root "static_pages#index"
get "static_pages/index"
end
require 'test_helper'
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
test "should get top_page" do
get root_path
assert_response :success
assert_select "title", "VeNJOB"
end
test "should get favorite" do
get favorite_url
assert_response :success
assert_select "title", "Favorite | VeNJOB"
end
test "should get history" do
get history_url
assert_response :success
assert_select "title", "History | VeNJOB"
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment