Skip to content

Commit 3d84f8f

Browse files
committed
Bootstrap changes
1 parent 653fb6b commit 3d84f8f

File tree

6 files changed

+27
-86
lines changed

6 files changed

+27
-86
lines changed

‎rottenpotatoes/app/assets/stylesheets/application.css‎

Lines changed: 0 additions & 64 deletions
This file was deleted.
Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
!!! 5
22
%html
33
%head
4+
%link(rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous")
45
%title Rotten Potatoes!
5-
= stylesheet_link_tag 'application'
6-
= javascript_include_tag 'application'
6+
= stylesheet_link_tag 'application', 'media' => 'all', 'data-turbolinks-track' => true
7+
= javascript_include_tag 'application', 'data-turbolinks-track' => true
78
= csrf_meta_tags
89

9-
%body
10-
%h1.title Rotten Potatoes!
11-
#main
12-
- if flash[:notice]
13-
#notice.message= flash[:notice]
14-
- elsif flash[:warning]
15-
#warning.message= flash[:warning]
10+
%body
11+
%div.container
12+
%div.navbar.navbar-expand-lg.bg-primary.text-white
13+
%h1.title Rotten Potatoes!
14+
#main
15+
- if flash[:notice]
16+
%div.alert.alert-danger
17+
#notice.message= flash[:notice]
18+
- elsif flash[:warning]
19+
%div.alert.alert-danger
20+
#warning.message= flash[:warning]
1621

17-
= yield
22+
= yield

‎rottenpotatoes/app/views/movies/edit.html.haml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-# edit.html.haml using partial
22
3-
%h1 Edit Existing Movie
3+
%h2 Edit Existing Movie
44

55
= form_tag movie_path(@movie), :method => :put do
66

@@ -13,4 +13,4 @@
1313
= label :movie, :release_date, 'Released On'
1414
= date_select :movie, :release_date
1515

16-
= submit_tag 'Update Movie Info'
16+
= submit_tag 'Update Movie Info', :class => 'btn btn-primary'

‎rottenpotatoes/app/views/movies/index.html.haml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
-# This file is app/views/movies/index.html.haml
2-
%h1 All Movies
2+
%h2 All Movies
33

44
= form_tag movies_path, :method => :get, :id => 'ratings_form' do
55
= hidden_field_tag "title_sort", true if @title_header
66
= hidden_field_tag ":release_date_sort", true if @date_header
7-
Include:
7+
Include:
88
- @all_ratings.each do |rating|
99
= rating
1010
= check_box_tag "ratings[#{rating}]", 1, @selected_ratings.include?(rating), :id => "ratings_#{rating}"
11-
= submit_tag 'Refresh', :id => 'ratings_submit'
11+
= submit_tag 'Refresh', :id => 'ratings_submit', :class => 'btn btn-primary'
1212

13-
%table#movies
13+
%table#movies.table.table-striped.col-md-12
1414
%thead
1515
%tr
1616
%th{:class => @title_header}= link_to 'Movie Title', movies_path(:sort => 'title', :ratings => @selected_ratings), :id => 'title_header'
@@ -20,7 +20,7 @@
2020
%tbody
2121
- @movies.each do |movie|
2222
%tr
23-
%td= movie.title
23+
%td= movie.title
2424
%td= movie.rating
2525
%td= movie.release_date
2626
%td= link_to "More about #{movie.title}", movie_path(movie)

‎rottenpotatoes/app/views/movies/new.html.haml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%h1 Create New Movie
1+
%h2 Create New Movie
22

33
= form_tag movies_path do
44

@@ -11,4 +11,4 @@
1111
= label :movie, :release_date, 'Released On'
1212
= date_select :movie, :release_date
1313

14-
= submit_tag 'Save Changes'
14+
= submit_tag 'Save Changes', :class => 'btn btn-primary'
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-# in app/views/movies/show.html.haml
22
3-
%h2 Details about #{@movie.title}
3+
%h3 Details about #{@movie.title}
44

55
%ul#details
66
%li
@@ -10,10 +10,10 @@
1010
Released on:
1111
= @movie.release_date.strftime("%B %d, %Y")
1212

13-
%h3 Description:
13+
%h4 Description:
1414

1515
%p#description= @movie.description
1616

1717
= link_to 'Edit', edit_movie_path(@movie)
18-
= button_to 'Delete', movie_path(@movie), :method => :delete, :confirm => 'Are you sure?'
18+
= button_to 'Delete', movie_path(@movie), :method => :delete, :confirm => 'Are you sure?', :class => 'btn btn-primary'
1919
= link_to 'Back to movie list', movies_path

0 commit comments

Comments
 (0)