mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-24 00:20:28 +00:00
Handling socials links into a config file
This commit is contained in:
parent
317fc6e684
commit
39f27d6370
8 changed files with 93 additions and 52 deletions
26
src/Wallabag/CoreBundle/Controller/FooterController.php
Normal file
26
src/Wallabag/CoreBundle/Controller/FooterController.php
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
||||
class FooterController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display the footer
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
$addonsUrl = $this->container->getParameter('addons_url');
|
||||
$socialsUrl = $this->container->getParameter('socials_url');
|
||||
return $this->render(
|
||||
'WallabagCoreBundle::footer.html.twig',
|
||||
[
|
||||
'addonsUrl' => $addonsUrl,
|
||||
'socialsUrl' => $socialsUrl
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
|
@ -12,9 +12,10 @@ class StaticController extends Controller
|
|||
*/
|
||||
public function howtoAction()
|
||||
{
|
||||
$addonsUrl = $this->container->getParameter('addons_url');
|
||||
return $this->render(
|
||||
'WallabagCoreBundle:Static:howto.html.twig',
|
||||
[]
|
||||
['addonsUrl' => $addonsUrl]
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ class WallabagCoreExtension extends Extension
|
|||
|
||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||
$loader->load('services.yml');
|
||||
$loader->load('parameters.yml');
|
||||
}
|
||||
|
||||
public function getAlias()
|
||||
|
|
12
src/Wallabag/CoreBundle/Resources/config/parameters.yml
Normal file
12
src/Wallabag/CoreBundle/Resources/config/parameters.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
parameters:
|
||||
addons_url:
|
||||
firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/
|
||||
chrome: https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj
|
||||
f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche
|
||||
google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche
|
||||
ios: https://itunes.apple.com/app/wallabag/id828331015?mt=8
|
||||
windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646
|
||||
socials_url:
|
||||
twitter: https://twitter.com/wallabagapp
|
||||
google_plus: https://plus.google.com/+WallabagOrg/posts
|
||||
facebook: https://facebook.com/Wallabag
|
|
@ -11,14 +11,14 @@
|
|||
</ul>
|
||||
<h3>{{ 'howto.top_menu.browser_addons'|trans }}</h3>
|
||||
<ul>
|
||||
<li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
|
||||
<li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
|
||||
<li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
|
||||
<li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
|
||||
</ul>
|
||||
<h3>{{ 'howto.top_menu.mobile_apps'|trans }}</h3>
|
||||
<ul>
|
||||
<li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
|
||||
<li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
|
||||
<li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
|
||||
<li>Android: <a href="{{ addonsUrl.f_droid }}" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="{{ addonsUrl.google_play }}" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
|
||||
<li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
|
||||
<li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
|
||||
</ul>
|
||||
<h3>{{ 'howto.top_menu.bookmarklet'|trans }}</h3>
|
||||
<p>
|
||||
|
|
|
@ -18,17 +18,17 @@
|
|||
<div class="col s12">
|
||||
<h5>{{ 'howto.top_menu.browser_addons'|trans }}</h5>
|
||||
<ul>
|
||||
<li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
|
||||
<li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
|
||||
<li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
|
||||
<li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<h5>{{ 'howto.top_menu.mobile_apps'|trans }}</h5>
|
||||
<ul>
|
||||
<li>Android: <a href="https://f-droid.org/app/fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
|
||||
<li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
|
||||
<li>Windows Phone: <a href="http://www.windowsphone.com/en-US/store/app/wallabag/d5226cf1-f422-4e00-996c-88e9c5233332" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
|
||||
<li>Android: <a href="{{ addonsUrl.f_droid }}" target="_blank">{{ 'howto.mobile_apps.android.via_f_droid'|trans }}</a> / <a href="{{ addonsUrl.google_play }}" target="_blank">{{ 'howto.mobile_apps.android.via_google_play'|trans }}</a></li>
|
||||
<li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
|
||||
<li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<footer class="page-footer cyan darken-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col l6 s12">
|
||||
<h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
|
||||
<p class="grey-text text-lighten-4">
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.google_play }}" title="Android">
|
||||
<span class="icon-android"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.ios }}" title="iOS">
|
||||
<span class="icon-apple"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.firefox }}" title="Firefox">
|
||||
<span class="icon-firefox"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.chrome }}" title="Chrome">
|
||||
<span class="icon-chrome"></span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col l4 offset-l2 s12">
|
||||
<h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.twitter }}" title="Twitter">
|
||||
<span class="icon-twitter"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.google_plus }}" title="Google+">
|
||||
<span class="icon-google-plus2"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.facebook }}" title="Facebook">
|
||||
<span class="icon-facebook2"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
<p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
|
||||
<a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
|
@ -122,45 +122,5 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
<footer class="page-footer cyan darken-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col l6 s12">
|
||||
<h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
|
||||
<p class="grey-text text-lighten-4">
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="Android">
|
||||
<span class="icon-android"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="https://itunes.apple.com/app/id828331015" title="iOS">
|
||||
<span class="icon-apple"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" title="Firefox">
|
||||
<span class="icon-firefox"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="https://chrome.google.com/webstore/detail/wallabagger/gbmgphmejlcoihgedabhgjdkcahacjlj" title="Chrome">
|
||||
<span class="icon-chrome"></span>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col l4 offset-l2 s12">
|
||||
<h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="https://twitter.com/wallabagapp" title="Twitter">
|
||||
<span class="icon-twitter"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="https://plus.google.com/+WallabagOrg/posts" title="Google+">
|
||||
<span class="icon-google-plus2"></span>
|
||||
</a>
|
||||
<a target="_blank" class="grey-text text-lighten-3" href="https://facebook.com/Wallabag" title="Facebook">
|
||||
<span class="icon-facebook2"></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer-copyright">
|
||||
<div class="container">
|
||||
<p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
|
||||
<a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{{ render(controller("WallabagCoreBundle:Footer:index")) }}
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue