game branch
This commit is contained in:
parent
9121047d33
commit
4ed71e2d9f
@ -16,5 +16,5 @@ return [
|
||||
Symfony\UX\Chartjs\ChartjsBundle::class => ['all' => true],
|
||||
Symfony\UX\React\ReactBundle::class => ['all' => true],
|
||||
Presta\SitemapBundle\PrestaSitemapBundle::class => ['all' => true],
|
||||
Fourbis\CmsBundle\FourbisCmsBundle::class => ['all' => true],
|
||||
// Fourbis\CmsBundle\FourbisCmsBundle::class => ['all' => true],
|
||||
];
|
||||
|
@ -5,6 +5,7 @@ controllers:
|
||||
kernel:
|
||||
resource: ../src/Kernel.php
|
||||
type: annotation
|
||||
fourbis_cms:
|
||||
resource: "@FourbisCmsBundle/src/Controller/"
|
||||
type: annotation
|
||||
|
||||
#fourbis_cms:
|
||||
# resource: "@FourbisCmsBundle/src/Controller/"
|
||||
# type: annotation
|
@ -26,72 +26,8 @@ class HomeController extends BaseController
|
||||
public function index(RequestStack $requestStack): Response
|
||||
{
|
||||
|
||||
$posts = $this->entityManager->getRepository(Post::class)->findAll();
|
||||
return $this->render('home/index.html.twig', [
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
private function getAdvertisementNewsUpdates(string $baseUrl, string $locale): array
|
||||
{
|
||||
return $this->entityManager->getRepository(Post::class)->createQueryBuilder('p')
|
||||
->select('p.uuid AS post_uuid', 'pt.uuid AS translation_uuid', 'pt.title', 'pt.description', 'p.publishedAt', 'pt.content', 'pt.url', "CONCAT(:baseUrl, '/', :locale, pt.fullUrl) AS absoluteUrl, pt.locale")
|
||||
->leftJoin('p.translations', 'pt')
|
||||
->where('pt.fullUrl LIKE :url')
|
||||
->andWhere('pt.locale = :locale')
|
||||
->setParameter('url', '%/blog/%')
|
||||
->setParameter('baseUrl', $baseUrl)
|
||||
->setParameter('locale', $locale)
|
||||
->orderBy('p.publishedAt', 'DESC')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
|
||||
private function generateRssFeed(array $posts, string $baseUrl, string $locale, Request $request): \SimpleXMLElement
|
||||
{
|
||||
$rssFeed = new \SimpleXMLElement("<?xml version='1.0' encoding='UTF-8'?><rss xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:media=\"http://search.yahoo.com/mrss/\" xmlns:atom=\"http://www.w3.org/2005/Atom\" version='2.0'></rss>");
|
||||
$channel = $rssFeed->addChild('channel');
|
||||
$channel->addChild('title', '4BIS Innovation Blog Articles');
|
||||
$channel->addChild('link', 'https://4bis.nl/' . $locale . '/blog');
|
||||
|
||||
$atomLink = $channel->addChild('link', '');
|
||||
$atomLink->addAttribute('href', $request->getUri());
|
||||
$atomLink->addAttribute('rel', 'self');
|
||||
$atomLink->addAttribute('type', 'application/rss+xml');
|
||||
|
||||
$channel->addChild('language', $locale);
|
||||
$currentYear = date('Y');
|
||||
$channel->addChild('copyright', "4bis.nl © $currentYear All rights reserved");
|
||||
$channel->addChild('description', '4bis.nl, software development and hosting partner | Maastricht, NL');
|
||||
|
||||
$image = $channel->addChild('image');
|
||||
$image->addChild('title', '4BIS Innovation Blog Articles');
|
||||
$image->addChild('url', 'https://cdn.4b.is/techlabs.4bis.co/cdn/4bis-nl/4bis-nl/2022-02-25/6218c42533d9b.4BIS%20Innovations_logo.png');
|
||||
$image->addChild('link', 'https://4bis.nl/' . $locale . '/');
|
||||
|
||||
foreach ($posts as $post) {
|
||||
$item = $channel->addChild('item');
|
||||
$item->addChild('title', htmlspecialchars(strip_tags($post['title'])));
|
||||
$item->addChild('link', htmlspecialchars($post['absoluteUrl']));
|
||||
|
||||
$atomLink = $item->addChild('atom:link', '');
|
||||
$atomLink->addAttribute('href', htmlspecialchars($post['absoluteUrl']));
|
||||
$atomLink->addAttribute('rel', 'standout');
|
||||
|
||||
$item->addChild('language', $locale);
|
||||
$item->addChild('translation', $post['translation_uuid']);
|
||||
|
||||
$guid = $item->addChild('guid', $post['post_uuid']);
|
||||
$guid->addAttribute('isPermaLink', 'false');
|
||||
|
||||
$item->addChild('description', htmlspecialchars(strip_tags($post['description'])));
|
||||
$item->addChild('content:encoded', htmlspecialchars(strip_tags($post['content'])));
|
||||
|
||||
$pubDateTime = new \DateTime($post['publishedAt']->format('Y-m-d H:i:s'), new \DateTimeZone('UTC'));
|
||||
$pubDateFormatted = $pubDateTime->format('D, d M Y H:i:s O');
|
||||
$item->addChild('pubDate', $pubDateFormatted);
|
||||
}
|
||||
|
||||
return $rssFeed;
|
||||
}
|
||||
}
|
||||
|
@ -1,56 +1,109 @@
|
||||
{% extends "layout.html.twig" %}
|
||||
|
||||
{% block page_title %}{% block title %}{% endblock %} {{ cms_setting('seo-site-title').title |raw }}{% endblock page_title %}
|
||||
|
||||
|
||||
{% block head_description %}
|
||||
{{- (page | default(null) ? page.translate().description :
|
||||
post | default(null) ? post.translate().description :
|
||||
category | default(null) ? category.translate().description) |striptags -}}
|
||||
{% block title %}
|
||||
Dev Project
|
||||
{% endblock %}
|
||||
|
||||
{% block meta %}
|
||||
{{ parent() }}
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="preconnect" href="https://cdn.4b.is" crossorigin>
|
||||
{% if not app.debug %}
|
||||
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin>
|
||||
<link rel="preconnect" href="https://www.google-analytics.com/" crossorigin>
|
||||
<link rel="preload" href="https://www.googletagmanager.com/gtm.js?id={{ cms_setting('gtm-code')['code'] |raw }}"
|
||||
crossorigin>
|
||||
{% endif %}
|
||||
{% block favicons %}
|
||||
<link href="assets/img/favicon.png" rel="icon">
|
||||
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
|
||||
{% endblock %}
|
||||
|
||||
{% block gtm_head_part %}
|
||||
{% block fonts %}
|
||||
<link href="https://fonts.gstatic.com" rel="preconnect">
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Nunito:300,300i,400,400i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i"
|
||||
rel="stylesheet">
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% block gtm_body_part %}
|
||||
{% block flash %}
|
||||
<div class="position-absolute" style="z-index: 999999">
|
||||
{# <div {{ react_component("Alert", {flashes: app.flashes}) }}></div>#}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block navbar %}
|
||||
{# {% include 'blocks/menu_test.html.twig' %} #}
|
||||
{{ cms_render('nav-bar') | default('') |raw }}
|
||||
{% block header_javascripts %}
|
||||
{% endblock %}
|
||||
|
||||
{% block default_head_javascripts %}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{% endblock default_head_javascripts %}
|
||||
|
||||
{% block head_javascripts %}
|
||||
{{ cms_render_save('head-javascripts') | default('') |raw }}
|
||||
{% endblock head_javascripts %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{{ encore_entry_link_tags("app") }}
|
||||
{% endblock %}
|
||||
|
||||
{% block above_footer %}
|
||||
<!-- above footer -->
|
||||
{{ cms_render_save('above-footer') | default('') |raw }}
|
||||
<!-- end above footer -->
|
||||
{% block header %}
|
||||
<header id="header" class="header fixed-top d-flex align-items-center">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<a href="{{ path("home_index") }}" class="logo d-flex flex-row align-items-center">
|
||||
<span class="d-none d-lg-block"> DEV</span>
|
||||
</a>
|
||||
<i class="bi bi-list toggle-sidebar-btn"></i>
|
||||
</div>
|
||||
{% block search_bar %}
|
||||
{# {% include 'widgets/search_bar.html.twig' %}#}
|
||||
{% endblock %}
|
||||
{% block footer_content %}
|
||||
{{ cms_render('footer') | default('') |raw }}
|
||||
|
||||
<nav class="header-nav ms-auto">
|
||||
<ul class="d-flex align-items-center">
|
||||
<li class="nav-item d-block d-lg-none">
|
||||
<a class="nav-link nav-icon search-bar-toggle " href="#">
|
||||
<i class="bi bi-search"></i>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% block notifications %}
|
||||
{# {% include 'widgets/notifications_widget.html.twig' %}#}
|
||||
{% endblock %}
|
||||
|
||||
{% block messages %}
|
||||
{# {% include 'widgets/messages_widget.html.twig' %}#}
|
||||
{% endblock %}
|
||||
|
||||
{% block profile %}
|
||||
{# {% include 'widgets/profile.html.twig' %}#}
|
||||
{% endblock %}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
||||
{% block sidebar %}
|
||||
{% include 'menu/sidebar.html.twig' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<main id="main" class="main">
|
||||
<div class="pagetitle">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h1>{% block page_title %}{% endblock %}</h1>
|
||||
<h6>{% block page_sub_title %}{% endblock %}</h6>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
{% block extra_header_options %}{% endblock %}
|
||||
</div>
|
||||
<div class="col-auto text-end">
|
||||
{% block buttons %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
<nav class="d-flex flex-row justify-content-between">
|
||||
<ol class="breadcrumb">
|
||||
{% block breadcrumbs %}{% endblock %}
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<section class="section dashboard">
|
||||
{% block content %}{% endblock %}
|
||||
</section>
|
||||
</main>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
||||
|
||||
{% block back_to_top %}
|
||||
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i
|
||||
class="bi bi-arrow-up-short"></i></a>
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ encore_entry_script_tags("app") }}
|
||||
{% endblock %}
|
@ -1,71 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if IE 8]> <html lang="{{ cms_locale() }}" class="ie8 no-js"> <![endif]-->
|
||||
<!--[if IE 9]> <html lang="{{ cms_locale() }}" class="ie9 no-js"> <![endif]-->
|
||||
<!--[if !IE]><!-->
|
||||
<html lang="{{ cms_locale() }}">
|
||||
<!--<![endif]-->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block page_title %}{% endblock page_title %}</title>
|
||||
{% block meta %}
|
||||
<link rel="shortcut icon" href="{{ cms_setting('branding-favicon')|default('')|raw }}">
|
||||
<link rel="icon" type="image/x-icon" href="{{ cms_setting('branding-favicon')|default('')|raw }}">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0">
|
||||
{% if block('head_description') %}
|
||||
<meta name="description" content="{% block head_description %}{% endblock %}" >
|
||||
{% endif %}
|
||||
{% endblock meta %}
|
||||
{% block meta_robots %}
|
||||
<meta name="robots" content="index,follow">
|
||||
{% endblock meta_robots %}
|
||||
<meta charset="utf-8">
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport">
|
||||
|
||||
{%- include '@cms_bundle/snippets/breadcrumbs.html.twig' -%}
|
||||
{% block stylesheets %}{% endblock stylesheets %}
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
<meta content="" name="description">
|
||||
<meta content="" name="keywords">
|
||||
<link rel="shortcut icon" href="{{ asset('/assets/Ill.favicon.affiliate-mngr_2021.png') }}">
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('/assets/Ill.favicon.affiliate-mngr_2021.png') }}">
|
||||
|
||||
{% block default_head_javascripts %}{% endblock default_head_javascripts %}
|
||||
{% block head_javascripts %}{% endblock head_javascripts %}
|
||||
{% block favicons %}{% endblock %}
|
||||
|
||||
{% block gtm_head_part %}{% endblock gtm_head_part %}
|
||||
{% block fonts %}{% endblock %}
|
||||
|
||||
{% block header_javascripts %}{% endblock %}
|
||||
{% block stylesheets %}{% endblock %}
|
||||
</head>
|
||||
{% block body %}
|
||||
<body id="page-top" class="{% block body_class %}{% endblock %}">
|
||||
{% block gtm_body_part %}{% endblock %}
|
||||
{% block nav %}
|
||||
{% block navbar %}{% endblock %}
|
||||
{% endblock %}
|
||||
{% block page_wrapper %}
|
||||
<div id="wrapper">
|
||||
{% block page_wrapper_content %}
|
||||
{% block content_wrapper %}
|
||||
<!-- Content Wrapper -->
|
||||
<div id="content-wrapper" class="d-flex flex-column">
|
||||
{% block content_wrapper_content %}
|
||||
<!-- Main Content -->
|
||||
{% block content_breadcrumbs %}{% endblock %}
|
||||
{% block main_content_body %}
|
||||
{% block main_content_title %}{% endblock main_content_title %}
|
||||
{% block main_content %}{% endblock main_content %}
|
||||
{% endblock %}
|
||||
|
||||
<!-- End of Main Content -->
|
||||
{% endblock content_wrapper_content %}
|
||||
</div>
|
||||
<!-- End of Content Wrapper -->
|
||||
{% endblock content_wrapper %}
|
||||
{% endblock page_wrapper_content %}
|
||||
</div>
|
||||
{% endblock page_wrapper %}
|
||||
<!-- bottom footer -->
|
||||
{% block above_footer %}{% endblock %}
|
||||
<body>
|
||||
{% block flash %}{% endblock %}
|
||||
|
||||
{% block footer_wrapper %}
|
||||
{% block footer_content %}{% endblock footer_content %}
|
||||
{% endblock footer_wrapper %}
|
||||
<!-- /bottom footer -->
|
||||
{% block default_footer_javascripts %}{% endblock default_footer_javascripts %}
|
||||
{% block footer_javascripts %}{% endblock footer_javascripts %}
|
||||
{% block header %}{% endblock %}
|
||||
|
||||
{% block sidebar %}{% endblock %}
|
||||
|
||||
{% block main %}{% endblock %}
|
||||
|
||||
{% block footer %}{% endblock %}
|
||||
|
||||
{% block back_to_top %}{% endblock %}
|
||||
|
||||
{% block javascripts %}{% endblock %}
|
||||
</body>
|
||||
{% endblock body %}
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user