From db34717173d8836d09d12b0d933ef2b5ba49208b Mon Sep 17 00:00:00 2001 From: Luke Barratt Date: Wed, 30 Apr 2014 01:02:07 +0100 Subject: [PATCH] Improve teams/matches styling --- app/assets/stylesheets/components/_forms.scss | 1 + app/assets/stylesheets/pages/_matches.scss | 4 +- app/views/teams/new.html.erb | 66 +++++++++---------- 3 files changed, 34 insertions(+), 37 deletions(-) diff --git a/app/assets/stylesheets/components/_forms.scss b/app/assets/stylesheets/components/_forms.scss index e86b20f..4c70a55 100644 --- a/app/assets/stylesheets/components/_forms.scss +++ b/app/assets/stylesheets/components/_forms.scss @@ -27,6 +27,7 @@ form { > .field_with_errors { input, + input[type=text], textarea { border: $input-border-width solid $flash-error; diff --git a/app/assets/stylesheets/pages/_matches.scss b/app/assets/stylesheets/pages/_matches.scss index e2ee9d2..8ce9e99 100644 --- a/app/assets/stylesheets/pages/_matches.scss +++ b/app/assets/stylesheets/pages/_matches.scss @@ -109,12 +109,12 @@ div#match { } .score-1 { - padding-left: $title-height/5; + padding-left: $title-height/6; left: 0; } .score-2 { - padding-right: $title-height/5; + padding-right: $title-height/6; right: 0; } } diff --git a/app/views/teams/new.html.erb b/app/views/teams/new.html.erb index eeee3b1..07dc6f2 100644 --- a/app/views/teams/new.html.erb +++ b/app/views/teams/new.html.erb @@ -1,37 +1,33 @@ -

New team

+

New Team

-
- <%= form_for(@team) do |f| %> - <%= f.error_messages %> +<%= form_for(@team, html: { class: 'square horizontal' }) do |f| %> + <%= render 'shared/errors', messages: @team.errors.full_messages %> -

- <%= f.label :name %>
- <%= f.text_field :name %> -

-

- <%= f.label :irc %>
- <%= f.text_field :irc %> -

-

- <%= f.label :web %>
- <%= f.text_field :web %> -

-

- <%= f.label :tag %>
- <%= f.text_field :tag %> -

-

- <%= f.label :country %>
- <%= country_code_select :team, :country %> -

-

- <%= f.label :comment %>
- <%= f.text_field :comment %> -

-

- <%= f.submit "Create" %> -

- <% end %> -
- -<%= link_to 'Back', teams_path %> +
+ <%= f.label :name %> + <%= f.text_field :name %> +
+
+ <%= f.label :irc %> + <%= f.text_field :irc %> +
+
+ <%= f.label :web %> + <%= f.text_field :web %> +
+
+ <%= f.label :tag %> + <%= f.text_field :tag %> +
+
+ <%= f.label :country %> + <%= country_code_select :team, :country %> +
+
+ <%= f.label :comment %> + <%= f.text_field :comment %> +
+
+ <%= f.submit "Create" %> +
+<% end %>