Skip to content

Commit

Permalink
Add SEO pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tvlooy committed Nov 14, 2023
1 parent ec9e17a commit b0e820c
Show file tree
Hide file tree
Showing 7 changed files with 201 additions and 1 deletion.
14 changes: 13 additions & 1 deletion config/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,16 @@ cookie:
path: /cookie
defaults:
_controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
template: 'Static/cookiePolicy.html.twig'
template: 'Static/cookiePolicy.html.twig'

ecofriendly:
path: /eco-friendly
defaults:
_controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
template: 'Static/ecofriendly.html.twig'

top10gifts:
path: /top-10-gifts
defaults:
_controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController::templateAction
template: 'Static/top10gifts.html.twig'
72 changes: 72 additions & 0 deletions templates/Static/ecofriendly.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% extends "base.html.twig" %}

{% block metadata %}
{{ parent() }}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9463520136816719" crossorigin="anonymous"></script>
{% endblock %}

{% block main %}
<div class="box">
{{ 'static-ecofriendly.main'|trans|raw }}
</div>

{% if geoCountry() == 'DE' %}
<a href="https://www.ebay.de/?mkcid=1&mkrid=707-53477-19255-0&siteid=77&campid=5339020780&customid=&toolid=10001&mkevt=1"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset('/ebay/all.png')) }}" width="100%">">
</a><br>
{% elseif geoCountry() == 'FR' %}
<a href="https://www.ebay.fr/?mkcid=1&mkrid=709-53476-19255-0&siteid=71&campid=5339020780&customid=&toolid=10001&mkevt=1"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset('/ebay/all.png')) }}" width="100%">">
</a><br>
{% elseif geoCountry() == 'ES' %}
<a href="https://www.ebay.es/?mkcid=1&mkrid=1185-53479-19255-0&siteid=186&campid=5339020780&customid=&toolid=10001&mkevt=1"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset('/ebay/all.png')) }}" width="100%">">
</a><br>
{% else %}
{% set banner = random(2) %}
{% if banner == 0 %}
{% set banner_url = 'https://www.ebay.com/b/Home-Garden/11700/bn_1853126?mkcid=1&mkrid=711-53200-19255-0&siteid=0&campid=5339020780&customid=&toolid=10001&mkevt=1' %}
{% set banner_img = '/ebay/home_garden.png' %}
{% elseif banner == 1 %}
{% set banner_url = 'https://www.ebay.com/b/Electronics/bn_7000259124?mkcid=1&mkrid=711-53200-19255-0&siteid=0&campid=5339020780&customid=&toolid=10001&mkevt=1' %}
{% set banner_img = '/ebay/tech.png' %}
{% else %}
{% set banner_url = 'https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=Sneakers&_sacat=0[…]55-0&siteid=0&campid=5339020780&customid=&toolid=10001&mkevt=1' %}
{% set banner_img = '/ebay/sneakers.png' %}
{% endif %}
<a href="{{ banner_url }}"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset(banner_img)) }}" width="100%">
</a><br>
{% endif %}
<br><br>

{% if geoCountry() in ["BE", "NL"] %}
<div class="row text-center">
<div class="col mb-2">
<a href="https://kersthits.lnk.to/playlist" rel="noopener noreferrer" target="_blank">
<img src="{{ absolute_url(asset('/sony2021.jpg')) }}" width="100%">
</a>
</div>
</div>
{% endif %}
<div class="row text-center">
<div class="col mb-2">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9463520136816719"
crossorigin="anonymous"></script>
<!-- Horizontal banner -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9463520136816719"
data-ad-slot="7244544166"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
{% endblock %}
5 changes: 5 additions & 0 deletions templates/Static/faq.html.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{% extends "base.html.twig" %}

{% block metadata %}
{{ parent() }}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9463520136816719" crossorigin="anonymous"></script>
{% endblock %}

{% block metadata %}

Check failure on line 8 in templates/Static/faq.html.twig

View workflow job for this annotation

GitHub Actions / test

The block 'metadata' has already been defined line 3.
<script type="application/ld+json">
{
Expand Down
72 changes: 72 additions & 0 deletions templates/Static/top10gifts.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% extends "base.html.twig" %}

{% block metadata %}
{{ parent() }}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9463520136816719" crossorigin="anonymous"></script>
{% endblock %}

{% block main %}
<div class="box">
{{ 'static-top10gifts.main'|trans|raw }}
</div>

{% if geoCountry() == 'DE' %}
<a href="https://www.ebay.de/?mkcid=1&mkrid=707-53477-19255-0&siteid=77&campid=5339020780&customid=&toolid=10001&mkevt=1"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset('/ebay/all.png')) }}" width="100%">">
</a><br>
{% elseif geoCountry() == 'FR' %}
<a href="https://www.ebay.fr/?mkcid=1&mkrid=709-53476-19255-0&siteid=71&campid=5339020780&customid=&toolid=10001&mkevt=1"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset('/ebay/all.png')) }}" width="100%">">
</a><br>
{% elseif geoCountry() == 'ES' %}
<a href="https://www.ebay.es/?mkcid=1&mkrid=1185-53479-19255-0&siteid=186&campid=5339020780&customid=&toolid=10001&mkevt=1"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset('/ebay/all.png')) }}" width="100%">">
</a><br>
{% else %}
{% set banner = random(2) %}
{% if banner == 0 %}
{% set banner_url = 'https://www.ebay.com/b/Home-Garden/11700/bn_1853126?mkcid=1&mkrid=711-53200-19255-0&siteid=0&campid=5339020780&customid=&toolid=10001&mkevt=1' %}
{% set banner_img = '/ebay/home_garden.png' %}
{% elseif banner == 1 %}
{% set banner_url = 'https://www.ebay.com/b/Electronics/bn_7000259124?mkcid=1&mkrid=711-53200-19255-0&siteid=0&campid=5339020780&customid=&toolid=10001&mkevt=1' %}
{% set banner_img = '/ebay/tech.png' %}
{% else %}
{% set banner_url = 'https://www.ebay.com/sch/i.html?_from=R40&_trksid=m570.l1313&_nkw=Sneakers&_sacat=0[…]55-0&siteid=0&campid=5339020780&customid=&toolid=10001&mkevt=1' %}
{% set banner_img = '/ebay/sneakers.png' %}
{% endif %}
<a href="{{ banner_url }}"
target="_blank" rel="noopener noreferrer">
<img src="{{ absolute_url(asset(banner_img)) }}" width="100%">
</a><br>
{% endif %}
<br><br>

{% if geoCountry() in ["BE", "NL"] %}
<div class="row text-center">
<div class="col mb-2">
<a href="https://kersthits.lnk.to/playlist" rel="noopener noreferrer" target="_blank">
<img src="{{ absolute_url(asset('/sony2021.jpg')) }}" width="100%">
</a>
</div>
</div>
{% endif %}
<div class="row text-center">
<div class="col mb-2">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9463520136816719"
crossorigin="anonymous"></script>
<!-- Horizontal banner -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9463520136816719"
data-ad-slot="7244544166"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
{% endblock %}
2 changes: 2 additions & 0 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
<div class="legal-links">
<a href="{{ path('privacy') }}">{{ 'base.privacy_policy'|trans }}</a>
<a href="{{ path('cookie') }}">{{ 'base.cookie_policy'|trans }}</a>
<a href="{{ path('ecofriendly') }}">{{ 'base.ecofriendly'|trans }}</a>
<a href="{{ path('top10gifts') }}">{{ 'base.top10gifts'|trans }}</a>
{# <a href="{{ path('bugbounty') }}">{{ 'base.bug_bounty'|trans }}</a> #}
</div>
</div>
Expand Down
18 changes: 18 additions & 0 deletions translations/messages.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ base:
need_help: <a href="%FAQ%" target="_blank" rel="noopener noreferrer">Need help? Got questions? Read the FAQ!</a>
privacy_policy: Privacy Policy
cookie_policy: Cookie Policy
ecofriendly: ECO Friendly
top10gifts: Top 10 Gifts
bug_bounty: Bug Bounty

# Form/{PartyType,UpdatePartyDetailsType}
Expand Down Expand Up @@ -164,6 +166,22 @@ wishlist-show_all:
title: All Secret Santa Wishlists
back: Back to manage page

# Static/ecofriendly.html.twig
static-ecofriendly:
main: >
<h1>ECO friendly</h1>
<p>wip</p>
# Static/top10gifts.html.twig
static-top10gifts:
main: >
<h1>Top 10 gifts</h1>
<p>wip</p>
# Static/faq.html.twig
static-faq:
title: Frequently Asked Questions
Expand Down
19 changes: 19 additions & 0 deletions translations/messages.nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ base:
need_help: <a href="%FAQ%" target="_blank" rel="noopener noreferrer">Hulp nodig? Vragen? Lees de FAQ!</a>
privacy_policy: Privacy Policy
cookie_policy: Cookie Policy
ecofriendly: ECO Vriendelijk
top10gifts: Top 10 Geschenken
bug_bounty: Bug Bounty

# Form/{PartyType,UpdatePartyDetailsType}
Expand Down Expand Up @@ -754,6 +756,23 @@ form-contact:
# suggestions: ?
# other: ?

# Static/ecofriendly.html.twig
static-ecofriendly:
main: >
<h1>ECO vriendelijk</h1>
<p>wip</p>
# Static/top10gifts.html.twig
static-top10gifts:
main: >
<h1>Top 10 geschenken</h1>
<p>wip</p>
# Static/faq.html.twig
static-contact:
title: Contacteer ons
Expand Down

0 comments on commit b0e820c

Please sign in to comment.