Skip to content

Commit afb1233

Browse files
committed
navbar fixed + table responsive
1 parent 7948ce4 commit afb1233

File tree

13 files changed

+38
-34
lines changed

13 files changed

+38
-34
lines changed

app/assets/stylesheets/application.scss

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,6 @@ html {
232232
padding: 20px 0;
233233
}
234234

235-
.table-responsive {
236-
overflow-x: inherit;
237-
}
238-
239235
@media screen {
240236
html {
241237
min-height: 100%;
@@ -347,10 +343,18 @@ label[required]::after{
347343
}
348344
}
349345

350-
.navbar {
346+
.navbar-toggler {
347+
height: 24px;
348+
}
349+
350+
.navbar-header {
351351
min-height: 50px;
352352
}
353353

354+
.text-white .dropdown-item {
355+
color: $white;
356+
}
357+
354358
.navbar .container-fluid {
355359
padding: 0;
356360
}

app/views/application/_navbar.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="container">
44
<div class="row align-content-center w-100">
55
<div class="col-12 col-md-3 d-flex">
6-
<div class="navbar-header w-100 d-flex">
6+
<div class="navbar-header w-100 d-flex align-items-center">
77
<% if current_user && current_organization %>
88
<a class="navbar-brand align-content-center" href="<%= organization_path(current_organization) %>">TimeOverflow</a>
99
<% else %>
@@ -16,7 +16,7 @@
1616
</div>
1717
</div>
1818
<div class="col-12 col-md-9">
19-
<div id="navbar-collapse" class="collapse navbar-collapse">
19+
<div id="navbar-collapse" class="collapse navbar-collapse border-top border-primary">
2020
<ul class="nav navbar-nav ms-auto d-none d-md-flex">
2121
<% if current_user %>
2222
<%= render 'application/menus/user_admin_menu' %>
@@ -25,7 +25,7 @@
2525
<% end %>
2626
</ul>
2727

28-
<ul class="nav navbar-nav navbar-right d-md-none">
28+
<ul class="nav navbar-nav navbar-right d-md-none mt-4 text-white">
2929
<% if current_user %>
3030
<li class="nav-item">
3131
<%= image_tag avatar_url(current_user) %>

app/views/application/menus/_user_admin_menu_items.html.erb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</li>
55
<% (current_user.organizations - [current_organization]).each do |org| %>
66
<li>
7-
<%= link_to set_current_organization_path(org), method: :post, class: "dropdown-item text-white" do %>
7+
<%= link_to set_current_organization_path(org), method: :post, class: "dropdown-item" do %>
88
<%= glyph(:retweet) %>
99
<%= org.name %>
1010
<% end %>
@@ -14,22 +14,22 @@
1414
<% end %>
1515

1616
<li>
17-
<%= link_to current_user, class: "dropdown-item text-white" do %>
17+
<%= link_to current_user, class: "dropdown-item" do %>
1818
<%= glyph :user %>
1919
<%= t "layouts.application.edit_profile" %>
2020
<% end %>
2121
</li>
2222

2323
<li>
24-
<%= link_to organizations_path, class: "dropdown-item text-white" do %>
24+
<%= link_to organizations_path, class: "dropdown-item" do %>
2525
<%= glyph :list %>
2626
<%= t('layouts.application.manage_memberships') %>
2727
<% end %>
2828
</li>
2929

3030
<% current_user.members.where(manager: true).each do |m| %>
3131
<li>
32-
<%= link_to m.organization, class: "dropdown-item text-white" do %>
32+
<%= link_to m.organization, class: "dropdown-item" do %>
3333
<%= glyph :pencil %>
3434
<%= t "layouts.application.edit_org", organization: m.organization %>
3535
<% end %>
@@ -38,7 +38,7 @@
3838

3939
<% if superadmin? %>
4040
<li>
41-
<%= link_to admin_root_path, class: "dropdown-item text-white" do %>
41+
<%= link_to admin_root_path, class: "dropdown-item" do %>
4242
<%= glyph :cog %>
4343
<%= t "application.navbar.adminshort" %>
4444
<% end %>
@@ -47,7 +47,7 @@
4747

4848
<li class="dropdown-divider" role="presentation"></li>
4949
<li>
50-
<%= link_to destroy_user_session_path, method: :delete, class: "dropdown-item text-white" do %>
50+
<%= link_to destroy_user_session_path, method: :delete, class: "dropdown-item" do %>
5151
<%= glyph :log_out %>
5252
<%= t "application.navbar.sign_out" %>
5353
<% end %>

app/views/organizations/index.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
</div>
1717

1818
<div class="card">
19-
<div class="card-body">
20-
<table class="table table-responsive table-hover table-sm">
19+
<div class="card-body table-responsive">
20+
<table class="table table-hover table-sm">
2121
<thead>
2222
<tr>
2323
<th></th>

app/views/organizations/select_organization.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="card">
2-
<div class="card-body">
3-
<table class='table table-responsive table-hover table-sm'>
2+
<div class="card-body table-responsive">
3+
<table class='table table-hover table-sm'>
44
<thead>
55
<tr>
66
<th><%= t 'activerecord.attributes.organization.name' %></th>

app/views/petitions/manage.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<div class="row">
3333
<div class="col-md-12">
3434
<div class="card">
35-
<div class="card-body">
36-
<table class="table table-responsive table-hover table-sm">
35+
<div class="card-body table-responsive">
36+
<table class="table table-hover table-sm">
3737
<thead>
3838
<tr>
3939
<th></th>

app/views/shared/_movements.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<h3>
44
<%= t(".movements") %>
55
</h3>
6-
<div class="transactions">
7-
<table class="table table-responsive table-sm">
6+
<div class="transactions table-responsive">
7+
<table class="table table-sm">
88
<thead>
99
<tr>
1010
<th><%= t "global.date" %></th>

app/views/statistics/all_transfers.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<%= t 'global.statistics' %>: <%= t '.transfers' %>
33
</h1>
44
<div class="card">
5-
<div class="card-body">
6-
<table class="table table-responsive table-hover table-sm">
5+
<div class="card-body table-responsive">
6+
<table class="table table-hover table-sm">
77
<thead>
88
<tr>
99
<th><%= t '.date' %></th>

app/views/statistics/inactive_users.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<%= t 'global.statistics' %>: <%= t '.inactive_users' %>
33
</h1>
44
<div class="card">
5-
<div class="card-body">
6-
<table class="table table-responsive table-hover table-sm">
5+
<div class="card-body table-responsive">
6+
<table class="table table-hover table-sm">
77
<thead>
88
<tr>
99
<th>ID</th>

app/views/statistics/last_login.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<%= t 'global.statistics' %>: <%= t '.last_login' %>
33
</h1>
44
<div class="card">
5-
<div class="card-body">
6-
<table class="table table-responsive table-hover table-sm">
5+
<div class="card-body table-responsive">
6+
<table class="table table-hover table-sm">
77
<thead>
88
<tr>
99
<th>ID</th>

app/views/statistics/type_swaps.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<%= t 'global.statistics' %>: <%= t '.type_of_swaps' %>
33
</h1>
44
<div class="card">
5-
<div class="card-body">
6-
<table class="table table-responsive table-hover table-sm">
5+
<div class="card-body table-responsive">
6+
<table class="table table-hover table-sm">
77
<thead>
88
<tr>
99
<th>%</th>

app/views/statistics/without_offers.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<%= t 'global.statistics' %>: <%= t '.without_offers' %>
33
</h1>
44
<div class="card">
5-
<div class="card-body">
6-
<table class="table table-responsive table-hover table-sm">
5+
<div class="card-body table-responsive">
6+
<table class="table table-hover table-sm">
77
<thead>
88
<tr>
99
<th>ID</th>

app/views/users/manage.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<div class="row">
3434
<div class="col-md-12">
3535
<div class="card">
36-
<div class="card-body">
37-
<table class="table table-responsive table-hover table-sm">
36+
<div class="card-body table-responsive">
37+
<table class="table table-hover table-sm">
3838
<thead>
3939
<tr>
4040
<th></th>

0 commit comments

Comments
 (0)