Skip to content

Commit

Permalink
fix: added missing maintenance mode in Twig template
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Jul 8, 2024
1 parent af74c8c commit 73f19bd
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 28 deletions.
4 changes: 2 additions & 2 deletions phpmyfaq/assets/templates/admin/login.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<main>
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="col-lg-6">
<div class="card shadow-lg border-1 rounded-lg mt-5">
<div class="card-header">
<h3 class="text-center font-weight-light my-4">phpMyFAQ Login</h3>

Expand Down
47 changes: 30 additions & 17 deletions phpmyfaq/assets/templates/default/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<link href="{{ currentPageUrl }}" rel="canonical">
</head>
<body class="pmf-page-wrapper" dir="{{ dir }}">

<nav class="p-3 text-bg-dark border-bottom">
<div class="container">
<div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
Expand All @@ -32,11 +33,13 @@
</a>

<ul class="nav col-12 col-lg-auto me-lg-auto mb-2 justify-content-center mb-md-0">
{% for item in topNavigation %}
<li class="pmf-nav-link ">
<a class="pmf-nav-link {{ item['active'] }}" href="{{ item['link'] }}">{{ item['name'] }}</a>
</li>
{% endfor %}
{% if not isMaintenanceMode %}
{% for item in topNavigation %}
<li class="pmf-nav-link ">
<a class="pmf-nav-link {{ item['active'] }}" href="{{ item['link'] }}">{{ item['name'] }}</a>
</li>
{% endfor %}
{% endif %}
</ul>

<div class="dropdown text-end">
Expand Down Expand Up @@ -67,6 +70,7 @@
</nav>

<!-- SEARCH -->
{% if not isMaintenanceMode %}
<div class="container my-5">
<div class="row height d-flex justify-content-center align-items-center">
<div class="col-md-8">
Expand All @@ -86,6 +90,7 @@
</div>
</div>
</div>
{% endif %}

<!-- BREADCRUMB -->
{% if showBreadcrumb %}
Expand All @@ -97,12 +102,17 @@
<!-- MAIN CONTENT -->
<section class="my-3" id="wrapper">
<div class="container">
{% if not isMaintenanceMode %}
{% block content %}{% endblock %}
{% else %}
We're currently in maintenance mode. Please come back later.
{% endif %}
</div>
</section>

<footer class="pt-4 text-bg-dark">
<div class="container">
{% if not isMaintenanceMode %}
<div class="row">
<div class="col-md-8 mb-md-0 mb-4">
<h5 class="footer-heading">{{ msgTagCloudHeader }}</h5>
Expand All @@ -119,6 +129,7 @@
</div>
</div>
</div>
{% endif %}
<div class="w-100">
<div class="container">
<div class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
Expand All @@ -129,20 +140,22 @@
</p>

<ul class="nav col-md-6 justify-content-end w-100">
{% for item in footerNavigation %}
{% if not isMaintenanceMode %}
{% for item in footerNavigation %}
<li class="nav-item">
<a class="pmf-nav-link-footer {{ item['active'] }}" href="{{ item['link'] }}">{{ item['name'] }}</a>
</li>
{% endfor %}
{% if isPrivacyLinkEnabled %}
<li class="nav-item">
<a class="pmf-nav-link-footer {{ item['active'] }}" href="{{ item['link'] }}">{{ item['name'] }}</a>
<a class="pmf-nav-link-footer" target="_blank" href="{{ urlPrivacyLink }}">{{ msgPrivacyNote }}</a>
</li>
{% endfor %}
{% if isPrivacyLinkEnabled %}
<li class="nav-item">
<a class="pmf-nav-link-footer" target="_blank" href="{{ urlPrivacyLink }}">{{ msgPrivacyNote }}</a>
</li>
{% endif %}
{% if isCookieConsentEnabled %}
<li class="nav-item">
<a id="showCookieConsent" class="pmf-nav-link-footer" href="#">{{ cookiePreferences }}</a>
</li>
{% endif %}
{% if isCookieConsentEnabled %}
<li class="nav-item">
<a id="showCookieConsent" class="pmf-nav-link-footer" href="#">{{ cookiePreferences }}</a>
</li>
{% endif %}
{% endif %}
</ul>
</div>
Expand Down
4 changes: 2 additions & 2 deletions phpmyfaq/assets/templates/default/login.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<main>
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-5">
<div class="card shadow-lg border-0 rounded-lg mt-5">
<div class="col-lg-6">
<div class="card shadow-lg border-1 rounded-lg mt-5">
<div class="card-header">
<h3 class="text-center font-weight-light my-4">phpMyFAQ Login</h3>
</div>
Expand Down
7 changes: 0 additions & 7 deletions phpmyfaq/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -472,13 +472,6 @@
$indexSet = 'index.html';
}

//
// phpMyFAQ installation is in maintenance mode
//
if ($faqConfig->get('main.maintenanceMode')) {
$indexSet = 'maintenance.page.html';
}

$categoryRelation = new Relation($faqConfig, $category);

$categoryHelper = new HelperCategory();
Expand Down

0 comments on commit 73f19bd

Please sign in to comment.