Skip to content

Commit

Permalink
<feature> Implement avanzu_html_start & avanzu_body_start blocks. Upd…
Browse files Browse the repository at this point in the history
…ate doc
  • Loading branch information
shakaran committed Oct 5, 2017
1 parent 6d8ade8 commit 201d899
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions Resources/docs/layout.md
Expand Up @@ -33,13 +33,19 @@ Listed in the order of appearance, these are:
### layout blocks
The blocks defined in the layout in order of appearance. Some of them do contain some of the major components like the sidebar or navbar. In order to redefine the block and to keep the default content, don't forget to use `{{parent()}}`

<dt>avanzu_html_start
<dd>In the `html` tag, useful for Angular attributes like ng-app

<dl>
<dt>avanzu_document_title
<dd>Defines the `title` defaults to the contents of `avanzu_page_title`

<dt>avanzu_head
<dd>comes right after the `_head.html.twig` partial

<dt>avanzu_body_start
<dd>In the `body` tag, useful for Angular attributes like ng-app

<dt>avanzu_after_body_start
<dd>comes right after the opening `body` tag

Expand Down
4 changes: 2 additions & 2 deletions Resources/views/layout/base-layout.html.twig
@@ -1,5 +1,5 @@
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
<!doctype html>
<!doctype html{% block avanzu_html_start %}{% endblock %}>
<!--[if lt IE 7 ]><html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]><html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]><html lang="en" class="no-js ie8"> <![endif]-->
Expand All @@ -24,7 +24,7 @@
{% endblock %}

</head>
<body class="{{ admin_skin|default("")|body_class }}">
<body{% block avanzu_body_start %}{% endblock %} class="{{ admin_skin|default("")|body_class }}">
{% block avanzu_after_body_start %}{% endblock %}
<div class="wrapper">

Expand Down
4 changes: 2 additions & 2 deletions Resources/views/layout/default-layout.html.twig
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html{% block avanzu_html_start %}{% endblock %}>
{#
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
Expand Down Expand Up @@ -31,7 +31,7 @@ desired effect
| | sidebar-mini |
|---------------------------------------------------------|
#}
<body class="{{ avanzu_admin_context.skin|default("")|body_class }}">
<body{% block avanzu_body_start %}{% endblock %} class="{{ avanzu_admin_context.skin|default("")|body_class }}">
{% block avanzu_after_body_start %}{% endblock %}
<div class="wrapper">

Expand Down
4 changes: 2 additions & 2 deletions Resources/views/layout/login-layout.html.twig
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html{% block avanzu_html_start %}{% endblock %}>
<html>
<head>

Expand Down Expand Up @@ -27,7 +27,7 @@
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition login-page">
<body{% block avanzu_body_start %}{% endblock %} class="hold-transition login-page">
{% block avanzu_after_body_start %}{% endblock %}
<div class="login-box">
<div class="login-logo">
Expand Down

0 comments on commit 201d899

Please sign in to comment.