mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 13:15:40 +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.delete('ddoc')
|
||||||
".#{types.join(',.')}"
|
".#{types.join(',.')}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def body_css_class
|
||||||
|
[controller_path.split('/').map!(&:dasherize), action_name.dasherize, 'page'].join('-')
|
||||||
|
end
|
||||||
end
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||||
= favicon_link_tag 'favicon.ico'
|
= 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"}
|
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||||
.container
|
.container
|
||||||
.navbar-header
|
.navbar-header
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
= stylesheet_link_tag 'admin-manifest', media: 'all'
|
||||||
= favicon_link_tag 'favicon.ico'
|
= 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"}
|
.navbar.navbar-inverse.navbar-static-top{role: "navigation"}
|
||||||
.container
|
.container
|
||||||
.navbar-header
|
.navbar-header
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
<%= stylesheet_link_tag 'registrant-manifest', media: 'all' %>
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
<%= favicon_link_tag 'favicon.ico' %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="<%= body_css_class %>">
|
||||||
<!-- Fixed navbar
|
<!-- Fixed navbar
|
||||||
-->
|
-->
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||||
<%= favicon_link_tag 'favicon.ico' %>
|
<%= favicon_link_tag 'favicon.ico' %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="<%= body_css_class %>">
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
<%= stylesheet_link_tag 'registrar-manifest', media: 'all' %>
|
||||||
<%= javascript_include_tag 'registrar-manifest' %>
|
<%= javascript_include_tag 'registrar-manifest' %>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="<%= body_css_class %>">
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<nav class="navbar navbar-default navbar-fixed-top">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue