@@ -0,0 +1,3 @@
+.byline {
+ font-style: oblique;
+}
@@ -12,7 +12,7 @@ class BlogController extends Controller {
1 => [
'id' => '1',
'title' => 'Title 1',
- 'body' => 'Body 1',
+ 'body' => 'Body 1 <3 escaped',
'authorName' => 'Fred',
],
2 => [
@@ -20,7 +20,7 @@ class DefaultController extends AbstractController {
* )
*/
public function index() {
- return new Response("Hello");
+ return $this->render('hello.html.twig', ["message" => "Hello!"]);
}
/**
@@ -3,8 +3,9 @@
<head>
<meta charset="UTF-8">
<title>{% block title %}Test application{% endblock %}</title>
- {% block stylesheets %}
- <link rel="stylesheet" href="{{ absolute_url(asset('styles/app.css')) }}" />{% endblock %}
+ {% block stylesheets -%}
+ <link rel="stylesheet" href="{{ absolute_url(asset('styles/app.css')) }}" />
+ {% endblock %}
</head>
<body>
<div id="sidebar">
@@ -18,3 +18,8 @@
<p>{{ pager }}</p>
{% endblock %}
+
+{% block stylesheets %}
+{{ parent() -}}
+ <link rel="stylesheet" href="{{ asset('styles/blog.css') }}" />
+{% endblock %}
@@ -0,0 +1,12 @@
+{% extends "base.html.twig" %}
+{% block body %}
+<h1>{{ message }}</h1>
+<h2>Environment</h2>
+ <p>{{ app.environment }}</p>
+<h2>Debug ?</h2>
+ {% if app.debug %}Yes{% else %}No{% endif %}