From e4a3d919ea41663106b090a3c13d8d307d2af4b2 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Wed, 15 Apr 2015 14:03:31 +0300 Subject: [PATCH] Added EIS fonts to admin --- app/assets/stylesheets/application.css.scss | 4 ++-- app/assets/stylesheets/custom-boostrap.scss | 13 ++++++++++++ app/assets/stylesheets/depp/application.scss | 3 --- .../stylesheets/depp/custom-boostrap.scss | 5 ----- app/assets/stylesheets/depp/overwrites.sass | 1 - .../stylesheets/{depp => }/general.sass | 4 ++-- app/views/admin/domain_versions/index.haml | 17 +++++++--------- app/views/admin/domains/_form.haml | 9 ++------- app/views/admin/domains/edit.haml | 12 ++++------- app/views/admin/registrars/_form.haml | 20 ++++++++++++------- app/views/admin/registrars/edit.haml | 12 ++++------- app/views/admin/shared/_title.haml | 11 ++++++++++ app/views/registrar/shared/_title.haml | 2 +- 13 files changed, 59 insertions(+), 54 deletions(-) create mode 100644 app/assets/stylesheets/custom-boostrap.scss delete mode 100644 app/assets/stylesheets/depp/application.scss delete mode 100644 app/assets/stylesheets/depp/custom-boostrap.scss delete mode 100644 app/assets/stylesheets/depp/overwrites.sass rename app/assets/stylesheets/{depp => }/general.sass (98%) create mode 100644 app/views/admin/shared/_title.haml diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index e307f317a..66b50ac5b 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -1,9 +1,9 @@ -@import "bootstrap-sprockets"; -@import "bootstrap"; +//= require 'custom-boostrap' @import "nprogress"; @import "nprogress-bootstrap"; @import "bootstrap-ext"; @import "typeaheadjs"; @import "selectize"; @import "selectize.bootstrap3"; +@import "general"; @import "app"; diff --git a/app/assets/stylesheets/custom-boostrap.scss b/app/assets/stylesheets/custom-boostrap.scss new file mode 100644 index 000000000..20724c40d --- /dev/null +++ b/app/assets/stylesheets/custom-boostrap.scss @@ -0,0 +1,13 @@ +$font-family-sans-serif: 'EtelkaLightProRegular', Arial, Helvetica, sans-serif; +$font-family-serif: 'EtelkaLightProBold', Georgia, "Times New Roman", Times, serif; +$navbar-default-bg: #F69240; +$navbar-default-brand-color: #fff; +$navbar-default-link-color: #fff; +$border-radius-base: 2px; +$body-bg: #F8F8F8; +$container-large-desktop: 1040px; +$font-size-h1: 26px; +$navbar-default-link-active-color: #333; + +@import "bootstrap-sprockets"; +@import "bootstrap"; diff --git a/app/assets/stylesheets/depp/application.scss b/app/assets/stylesheets/depp/application.scss deleted file mode 100644 index 5ac46af24..000000000 --- a/app/assets/stylesheets/depp/application.scss +++ /dev/null @@ -1,3 +0,0 @@ -//= require './custom-boostrap' -//= require './general' -//= require './overwrites' diff --git a/app/assets/stylesheets/depp/custom-boostrap.scss b/app/assets/stylesheets/depp/custom-boostrap.scss deleted file mode 100644 index d2c776d1f..000000000 --- a/app/assets/stylesheets/depp/custom-boostrap.scss +++ /dev/null @@ -1,5 +0,0 @@ -$font-family-sans-serif: 'EtelkaLightProRegular', Arial, Helvetica, sans-serif; -$font-family-serif: 'EtelkaLightProBold', Georgia, "Times New Roman", Times, serif; - -@import "bootstrap-sprockets"; -@import "bootstrap"; diff --git a/app/assets/stylesheets/depp/overwrites.sass b/app/assets/stylesheets/depp/overwrites.sass deleted file mode 100644 index ec4308d11..000000000 --- a/app/assets/stylesheets/depp/overwrites.sass +++ /dev/null @@ -1 +0,0 @@ -// Overwrite this file at your application app/assets/stylesheets/depp/overwrite.sass diff --git a/app/assets/stylesheets/depp/general.sass b/app/assets/stylesheets/general.sass similarity index 98% rename from app/assets/stylesheets/depp/general.sass rename to app/assets/stylesheets/general.sass index 975e01a63..499f25167 100644 --- a/app/assets/stylesheets/depp/general.sass +++ b/app/assets/stylesheets/general.sass @@ -12,12 +12,12 @@ h1 margin-bottom: 16px a - color: #008fd7 + color: #23527C text-decoration: none a:hover, a:active - color: #008fd7 + color: #23527C outline: 0 h1, h2, h3, h4, h1 a, h2 a, h3 a, h4 a diff --git a/app/views/admin/domain_versions/index.haml b/app/views/admin/domain_versions/index.haml index 712ca0c95..16f19add2 100644 --- a/app/views/admin/domain_versions/index.haml +++ b/app/views/admin/domain_versions/index.haml @@ -1,11 +1,7 @@ -.row - .col-sm-6 - %h2.text-center-xs - = "#{t(:domain_history)}: #{@domain.name}" - .col-sm-6 - %h2.text-right.text-center-xs +- content_for :actions do + = link_to(t(:back_to_domain), [:admin, @domain], class: 'btn btn-default') += render 'admin/shared/title', name: "#{t(:history)}: #{@domain.name}" -%hr .row .col-md-12 .table-responsive @@ -21,9 +17,10 @@ %th{class: 'col-xs-2'}= t(:registrar) %tbody - %tr.small - = render 'admin/domain_versions/version', - domain: @domain, version: @domain.versions.last + - if @domain.versions.present? + %tr.small + = render 'admin/domain_versions/version', + domain: @domain, version: @domain.versions.last - @domain.versions.not_creates.reverse.each do |version| %tr.small diff --git a/app/views/admin/domains/_form.haml b/app/views/admin/domains/_form.haml index d6421e93b..54587125c 100644 --- a/app/views/admin/domains/_form.haml +++ b/app/views/admin/domains/_form.haml @@ -3,17 +3,12 @@ - unless @domain.parent_valid? %hr .row - .col-md-12 - %ul.nav.nav-tabs{:role => "tablist", id: 'tabs'} - - li_class = @domain.statuses_tab_valid? ? nil : 'error-tab' - %li{class: li_class} - %a{"data-toggle" => "tab", :href => "#statuses-tab", :role => "tab"}= t('statuses') - / Tab panes + .col-md-8 .tab-content{style:'margin-top: 20px;'} #general-tab.tab-pane.active = render 'admin/domains/form_partials/statuses', f: f .row - .col-md-12.text-right + .col-md-8.text-right = button_tag(t('save'), class: 'btn btn-primary') :coffee diff --git a/app/views/admin/domains/edit.haml b/app/views/admin/domains/edit.haml index fe7749488..973cf5b60 100644 --- a/app/views/admin/domains/edit.haml +++ b/app/views/admin/domains/edit.haml @@ -1,9 +1,5 @@ -.row - .col-sm-6 - %h2.text-center-xs - = "#{t('edit_domain')}" - .col-sm-6 - %h2.text-right.text-center-xs - = link_to(t('back_to_domain'), [:admin, @domain], class: 'btn btn-default') -%hr +- content_for :actions do + = link_to(t(:back_to_domain), [:admin, @domain], class: 'btn btn-default') += render 'admin/shared/title', name: "#{t(:edit)}: #{@domain.name}" + = render 'form' diff --git a/app/views/admin/registrars/_form.haml b/app/views/admin/registrars/_form.haml index 40e4e8a37..3a1a275b9 100644 --- a/app/views/admin/registrars/_form.haml +++ b/app/views/admin/registrars/_form.haml @@ -7,10 +7,16 @@ %hr .row - .col-md-6 - .form-group - = f.label :name - = f.text_field(:name, class: 'form-control') + .col-md-8 + .panel.panel-default + .panel-heading.clearfix + .pull-left= t(:general) + .panel-body + .form-group + .col-md-3.control-label + = f.label :name + .col-md-7 + = f.text_field(:name, class: 'form-control') .form-group = f.label :reg_no = f.text_field(:reg_no, class: 'form-control') @@ -27,8 +33,8 @@ .form-group = f.label :billing_email = f.text_field(:billing_email, class: 'form-control') - - .col-md-6.text-left + .row + .col-md-8 .form-group = f.label :street = f.text_field(:street, class: 'form-control') @@ -51,5 +57,5 @@ / %p.help-block= t('address_help') %hr .row - .col-md-12.text-right + .col-md-8.text-right = button_tag(t('save'), class: 'btn btn-primary') diff --git a/app/views/admin/registrars/edit.haml b/app/views/admin/registrars/edit.haml index 649b9fc3a..4c6e810db 100644 --- a/app/views/admin/registrars/edit.haml +++ b/app/views/admin/registrars/edit.haml @@ -1,9 +1,5 @@ -.row - .col-sm-6 - %h2.text-center-xs - = "#{t('edit_registrar')}" - .col-sm-6 - %h2.text-right.text-center-xs - = link_to(t('back_to_registrar'), [:admin, @registrar], class: 'btn btn-default') -%hr +- content_for :actions do + = link_to(t(:back_to_registrar), [:admin, @registrar], class: 'btn btn-default') += render 'admin/shared/title', name: "#{t(:edit)}: #{@registrar.name}" + = render 'form' diff --git a/app/views/admin/shared/_title.haml b/app/views/admin/shared/_title.haml new file mode 100644 index 000000000..c87f07f05 --- /dev/null +++ b/app/views/admin/shared/_title.haml @@ -0,0 +1,11 @@ +- content_for :window_title do + %title= name + +.row + .col-sm-8 + %h1.text-center-xs + = truncate(name, length: 40) + .col-sm-4 + %h1.text-right.text-center-xs + = yield :actions +%hr diff --git a/app/views/registrar/shared/_title.haml b/app/views/registrar/shared/_title.haml index 9704fe5d9..c8f525361 100644 --- a/app/views/registrar/shared/_title.haml +++ b/app/views/registrar/shared/_title.haml @@ -4,7 +4,7 @@ .row .col-sm-6 %h1.text-center-xs - = name + = truncate(name) .col-sm-6 %h1.text-right.text-center-xs = yield :actions