[+] Добавлен шаблонизатор твиг и роутинг под него
This commit is contained in:
1 parent
69243e97f1
commit
4e8ea1514e
14 files changed
+395
-18
No files matched your search
@@ -0,0 +1,9 @@
|
||||
{% extends 'layout.twig' %}
|
||||
|
||||
|
||||
|
||||
{% block title %}Главная страница{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
тут текст главной страницы
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,28 @@
|
||||
<!doctype html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css">
|
||||
<title>{% block title %}Тестовый заголовок{% endblock %}</title>
|
||||
<style>
|
||||
main > .container {
|
||||
margin-top: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
{{ include('parts/navbar/navbar.twig', {'navbarItems': navbarItems}) }}
|
||||
<div class="container">
|
||||
<div class="row justify-content-md-center">
|
||||
<div class="col-md">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{{ include('parts/footer.twig') }}
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<footer class="py-3 my-4">
|
||||
<ul class="nav justify-content-center border-bottom pb-3 mb-3">
|
||||
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Home</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Features</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">Pricing</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">FAQs</a></li>
|
||||
<li class="nav-item"><a href="#" class="nav-link px-2 text-muted">About</a></li>
|
||||
</ul>
|
||||
<p class="text-center text-muted">Дичь всякую творим ночью...</p> <p class="text-center text-muted">© 2022 Delta Project</p>
|
||||
</footer>
|
||||
@@ -0,0 +1,18 @@
|
||||
<nav class="navbar navbar-expand-md navbar-dark bg-dark" aria-label="Fourth navbar example">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Delta Framework</a>
|
||||
<button class="navbar-toggler collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample04" aria-controls="navbarsExample04" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
|
||||
<div class="navbar-collapse collapse" id="navbarsExample04" style="">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-md-0">
|
||||
{% for item in navbarItems %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {% if item.active %}active{% endif %}" aria-current="page" href="{{ item.url }}">{{ item.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -0,0 +1,8 @@
|
||||
{% extends 'layout.twig' %}
|
||||
|
||||
{% block title %}тестинг{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
User id: {{ userId }}<br>
|
||||
<pre>{{ res }}</pre>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user