mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 12:47:29 +02:00
Generate <body> CSS class for every action for better styling
This commit is contained in:
parent
1fd6200eef
commit
30fb22af42
6 changed files with 10 additions and 6 deletions
|
@ -89,4 +89,8 @@ module ApplicationHelper
|
|||
types.delete('ddoc')
|
||||
".#{types.join(',.')}"
|
||||
end
|
||||
end
|
||||
|
||||
def body_css_class
|
||||
[controller_path.split('/').map!(&:dasherize), action_name.dasherize, 'page'].join('-')
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
%body{:style => env_style}
|
||||
%body{:style => env_style, class: body_css_class}
|
||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||
.container
|
||||
.navbar-header
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= csrf_meta_tags
|
||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||
= favicon_link_tag 'favicon.ico'
|
||||
%body{:style => env_style}
|
||||
%body{:style => env_style, class: body_css_class}
|
||||
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||
.container
|
||||
.navbar-header
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
||||
<%= favicon_link_tag 'favicon.ico' %>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<%= body_css_class %>">
|
||||
<!-- Fixed navbar
|
||||
-->
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||
<%= favicon_link_tag 'favicon.ico' %>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<%= body_css_class %>">
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||
<%= javascript_include_tag 'registrar-manifest' %>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<%= body_css_class %>">
|
||||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue