diff --git a/app/assets/stylesheets/colors.css b/app/assets/stylesheets/colors.css index b2cba83..116e64d 100644 --- a/app/assets/stylesheets/colors.css +++ b/app/assets/stylesheets/colors.css @@ -1,4 +1,10 @@ :root { + --background-color: #111; + --main-background-color: + --header-color: #15345b; + --header-text-color: #fff; + --header-height: 150px; + --inset-bg-color: #eee; --border-radius: .5em; diff --git a/app/assets/stylesheets/layout.css b/app/assets/stylesheets/layout.css index 10c49a8..6d8a710 100644 --- a/app/assets/stylesheets/layout.css +++ b/app/assets/stylesheets/layout.css @@ -4,14 +4,18 @@ body { font-size: 1.1em; - margin: 0 auto; - max-width: 80em; - padding: 1em; + background-color: var(--background-color); + min-width: 30em; } main { + background: linear-gradient(180deg, rgba(227,220,190,1) 0%, rgba(255,248,238,1) 100%); + max-width: 80vw; display: flex; flex-direction: column; + padding: 1em; + margin: 0 auto; + min-height: calc(100vh - var(--header-height)); } aside.flash { @@ -38,6 +42,35 @@ h1, h2 { text-align: center; } +header { + background: linear-gradient(180deg, rgba(34,45,113,1) 0%, rgba(22,90,157,1) 100%); + position: relative; + padding: 0 50px; + margin-right: 2em; + height: var(--header-height); +} + +/* Angled banner end */ +header:before { + content: ""; + width: 0; + height: 0; + border-top: calc(var(--header-height) / 2) solid transparent; + border-bottom: calc(var(--header-height) / 2) solid transparent; + border-right: calc(var(--header-height) / 2) solid var(--background-color); + position: absolute; + right:0; +} + +header h1 { + padding: .5em 0; +} + +header h1 a:link, header h1 a:visited { + color: var(--header-text-color); + text-decoration: none; +} + header nav { ul { display: flex; diff --git a/app/controllers/tables_controller.rb b/app/controllers/tables_controller.rb index 4314603..8064c83 100644 --- a/app/controllers/tables_controller.rb +++ b/app/controllers/tables_controller.rb @@ -4,7 +4,7 @@ class TablesController < ApplicationController before_action :set_table, only: [ :show, :edit, :update, :destroy ] def index - @owned_tables = Current.user.owned_tables + @tables = Current.user.tables end def show diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 80c3783..7c547c8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -31,8 +31,8 @@ - <%= render partial: "shared/flash_messages" %>
+ <%= render partial: "shared/flash_messages" %> <%= yield(:submenu) if content_for?(:submenu) %> <%= yield %>
diff --git a/app/views/tables/_table.html.erb b/app/views/tables/_table.html.erb index 79499a4..6e34aac 100644 --- a/app/views/tables/_table.html.erb +++ b/app/views/tables/_table.html.erb @@ -2,4 +2,7 @@

<%= link_to table.name, table %>

+ <% if table.owner == Current.user %> + OWNER + <% end %>
diff --git a/app/views/tables/index.html.erb b/app/views/tables/index.html.erb index e4e17d4..a7de39c 100644 --- a/app/views/tables/index.html.erb +++ b/app/views/tables/index.html.erb @@ -1,10 +1,11 @@ <% content_for :title, t(".tables") %> +

<%= t(".tables") %>

+ <%= link_to t(".new_table"), new_table_path %> -

Tables you own

-<% if @owned_tables.any? %> - <%= render @owned_tables %> +<% if @tables.any? %> + <%= render @tables %> <% else %> -

You do not own any tables.

+

<%= t(".no_tables") %>

<% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ce794e3..9a8ebd2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -99,6 +99,7 @@ en: index: new_table: Create a table tables: Tables + no_tables: You are currently not at any tables. Why not create one? show: edit_table: Edit table game_system: Game system