Commit c4f21c57 by phuctmZigexn

Merge branch 'static-pages' into 'master'

add layout header and footer

See merge request !1
parents aa1b7f6c 4de379b0
Pipeline #1336 failed with stages
in 0 seconds
...@@ -10,7 +10,7 @@ gem 'sqlite3', '~> 1.4' ...@@ -10,7 +10,7 @@ gem 'sqlite3', '~> 1.4'
# Use Puma as the app server # Use Puma as the app server
gem 'puma', '~> 5.0' gem 'puma', '~> 5.0'
# Use SCSS for stylesheets # Use SCSS for stylesheets
gem 'sass-rails', '>= 6' gem 'sass-rails', '~> 6.0'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0' gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
...@@ -31,6 +31,8 @@ gem 'bootsnap', '>= 1.4.4', require: false ...@@ -31,6 +31,8 @@ gem 'bootsnap', '>= 1.4.4', require: false
group :development, :test do group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console # Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'pry-rails', '~> 0.3.9'
gem 'pry-nav', '~> 0.3.0'
end end
group :development do group :development do
...@@ -54,3 +56,4 @@ end ...@@ -54,3 +56,4 @@ end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem 'slim-rails', '~> 3.2'
...@@ -60,7 +60,7 @@ GEM ...@@ -60,7 +60,7 @@ GEM
minitest (>= 5.1) minitest (>= 5.1)
tzinfo (~> 2.0) tzinfo (~> 2.0)
zeitwerk (~> 2.3) zeitwerk (~> 2.3)
addressable (2.7.0) addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
bindex (0.8.1) bindex (0.8.1)
bootsnap (1.7.5) bootsnap (1.7.5)
...@@ -76,6 +76,7 @@ GEM ...@@ -76,6 +76,7 @@ GEM
regexp_parser (>= 1.5, < 3.0) regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2) xpath (~> 3.2)
childprocess (3.0.0) childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.9) concurrent-ruby (1.1.9)
crass (1.0.6) crass (1.0.6)
erubi (1.10.0) erubi (1.10.0)
...@@ -95,13 +96,20 @@ GEM ...@@ -95,13 +96,20 @@ GEM
mail (2.7.1) mail (2.7.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
marcel (1.0.1) marcel (1.0.1)
method_source (1.0.0) method_source (0.9.2)
mini_mime (1.1.0) mini_mime (1.1.0)
minitest (5.14.4) minitest (5.14.4)
msgpack (1.4.2) msgpack (1.4.2)
nio4r (2.5.7) nio4r (2.5.7)
nokogiri (1.11.7-x86_64-linux) nokogiri (1.11.7-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-nav (0.3.0)
pry (>= 0.9.10, < 0.13.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.6) public_suffix (4.0.6)
puma (5.3.2) puma (5.3.2)
nio4r (~> 2.0) nio4r (~> 2.0)
...@@ -144,7 +152,7 @@ GEM ...@@ -144,7 +152,7 @@ GEM
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
regexp_parser (2.1.1) regexp_parser (2.1.1)
rubyzip (2.3.0) rubyzip (2.3.2)
sass-rails (6.0.0) sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1) sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0) sassc (2.4.0)
...@@ -159,6 +167,13 @@ GEM ...@@ -159,6 +167,13 @@ GEM
childprocess (>= 0.5, < 4.0) childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2) rubyzip (>= 1.2.2)
semantic_range (3.0.0) semantic_range (3.0.0)
slim (4.1.0)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
slim-rails (3.2.0)
actionpack (>= 3.1)
railties (>= 3.1)
slim (>= 3.0, < 5.0)
spring (2.1.1) spring (2.1.1)
sprockets (4.0.2) sprockets (4.0.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
...@@ -168,6 +183,7 @@ GEM ...@@ -168,6 +183,7 @@ GEM
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.4.2) sqlite3 (1.4.2)
temple (0.8.2)
thor (1.1.0) thor (1.1.0)
tilt (2.0.10) tilt (2.0.10)
turbolinks (5.2.1) turbolinks (5.2.1)
...@@ -205,11 +221,14 @@ DEPENDENCIES ...@@ -205,11 +221,14 @@ DEPENDENCIES
capybara (>= 3.26) capybara (>= 3.26)
jbuilder (~> 2.7) jbuilder (~> 2.7)
listen (~> 3.3) listen (~> 3.3)
pry-nav (~> 0.3.0)
pry-rails (~> 0.3.9)
puma (~> 5.0) puma (~> 5.0)
rack-mini-profiler (~> 2.0) rack-mini-profiler (~> 2.0)
rails (~> 6.1.3, >= 6.1.3.2) rails (~> 6.1.3, >= 6.1.3.2)
sass-rails (>= 6) sass-rails (~> 6.0)
selenium-webdriver selenium-webdriver
slim-rails (~> 3.2)
spring spring
sqlite3 (~> 1.4) sqlite3 (~> 1.4)
turbolinks (~> 5) turbolinks (~> 5)
......
// @import "bootstrap"; // @import "bootstrap";
$white: #fff;
$gray-100: #f8f9fa;
$gray-200: #e9ecef;
$gray-300: #dee2e6;
$gray-400: #ced4da;
$gray-500: #adb5bd;
$gray-600: #6c757d;
$gray-700: #495057;
$gray-800: #343a40;
$gray-900: #212529;
$black: #000;
.name { // reset css
font-size: 100px; *{
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
text-decoration: none;
box-sizing: border-box;
}
// header
header {
background-color: black;
.container {
padding: 8px 0;
nav {
ul {
flex-direction: row;
li {
margin-left: 18px;
a {
color: $gray-400;
font-size: 18px;
text-decoration: none;
font-weight: 500;
&:hover{
color: $white;
}
}
}
}
}
}
}
// footer
footer {
margin-top: 45px;
padding-top: 5px;
border-top: 1px solid #eaeaea;
color: #777;
a {
text-decoration:none;
color: $gray-600;
&:hover {
color: $gray-900;
}
}
small {
float: left;
}
ul {
float: right;
list-style: none;
li {
float: left;
margin-left: 15px;
}
}
} }
\ No newline at end of file
// Place all the styles related to the Top controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
def hello
render html: "Welcome to VenJob"
end
end end
class TopController < ApplicationController
def index
end
end
footer.footer
small
| The
= link_to "VenJob", root_path
| by Mai Hoàng Thái Hà
nav
ul
li
= link_to "About", '#'
li
= link_to "Contact", '#'
\ No newline at end of file
header.navbar.navbar-fixed-top.navbar-inverse
.container
= link_to image_tag("logo.png", alt: "Zigexn logo", width: "150"),
- root_path
nav
ul.nav.navbar-nav.navbar-right
li
= link_to "Log in", '#'
li
= link_to "Sign up", '#'
\ No newline at end of file
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js">
</script>
<![endif]-->
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<title>VenJob</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<%= yield %>
</body>
</html>
doctype html
html
head
title
| hi
- # <%= full_title(yield(:title))
meta[name="viewport" content="width=device-width,initial-scale=1" charset="utf-8"]
= csrf_meta_tags
= csp_meta_tag
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload'
= render 'layouts/shim'
body
= render 'layouts/header'
.container
= yield
= render 'layouts/footer'
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
/* Email styles need to be inline */
</style>
</head>
<body>
<%= yield %>
</body>
</html>
doctype html
html
head
meta[http-equiv="Content-Type" content="text/html; charset=utf-8"]
style
| /* Email styles need to be inline */
body
= yield
\ No newline at end of file
Rails.application.routes.draw do Rails.application.routes.draw do
root 'application#hello' root 'top#index'
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