Commit 9533f83a by Mai Hoang Thai Ha

rename branch, add top_controller, add slim, add gem pry-rails and pry-nav, remove test framework

parent 7bf75241
Pipeline #1333 canceled with stages
in 0 seconds
......@@ -31,6 +31,8 @@ gem 'bootsnap', '>= 1.4.4', require: false
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
gem 'pry-rails', '~> 0.3.9'
gem 'pry-nav', '~> 0.3.0'
end
group :development do
......@@ -54,3 +56,4 @@ end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "slim"
......@@ -60,7 +60,7 @@ GEM
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
bindex (0.8.1)
bootsnap (1.7.5)
......@@ -76,6 +76,7 @@ GEM
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.9)
crass (1.0.6)
erubi (1.10.0)
......@@ -95,13 +96,20 @@ GEM
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.1)
method_source (1.0.0)
method_source (0.9.2)
mini_mime (1.1.0)
minitest (5.14.4)
msgpack (1.4.2)
nio4r (2.5.7)
nokogiri (1.11.7-x86_64-linux)
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)
puma (5.3.2)
nio4r (~> 2.0)
......@@ -144,7 +152,7 @@ GEM
rb-inotify (0.10.1)
ffi (~> 1.0)
regexp_parser (2.1.1)
rubyzip (2.3.0)
rubyzip (2.3.2)
sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1)
sassc (2.4.0)
......@@ -159,6 +167,9 @@ GEM
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
slim (4.1.0)
temple (>= 0.7.6, < 0.9)
tilt (>= 2.0.6, < 2.1)
spring (2.1.1)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
......@@ -168,6 +179,7 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.2)
temple (0.8.2)
thor (1.1.0)
tilt (2.0.10)
turbolinks (5.2.1)
......@@ -205,11 +217,14 @@ DEPENDENCIES
capybara (>= 3.26)
jbuilder (~> 2.7)
listen (~> 3.3)
pry-nav (~> 0.3.0)
pry-rails (~> 0.3.9)
puma (~> 5.0)
rack-mini-profiler (~> 2.0)
rails (~> 6.1.3, >= 6.1.3.2)
sass-rails (~> 6.0)
selenium-webdriver
slim
spring
sqlite3 (~> 1.4)
turbolinks (~> 5)
......
// 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 StaticPagesController < ApplicationController
def home
end
def help
end
end
class TopController < ApplicationController
def index
end
end
<footer class="footer">
<small>
The <%= link_to "VenJob", root_path %>
by Mai Hoàng Thái Hà
</small>
<nav>
<ul>
<li><%= link_to "About", '#' %></li>
<li><%= link_to "Contact", '#' %></li>
</ul>
</nav>
</footer>
\ No newline at end of file
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 class="navbar navbar-fixed-top navbar-inverse">
<div class="container">
<%= link_to image_tag("logo.png", alt: "Zigexn logo", width: "150"),
root_path %>
<nav>
<ul class="nav navbar-nav navbar-right">
<li><%= link_to "Log in", '#' %></li>
<li><%= link_to "Sign up", '#' %></li>
</ul>
</nav>
</div>
</header>
\ 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
<!DOCTYPE html>
<html>
<head>
<title>hi</title>
<%# <%= 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' %>
</head>
<body>
<%= render 'layouts/header' %>
<div class="container">
<%= yield %>
<%= render 'layouts/footer' %>
</div>
</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
<h1>StaticPages#help</h1>
<p>Find me in app/views/static_pages/help.html.erb</p>
<h1>StaticPages#home</h1>
<p>Find me in app/views/static_pages/home.html.erb</p>
Rails.application.routes.draw do
root 'static_pages#home'
get 'help' => 'static_pages#help'
get 'about' => 'static_pages#about'
# get 'contact' => 'static_pages#contact'
root 'top#index'
end
require "test_helper"
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
test "should get home" do
get static_pages_home_url
assert_response :success
end
test "should get help" do
get static_pages_help_url
assert_response :success
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