add classes to body tag (#74)

* add classes to body tag

depending on page or article slug, add page-%slug% or article-%slug% class to <body>

* add page/article/category/tag slug to body class
This commit is contained in:
Christian González 2018-06-19 23:07:39 +02:00 committed by Gilson Filho
parent ecbf09f52d
commit ebce7b970b

View File

@ -99,7 +99,15 @@
{% endif %} {% endif %}
</head> </head>
<body> {% if page %}
<body class="page-{{ page.slug }}">
{% elif article %}
<body class="article-{{ article.slug }}">
{% elif category %}
<body class="category-{{ category.slug }}">
{% elif tag %}
<body class="tag-{{ tag.slug }}">
{% endif %}>
<!-- Navigation --> <!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top"> <nav class="navbar navbar-default navbar-custom navbar-fixed-top">