Skip to content

Commit

Permalink
add front and not-front body classes (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Knox authored and sherakama committed Aug 18, 2017
1 parent 4c3934a commit e3bd068
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions templates/html.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,11 @@
<css-placeholder token="{{ placeholder_token }}">
<js-placeholder token="{{ placeholder_token }}">
</head>
{% set classes = [] %}
{% set classes = [is_front ? 'front', not is_front ? 'not-front'] %}
{% for role in user.roles %}
{% set classes = classes|merge(['role--' ~ role|clean_class]) %}
{% endfor %}

<body{{ attributes.addClass(classes,
not is_front ? 'with-subnav',
node_type
) }}>
<body{{ attributes.addClass(classes) }}>
<div id="skip">
<a href="#main-menu" class="visually-hidden focusable skip-link">
{{ 'Skip to main navigation'|t }}
Expand Down

0 comments on commit e3bd068

Please # to comment.