-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea3133c
commit c197f09
Showing
5 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Hello world! | ||
|
||
How are things going? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace App\Controller; | ||
|
||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | ||
use Symfony\Component\HttpFoundation\Response; | ||
|
||
class PostController extends AbstractController | ||
{ | ||
const DATA_FOLDER = __DIR__ . '/../../posts'; | ||
|
||
public function hello_world(): Response | ||
{ | ||
$content = file_get_contents(self::DATA_FOLDER . '/hello-world.md'); | ||
|
||
return $this->render('post.html.twig', [ | ||
'title' => 'Hello World!', | ||
'description' => 'This is my first post.', | ||
'content' => $content, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{ app.request.locale }}"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="view-transition" content="same-origin"> | ||
<title>{{ title }}</title> | ||
<meta name="description" content="{{ description }}"> | ||
<link rel="icon" href="/favicon.ico"> | ||
<link rel="stylesheet" href="{{ asset('vendor/bootstrap/dist/css/bootstrap.min.css') }}"> | ||
<link rel="stylesheet" href="{{ asset('styles/app.css') }}"> | ||
<script src="{{ asset('js/pages/apply_settings.js') }}"></script> | ||
</head> | ||
<body> | ||
{% include 'partial/nav.html.twig' %} | ||
<div class="the-content container"> | ||
<div class="row"> | ||
{% apply markdown_to_html %} | ||
{{ content | raw }} | ||
{% endapply %} | ||
</div> | ||
</div> | ||
{% include 'partial/footer.html.twig' %} | ||
<script type="module" src="{{ asset('vendor/bootstrap/dist/js/bootstrap.bundle.min.js') }}"></script> | ||
</body> |