From aab9f57e369c492bad03bcf15411394897314b4d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 12 Mar 2016 16:09:46 +0100 Subject: Adding config for puma, dashboard layout, fixing some queries --- app/views/layouts/application.html.haml | 3 +- app/views/layouts/auth.html.haml | 15 ++++---- app/views/layouts/dashboard.html.haml | 45 +++++++++++++++++++++++ app/views/layouts/doorkeeper/admin.html.erb | 37 ------------------- app/views/layouts/doorkeeper/application.html.erb | 23 ------------ app/views/layouts/public.html.haml | 2 +- 6 files changed, 55 insertions(+), 70 deletions(-) create mode 100644 app/views/layouts/dashboard.html.haml delete mode 100644 app/views/layouts/doorkeeper/admin.html.erb delete mode 100644 app/views/layouts/doorkeeper/application.html.erb (limited to 'app/views/layouts') diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 25b3b5b49..868944a21 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -8,5 +8,4 @@ = csrf_meta_tags = yield :header_tags %body - .container - = content_for?(:content) ? yield(:content) : yield + = content_for?(:content) ? yield(:content) : yield diff --git a/app/views/layouts/auth.html.haml b/app/views/layouts/auth.html.haml index 8a2c8fa74..bddba570a 100644 --- a/app/views/layouts/auth.html.haml +++ b/app/views/layouts/auth.html.haml @@ -1,11 +1,12 @@ - content_for :content do - .logo-container - %h1 - = link_to root_path do - = render partial: 'application/logo', locals: { dim: 200 } - %small= Rails.configuration.x.local_domain + .container + .logo-container + %h1 + = link_to root_path do + = render partial: 'application/logo', locals: { dim: 200 } + %small= Rails.configuration.x.local_domain - .form-container - = yield + .form-container + = yield = render template: "layouts/application" diff --git a/app/views/layouts/dashboard.html.haml b/app/views/layouts/dashboard.html.haml new file mode 100644 index 000000000..128bf8db9 --- /dev/null +++ b/app/views/layouts/dashboard.html.haml @@ -0,0 +1,45 @@ +- content_for :content do + .dashboard-wrapper + .dashboard__sidebar + .dashboard__top-bar.alternate +   + .dashboard__current-user + = link_to account_path(current_user.account) do + = image_tag current_user.account.avatar.url(:medium), class: 'dashboard__current-user__avatar' + %strong.dashboard__current-user__display-name= current_user.account.display_name + %span.dashboard__current-user__username= "@#{current_user.account.username}" + %ul + %li.active + = link_to root_path do + = fa_icon 'home' + Home + %li + = link_to mentions_path do + = fa_icon 'at' + Mentions + %li + = link_to root_path do + = fa_icon 'group' + Subscriptions + %li + = link_to oauth_authorized_applications_path do + = fa_icon 'shield' + Authorized apps + %li + = link_to root_path do + = fa_icon 'user' + Edit profile + %li + = link_to edit_registration_path(current_user) do + = fa_icon 'wrench' + Change password + .dashboard__content + .dashboard__top-bar + Home + %ul + %li= link_to fa_icon('sign-out'), destroy_user_session_path, method: :delete + .dashboard__content__content= yield + .footer + .domain= Rails.configuration.x.local_domain + += render template: "layouts/application" diff --git a/app/views/layouts/doorkeeper/admin.html.erb b/app/views/layouts/doorkeeper/admin.html.erb deleted file mode 100644 index 1d1a688a2..000000000 --- a/app/views/layouts/doorkeeper/admin.html.erb +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - Doorkeeper - <%= stylesheet_link_tag "doorkeeper/admin/application" %> - <%= csrf_meta_tags %> - - - -
- <%- if flash[:notice].present? %> -
- <%= flash[:notice] %> -
- <% end -%> - - <%= yield %> -
- - diff --git a/app/views/layouts/doorkeeper/application.html.erb b/app/views/layouts/doorkeeper/application.html.erb deleted file mode 100644 index 562005af0..000000000 --- a/app/views/layouts/doorkeeper/application.html.erb +++ /dev/null @@ -1,23 +0,0 @@ - - - - <%= t('doorkeeper.layouts.application.title') %> - - - - - <%= stylesheet_link_tag "doorkeeper/application" %> - <%= csrf_meta_tags %> - - -
- <%- if flash[:notice].present? %> -
- <%= flash[:notice] %> -
- <% end -%> - - <%= yield %> -
- - diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index eb3c54f9d..2234df225 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -1,5 +1,5 @@ - content_for :content do - = yield + .container= yield .footer .domain= Rails.configuration.x.local_domain -- cgit