Add bootstrap and main application template
This commit is contained in:
parent
1e80e2cfe4
commit
11710bfb68
2
Gemfile
2
Gemfile
@ -4,6 +4,8 @@ ruby "3.2.2"
|
|||||||
|
|
||||||
gem "devise"
|
gem "devise"
|
||||||
gem "http"
|
gem "http"
|
||||||
|
gem "bootstrap"
|
||||||
|
#gem "dartsass-sprockets"
|
||||||
|
|
||||||
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
||||||
gem "rails", "~> 7.1.1"
|
gem "rails", "~> 7.1.1"
|
||||||
|
18
Gemfile.lock
18
Gemfile.lock
@ -76,12 +76,18 @@ GEM
|
|||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
addressable (2.8.5)
|
addressable (2.8.5)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
|
autoprefixer-rails (10.4.15.0)
|
||||||
|
execjs (~> 2)
|
||||||
base64 (0.1.1)
|
base64 (0.1.1)
|
||||||
bcrypt (3.1.19)
|
bcrypt (3.1.19)
|
||||||
bigdecimal (3.1.4)
|
bigdecimal (3.1.4)
|
||||||
bindex (0.8.1)
|
bindex (0.8.1)
|
||||||
bootsnap (1.16.0)
|
bootsnap (1.16.0)
|
||||||
msgpack (~> 1.2)
|
msgpack (~> 1.2)
|
||||||
|
bootstrap (5.3.1)
|
||||||
|
autoprefixer-rails (>= 9.1.0)
|
||||||
|
popper_js (>= 2.11.8, < 3)
|
||||||
|
sassc-rails (>= 2.0.0)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
capybara (3.39.2)
|
capybara (3.39.2)
|
||||||
addressable
|
addressable
|
||||||
@ -111,6 +117,7 @@ GEM
|
|||||||
drb (2.1.1)
|
drb (2.1.1)
|
||||||
ruby2_keywords
|
ruby2_keywords
|
||||||
erubi (1.12.0)
|
erubi (1.12.0)
|
||||||
|
execjs (2.9.1)
|
||||||
factory_bot (6.2.1)
|
factory_bot (6.2.1)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
factory_bot_rails (6.2.0)
|
factory_bot_rails (6.2.0)
|
||||||
@ -176,6 +183,7 @@ GEM
|
|||||||
nokogiri (1.15.4-x86_64-linux)
|
nokogiri (1.15.4-x86_64-linux)
|
||||||
racc (~> 1.4)
|
racc (~> 1.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
|
popper_js (2.11.8)
|
||||||
psych (5.1.1)
|
psych (5.1.1)
|
||||||
stringio
|
stringio
|
||||||
public_suffix (5.0.3)
|
public_suffix (5.0.3)
|
||||||
@ -250,6 +258,14 @@ GEM
|
|||||||
rspec-support (~> 3.12)
|
rspec-support (~> 3.12)
|
||||||
rspec-support (3.12.1)
|
rspec-support (3.12.1)
|
||||||
ruby2_keywords (0.0.5)
|
ruby2_keywords (0.0.5)
|
||||||
|
sassc (2.4.0)
|
||||||
|
ffi (~> 1.9)
|
||||||
|
sassc-rails (2.1.2)
|
||||||
|
railties (>= 4.0.0)
|
||||||
|
sassc (>= 2.0)
|
||||||
|
sprockets (> 3.0)
|
||||||
|
sprockets-rails
|
||||||
|
tilt
|
||||||
sprockets (4.2.1)
|
sprockets (4.2.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (>= 2.2.4, < 4)
|
rack (>= 2.2.4, < 4)
|
||||||
@ -264,6 +280,7 @@ GEM
|
|||||||
railties (>= 6.0.0)
|
railties (>= 6.0.0)
|
||||||
stringio (3.0.8)
|
stringio (3.0.8)
|
||||||
thor (1.2.2)
|
thor (1.2.2)
|
||||||
|
tilt (2.3.0)
|
||||||
timeout (0.4.0)
|
timeout (0.4.0)
|
||||||
turbo-rails (1.5.0)
|
turbo-rails (1.5.0)
|
||||||
actionpack (>= 6.0.0)
|
actionpack (>= 6.0.0)
|
||||||
@ -296,6 +313,7 @@ PLATFORMS
|
|||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
bootsnap
|
bootsnap
|
||||||
|
bootstrap
|
||||||
capybara
|
capybara
|
||||||
debug
|
debug
|
||||||
devise
|
devise
|
||||||
|
@ -13,3 +13,5 @@
|
|||||||
*= require_tree .
|
*= require_tree .
|
||||||
*= require_self
|
*= require_self
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@import "bootstrap";
|
@ -1,6 +1,3 @@
|
|||||||
<br/>
|
|
||||||
<br/>
|
|
||||||
|
|
||||||
<%= sanitize alphabetical_links, tags: ["a"] %>
|
<%= sanitize alphabetical_links, tags: ["a"] %>
|
||||||
|
|
||||||
<p><%= @parts_of_speech.count %> parts of speech entries in database</p>
|
<p><%= @parts_of_speech.count %> parts of speech entries in database</p>
|
||||||
|
@ -11,16 +11,31 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<p class="notice"><%= notice %></p>
|
<div class="container">
|
||||||
<p class="alert"><%= alert %></p>
|
<div class="d-flex mb-3">
|
||||||
<div style="display: block;">
|
<div class="p-2">
|
||||||
<% if user_signed_in? %>
|
<%= link_to "Dictionary", dictionary_index_path %>
|
||||||
<p>Welcome <%= current_user.username %></p>
|
</div>
|
||||||
<%= link_to "Sign Out", destroy_user_session_path, data: { turbo_method: :delete } %>
|
<div class="ms-auto p-2">
|
||||||
<% else %>
|
<% if user_signed_in? %>
|
||||||
<%= link_to "Sign In", new_user_session_path %>
|
<p>Welcome <%= current_user.username %></p>
|
||||||
<%= link_to "Register", new_user_registration_path %>
|
<%= link_to "Sign Out", destroy_user_session_path, data: { turbo_method: :delete } %>
|
||||||
<% end %>
|
<% else %>
|
||||||
<%= yield %>
|
<%= link_to "Sign In", new_user_session_path %>
|
||||||
|
<pre style="display: inline;">|</pre>
|
||||||
|
<%= link_to "Register", new_user_registration_path %>
|
||||||
|
<% end %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row justify-content-center">
|
||||||
|
<div class="col-8">
|
||||||
|
<p class="notice"><%= notice %></p>
|
||||||
|
<p class="alert"><%= alert %></p>
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -6,6 +6,11 @@ RSpec.describe "Root path", type: :request do
|
|||||||
get root_path
|
get root_path
|
||||||
expect(response).to have_http_status(200)
|
expect(response).to have_http_status(200)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should have a link to the dictionary" do
|
||||||
|
get root_path
|
||||||
|
expect(response.body).to have_selector(%(a[href="#{dictionary_index_path}"]))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "logged out" do
|
describe "logged out" do
|
||||||
|
Loading…
Reference in New Issue
Block a user