Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
IsurangaPerera committed Apr 22, 2023
1 parent 1411fcb commit 5d29e7d
Show file tree
Hide file tree
Showing 17 changed files with 130 additions and 138 deletions.
7 changes: 4 additions & 3 deletions app/app/views/assumptions/_assumption.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<div id="<%= dom_id assumption %>">
<p>
<h2><%= assumption.name %></h2>
</p>

<div class="engraved">
<span><%= assumption.name.capitalize %></span>
</div>

<p>
<strong>Description:</strong>
Expand Down
17 changes: 11 additions & 6 deletions app/app/views/assumptions/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<h1>Editing assumption</h1>
<div style="padding-left: 20px; padding-right: 10px">

<%= render "form", assumption: @assumption %>
<div class="engraved">
<span>Edit assumption</span>
</div>

<br>
<%= render "form", assumption: @assumption %>

<div>
<%= link_to "Show this assumption", @assumption %> |
<%= link_to "Back to assumptions", assumptions_path %>
<br>

<div>
<%= link_to "Show this assumption", @assumption %> |
<%= link_to "Back to assumptions", assumptions_path %>
</div>
</div>
16 changes: 0 additions & 16 deletions app/app/views/assumptions/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<html lang="en">
<head>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'bootstrap', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'bootstrap-icons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'boxicons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>

<title>Assumptions</title>
</head>

<body style="background: white; height: 100vh">
<p style="color: green"><%= notice %></p>

<div class="engraved" style="padding-left: 20px">
Expand Down Expand Up @@ -46,6 +33,3 @@
window.parent.resetGraph();
}
</script>

</body>
</html>
16 changes: 10 additions & 6 deletions app/app/views/assumptions/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<h1>New assumption</h1>
<div style="padding-left: 20px; padding-right: 10px">

<%= render "form", assumption: @assumption %>
<div class="engraved">
<span>New assumption</span>
</div>
<%= render "form", assumption: @assumption %>

<br>
<br>

<div>
<%= link_to "Back to assumptions", assumptions_path %>
</div>
<div>
<%= link_to "Back to assumptions", assumptions_path %>
</div>
</div>
36 changes: 19 additions & 17 deletions app/app/views/assumptions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<p style="color: green"><%= notice %></p>
<div style="padding-left: 20px; padding-right: 10px">

<%= render @assumption %>
<p style="color: green"><%= notice %></p>

<div>

<%= link_to "Back to assumptions", assumptions_path %>
<!-- if in the cucumber test, show the button -->
<% if Rails.env.test? %>
| <%= link_to "Edit this assumption", edit_assumption_path(@assumption) %>
<%= button_to "Destroy this assumption", @assumption, method: :delete %>
<% end %>

<!-- if in the production, show the button -->
<% if session[:userinfo].present? %>
| <%= link_to "Edit this assumption", edit_assumption_path(@assumption) %>
<%= button_to "Destroy this assumption", @assumption, method: :delete %>
<% end %>
</div>
<%= render @assumption %>

<div>

<%= link_to "Back to assumptions", assumptions_path %>
<!-- if in the cucumber test, show the button -->
<% if Rails.env.test? %>
| <%= link_to "Edit this assumption", edit_assumption_path(@assumption) %>
<%= button_to "Destroy this assumption", @assumption, method: :delete %>
<% end %>

<!-- if in the production, show the button -->
<% if session[:userinfo].present? %>
| <%= link_to "Edit this assumption", edit_assumption_path(@assumption) %>
<%= button_to "Destroy this assumption", @assumption, method: :delete %>
<% end %>
</div>
</div>
<script>
const assumption = <%= @assumption.to_json.html_safe %>;
document.addEventListener('DOMContentLoaded', () => {
Expand Down
6 changes: 5 additions & 1 deletion app/app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= favicon_link_tag asset_path('favicon.ico') %>
<%= stylesheet_link_tag 'bootstrap', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'bootstrap-icons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'boxicons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'https://cdnjs.cloudflare.com/ajax/libs/trix/1.3.1/trix.css', media: 'all', 'data-turbolinks-track': 'reload' %>
</head>

<body>
<body style="background: white; height: 100vh">
<%= yield %>
</body>
</html>
6 changes: 3 additions & 3 deletions app/app/views/practices/_practice.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="<%= dom_id practice %>">
<p>
<h2><%= practice.name %></h2>
</p>
<div class="engraved">
<span><%= practice.name.capitalize %></span>
</div>

<p>
<strong>Description:</strong>
Expand Down
16 changes: 10 additions & 6 deletions app/app/views/practices/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<h1>Editing practice</h1>
<div style="padding-left: 20px; padding-right: 10px">

<%= render "form", practice: @practice %>
<div class="engraved">
<span>Edit practice</span>
</div>
<%= render "form", practice: @practice %>

<br>
<br>

<div>
<%= link_to "Show this practice", @practice %> |
<%= link_to "Back to practices", practices_path %>
<div>
<%= link_to "Show this practice", @practice %> |
<%= link_to "Back to practices", practices_path %>
</div>
</div>
16 changes: 0 additions & 16 deletions app/app/views/practices/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<html lang="en">
<head>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'bootstrap', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'bootstrap-icons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'boxicons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>

<title>Practices</title>
</head>

<body style="background: white; height: 100vh">
<p style="color: green"><%= notice %></p>

<div class="engraved" style="padding-left: 20px">
Expand Down Expand Up @@ -46,6 +33,3 @@
window.parent.resetGraph();
}
</script>

</body>
</html>
17 changes: 11 additions & 6 deletions app/app/views/practices/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<h1>New practice</h1>
<div style="padding-left: 20px; padding-right: 10px">

<%= render "form", practice: @practice %>
<div class="engraved">
<span>New practice</span>
</div>

<br>
<%= render "form", practice: @practice %>

<div>
<%= link_to "Back to practices", practices_path %>
</div>
<br>

<div>
<%= link_to "Back to practices", practices_path %>
</div>
</div>
30 changes: 16 additions & 14 deletions app/app/views/practices/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<p style="color: green"><%= notice %></p>
<div style="padding-left: 20px; padding-right: 10px">
<p style="color: green"><%= notice %></p>

<%= render @practice %>
<%= render @practice %>

<div>
<div>

<%= link_to "Back to practices", practices_path %>
<!-- if in the cucumber test, show the button -->
<% if Rails.env.test? %>
| <%= link_to "Edit this practice", edit_practice_path(@practice) %>
<%= button_to "Destroy this practice", @practice, method: :delete %>
<% end %>
<!-- if in the production, show the button -->
<% if session[:userinfo].present? %>
| <%= link_to "Edit this practice", edit_practice_path(@practice) %>
<%= button_to "Destroy this practice", @practice, method: :delete %>
<% end %>
<%= link_to "Back to practices", practices_path %>
<!-- if in the cucumber test, show the button -->
<% if Rails.env.test? %>
| <%= link_to "Edit this practice", edit_practice_path(@practice) %>
<%= button_to "Destroy this practice", @practice, method: :delete %>
<% end %>
<!-- if in the production, show the button -->
<% if session[:userinfo].present? %>
| <%= link_to "Edit this practice", edit_practice_path(@practice) %>
<%= button_to "Destroy this practice", @practice, method: :delete %>
<% end %>
</div>
</div>

<script>
Expand Down
6 changes: 3 additions & 3 deletions app/app/views/theories/_theory.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="<%= dom_id theory %>">
<p>
<h2><%= theory.name %></h2>
</p>
<div class="engraved">
<span><%= theory.name.capitalize %></span>
</div>

<p>
<strong>Description:</strong>
Expand Down
16 changes: 10 additions & 6 deletions app/app/views/theories/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<h1>Editing theory</h1>
<div style="padding-left: 20px; padding-right: 10px">

<%= render "form", theory: @theory %>
<div class="engraved">
<span>Edit theory</span>
</div>
<%= render "form", theory: @theory %>

<br>
<br>

<div>
<%= link_to "Show this theory", @theory %> |
<%= link_to "Back to theories", theories_path %>
<div>
<%= link_to "Show this theory", @theory %> |
<%= link_to "Back to theories", theories_path %>
</div>
</div>
16 changes: 0 additions & 16 deletions app/app/views/theories/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<html lang="en">
<head>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'bootstrap', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'bootstrap-icons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'boxicons', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>

<title>Theories</title>
</head>

<body style="background: white; height: 100vh">
<p style="color: green"><%= notice %></p>

<div class="engraved" style="padding-left: 20px">
Expand Down Expand Up @@ -44,6 +31,3 @@
window.parent.resetGraph();
}
</script>

</body>
</html>
15 changes: 10 additions & 5 deletions app/app/views/theories/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<h1>New theory</h1>
<div style="padding-left: 20px; padding-right: 10px">

<%= render "form", theory: @theory %>
<div class="engraved">
<span>New theory</span>
</div>

<br>
<%= render "form", theory: @theory %>

<div>
<%= link_to "Back to theories", theories_path %>
<br>

<div>
<%= link_to "Back to theories", theories_path %>
</div>
</div>
32 changes: 18 additions & 14 deletions app/app/views/theories/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
<p style="color: green"><%= notice %></p>
<div style="padding-left: 20px; padding-right: 10px">
<p style="color: green"><%= notice %></p>

<%= render @theory %>
<%= render @theory %>

<div>

<%= link_to "Back to theories", theories_path %>
<!-- if in the cucumber test, show the button -->
<% if Rails.env.test?%>
| <%= link_to "Edit this theory", edit_theory_path(@theory) %>
<%= button_to "Destroy this theory", @theory, method: :delete %>
<% end %>
<!-- if in the production, show the button -->
<% if session[:userinfo].present? %>
| <%= link_to "Edit this theory", edit_theory_path(@theory) %>
<%= button_to "Destroy this theory", @theory, method: :delete %>
<div>

<%= link_to "Back to theories", theories_path%>

<!-- if in the cucumber test, show the button -->
<% if Rails.env.test? %>
| <%= link_to "Edit this theory", edit_theory_path(@theory) %>
<%= button_to "Destroy this theory", @theory, method: :delete %>
<% end %>

<!-- if in the production, show the button -->
<% if session[:userinfo].present? %>
| <%= link_to "Edit this theory", edit_theory_path(@theory)%>
<%= button_to "Destroy this theory", @theory, method: :delete %>
<% end %>
</div>
</div>

<script>
Expand Down
Binary file modified app/db/development.sqlite3
Binary file not shown.

0 comments on commit 5d29e7d

Please sign in to comment.