Skip to content

Commit bdd7550

Browse files
committed
refactor: added 404 page and index Twig templates
1 parent c1f774c commit bdd7550

File tree

5 files changed

+169
-3
lines changed

5 files changed

+169
-3
lines changed

phpmyfaq/assets/templates/404.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% extends 'index.twig' %}
2+
3+
{% block content %}
4+
<h1>404: Page not found!</h1>
5+
{% endblock %}
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ metaLanguage }}">
3+
<head>
4+
<meta charset="utf-8">
5+
6+
<title>{{ title }}</title>
7+
<base href="{{ baseHref }}">
8+
9+
<meta content="{{ metaDescription }}" name="description">
10+
<meta content="{{ metaKeywords }}" name="keywords">
11+
<meta content="{{ metaPublisher }}" name="author">
12+
<meta content="width=device-width, initial-scale=1" name="viewport">
13+
<meta content="phpMyFAQ {{ phpmyfaqVersion }}" name="application-name">
14+
<meta content="{{ metaRobots }}" name="robots">
15+
<meta content="7 days" name="revisit-after">
16+
17+
{% if isDebugEnabled %}
18+
<link href="{{ baseHref }}assets/dist/debugMode.css" rel="stylesheet">
19+
{% endif %}
20+
21+
<link href="{{ baseHref }}assets/dist/styles.css" rel="stylesheet">
22+
23+
<link href="{{ baseHref }}assets/themes/{{ tplSetName }}/img/favicon.ico" rel="shortcut icon">
24+
<link href="{{ baseHref }}assets/themes/{{ tplSetName }}/img/apple-touch-icon.png" rel="apple-touch-icon">
25+
<link href="{{ currentPageUrl }}" rel="canonical">
26+
</head>
27+
<body class="pmf-page-wrapper" dir="{{ dir }}">
28+
<nav class="p-3 text-bg-dark border-bottom">
29+
<div class="container">
30+
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
31+
<a
32+
href="{{ faqHome }}"
33+
id="phpmyfaq-logo"
34+
title="{{ header }}"
35+
class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"
36+
>
37+
<img height="40" src="{{ baseHref }}assets/themes/{{ tplSetName }}/img/logo-transparent.svg"
38+
alt="phpMyFAQ">
39+
</a>
40+
41+
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
42+
<li class="pmf-nav-link {{ activeAllCategories }}">{{ allCategories }}</li>
43+
<li class="pmf-nav-link {{ activeAddContent }}">{{ msgAddContent }}</li>
44+
<li class="pmf-nav-link {{ activeAddQuestion }}">{{ msgQuestion }}</li>
45+
<li class="pmf-nav-link {{ activeOpenQuestions }}">{{ msgOpenQuestions }}</li>
46+
</ul>
47+
48+
<div class="dropdown text-end">
49+
<a
50+
href="#"
51+
class="d-block text-decoration-none dropdown-toggle text-white"
52+
data-bs-toggle="dropdown"
53+
aria-expanded="false"
54+
>
55+
{{ msgLoginUser }}
56+
</a>
57+
<ul class="dropdown-menu dropdown-menu-dark text-small">
58+
{% if userIsNotLoggedIn %}
59+
<li>{{ msgRegisterUser }}</li>
60+
<li>{{ msgLoginUser }}</li>
61+
{% else %}
62+
<li>{{ msgUserControlDropDown }}</li>
63+
<li>{{ msgBookmarks }}</li>
64+
<li>{{ msgAdmin }}</li>
65+
<li>{{ msgUserRemoval }}</li>
66+
<li>
67+
<hr class="dropdown-divider">
68+
</li>
69+
<li>{{ msgLogoutUser }}</li>
70+
{% endif %}
71+
</ul>
72+
</div>
73+
</div>
74+
</div>
75+
</nav>
76+
77+
<!-- SEARCH -->
78+
<div class="container my-5">
79+
<div class="row height d-flex justify-content-center align-items-center">
80+
<div class="col-md-8">
81+
<div class="search">
82+
<form action="{{ formActionUrl }}" id="search" method="post" role="search">
83+
<i class="bi bi-search"></i>
84+
<input
85+
autocomplete="off"
86+
type="text"
87+
class="form-control form-control-lg"
88+
id="pmf-search-autocomplete"
89+
name="search"
90+
placeholder="{{ searchBox }} ..."
91+
maxlength="255"
92+
value="{{ searchTerm }}"
93+
/>
94+
<button type="submit" class="btn btn-info btn-lg">{{ searchBox }}</button>
95+
</form>
96+
</div>
97+
<div>
98+
<small class="form-text text-muted">
99+
<a class="help" href="?action=search">{{ msgAdvancedSearch }}</a>
100+
</small>
101+
</div>
102+
</div>
103+
</div>
104+
</div>
105+
106+
<!-- BREADCRUMB -->
107+
{% if showBreadcrumb %}
108+
<section class="pmf-breadcrumbs">
109+
<div class="container">{{ breadcrumbHeadline }}</div>
110+
</section>
111+
{% endif %}
112+
113+
<!-- MAIN CONTENT -->
114+
<section class="my-3" id="wrapper">
115+
<div class="container">
116+
{% block content %}{% endblock %}
117+
</div>
118+
</section>
119+
120+
<footer class="pt-4 text-bg-dark">
121+
<div class="container">
122+
<div class="row">
123+
<div class="col-md-8 mb-md-0 mb-4">
124+
<h5 class="footer-heading">{{ writeTagCloudHeader }}</h5>
125+
<p class="card-text pmf-tag-cloud">{{ renderedTags | raw }}</p>
126+
</div>
127+
<div class="col-md-4 mb-md-0 mb-4">
128+
<h5 class="footer-heading">{{ languageBox }}</h5>
129+
<form accept-charset="utf-8" action="{{ renderUri }}" method="post" class="subscribe-form">
130+
<div class="form-group d-flex">
131+
{{ switchLanguages | raw }}
132+
<input name="action" type="hidden" value="">
133+
</div>
134+
</form>
135+
</div>
136+
</div>
137+
</div>
138+
<div class="w-100">
139+
<div class="container">
140+
<div class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
141+
<p class="col-md-6 mb-0 text-white">{{ copyright }}</p>
142+
143+
<ul class="nav col-md-6 justify-content-end w-100">
144+
<li class="nav-item">{{ faqOverview }}</li>
145+
<li class="nav-item">{{ showSitemap }}</li>
146+
<li class="nav-item">{{ msgGlossary }}</li>
147+
<li class="nav-item">{{ msgContact }}</li>
148+
<li class="nav-item">{{ privacyLink }}</li>
149+
<li class="nav-item">{{ cookiePreferences }}</li>
150+
</ul>
151+
</div>
152+
</div>
153+
</div>
154+
</footer>
155+
156+
{% if isCookieConsentEnabled %}
157+
<script src="./assets/dist/cookieConsent.js"></script>
158+
{% endif %}
159+
<script src="./assets/dist/frontend.js"></script>
160+
</body>
161+
</html>

phpmyfaq/assets/themes/default/templates/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
title="{{ header }}"
3535
class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"
3636
>
37-
<img alt="phpMyFAQ" src="{{ baseHref }}assets/themes/{{ tplSetName }}/img/logo.png" />
37+
<img height="40" src="{{ baseHref }}assets/themes/{{ tplSetName }}/img/logo-transparent.svg" alt="phpMyFAQ">
3838
</a>
3939

4040
<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">

phpmyfaq/assets/themes/default/templates/maintenance.page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
title="{{ header }}"
3636
class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"
3737
>
38-
<img alt="phpMyFAQ" src="{{ baseHref }}assets/themes/{{ tplSetName }}/img/logo.png" />
38+
<img height="40" src="{{ baseHref }}assets/themes/{{ tplSetName }}/img/logo-transparent.svg" alt="phpMyFAQ">
3939
</a>
4040

4141
<div class="dropdown align-items-end">

phpmyfaq/assets/themes/default/templates/new-user.page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
title="{{ header }}"
3636
class="d-flex align-items-center mb-2 mb-lg-0 text-dark text-decoration-none"
3737
>
38-
<img alt="phpMyFAQ" src="{{ baseHref }}assets/themes/{{ tplSetName }}/img/logo.png" />
38+
<img height="40" src="{{ baseHref }}assets/themes/{{ tplSetName }}/img/logo-transparent.svg" alt="phpMyFAQ">
3939
</a>
4040

4141
<div class="dropdown align-items-end">

0 commit comments

Comments
 (0)