aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorSimounet <contact@simounet.net>2016-06-06 20:59:20 +0200
committerSimounet <contact@simounet.net>2016-07-20 19:36:01 +0200
commit39f27d6370c5d280375b2e1f93de464ecf5f4f96 (patch)
tree9c38c41251ba552cc6b50a48389dc1216cab50bd /src
parent317fc6e684356b645ea1327c2631c7d5fc193ddd (diff)
downloadwallabag-39f27d6370c5d280375b2e1f93de464ecf5f4f96.tar.gz
wallabag-39f27d6370c5d280375b2e1f93de464ecf5f4f96.tar.zst
wallabag-39f27d6370c5d280375b2e1f93de464ecf5f4f96.zip
Handling socials links into a config file
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Controller/FooterController.php26
-rw-r--r--src/Wallabag/CoreBundle/Controller/StaticController.php3
-rw-r--r--src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php1
-rw-r--r--src/Wallabag/CoreBundle/Resources/config/parameters.yml12
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig10
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig10
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig41
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig42
8 files changed, 93 insertions, 52 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/FooterController.php b/src/Wallabag/CoreBundle/Controller/FooterController.php
new file mode 100644
index 00000000..de809332
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Controller/FooterController.php
@@ -0,0 +1,26 @@
1<?php
2
3namespace Wallabag\CoreBundle\Controller;
4
5use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
7class FooterController extends Controller
8{
9 /**
10 * Display the footer
11 *
12 * @return \Symfony\Component\HttpFoundation\Response
13 */
14 public function indexAction()
15 {
16 $addonsUrl = $this->container->getParameter('addons_url');
17 $socialsUrl = $this->container->getParameter('socials_url');
18 return $this->render(
19 'WallabagCoreBundle::footer.html.twig',
20 [
21 'addonsUrl' => $addonsUrl,
22 'socialsUrl' => $socialsUrl
23 ]
24 );
25 }
26}
diff --git a/src/Wallabag/CoreBundle/Controller/StaticController.php b/src/Wallabag/CoreBundle/Controller/StaticController.php
index b41302f8..f5fcabd8 100644
--- a/src/Wallabag/CoreBundle/Controller/StaticController.php
+++ b/src/Wallabag/CoreBundle/Controller/StaticController.php
@@ -12,9 +12,10 @@ class StaticController extends Controller
12 */ 12 */
13 public function howtoAction() 13 public function howtoAction()
14 { 14 {
15 $addonsUrl = $this->container->getParameter('addons_url');
15 return $this->render( 16 return $this->render(
16 'WallabagCoreBundle:Static:howto.html.twig', 17 'WallabagCoreBundle:Static:howto.html.twig',
17 [] 18 ['addonsUrl' => $addonsUrl]
18 ); 19 );
19 } 20 }
20 21
diff --git a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
index 84599f0d..7d08b73b 100644
--- a/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
+++ b/src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
@@ -25,6 +25,7 @@ class WallabagCoreExtension extends Extension
25 25
26 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); 26 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
27 $loader->load('services.yml'); 27 $loader->load('services.yml');
28 $loader->load('parameters.yml');
28 } 29 }
29 30
30 public function getAlias() 31 public function getAlias()
diff --git a/src/Wallabag/CoreBundle/Resources/config/parameters.yml b/src/Wallabag/CoreBundle/Resources/config/parameters.yml
new file mode 100644
index 00000000..43297261
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/config/parameters.yml
@@ -0,0 +1,12 @@
1parameters:
2 addons_url:
3 firefox: https://addons.mozilla.org/firefox/addon/wallabag-v2/
4 chrome: https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj
5 f_droid: https://f-droid.org/app/fr.gaulupeau.apps.InThePoche
6 google_play: https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche
7 ios: https://itunes.apple.com/app/wallabag/id828331015?mt=8
8 windows: https://www.microsoft.com/store/apps/wallabag/9nblggh11646
9 socials_url:
10 twitter: https://twitter.com/wallabagapp
11 google_plus: https://plus.google.com/+WallabagOrg/posts
12 facebook: https://facebook.com/Wallabag
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig
index eab092c7..b529a0ac 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Static/howto.html.twig
@@ -11,14 +11,14 @@
11 </ul> 11 </ul>
12 <h3>{{ 'howto.top_menu.browser_addons'|trans }}</h3> 12 <h3>{{ 'howto.top_menu.browser_addons'|trans }}</h3>
13 <ul> 13 <ul>
14 <li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li> 14 <li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
15 <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li> 15 <li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
16 </ul> 16 </ul>
17 <h3>{{ 'howto.top_menu.mobile_apps'|trans }}</h3> 17 <h3>{{ 'howto.top_menu.mobile_apps'|trans }}</h3>
18 <ul> 18 <ul>
19 <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> 19 <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>
20 <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li> 20 <li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
21 <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> 21 <li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
22 </ul> 22 </ul>
23 <h3>{{ 'howto.top_menu.bookmarklet'|trans }}</h3> 23 <h3>{{ 'howto.top_menu.bookmarklet'|trans }}</h3>
24 <p> 24 <p>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig
index 4354a6b7..6a177d6b 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Static/howto.html.twig
@@ -18,17 +18,17 @@
18 <div class="col s12"> 18 <div class="col s12">
19 <h5>{{ 'howto.top_menu.browser_addons'|trans }}</h5> 19 <h5>{{ 'howto.top_menu.browser_addons'|trans }}</h5>
20 <ul> 20 <ul>
21 <li><a href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li> 21 <li><a href="{{ addonsUrl.firefox }}" target="_blank">{{ 'howto.browser_addons.firefox'|trans }}</a></li>
22 <li><a href="https://chrome.google.com/webstore/detail/wallabag/bepdcjnnkglfjehplaogpoonpffbdcdj" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li> 22 <li><a href="{{ addonsUrl.chrome }}" target="_blank">{{ 'howto.browser_addons.chrome'|trans }}</a></li>
23 </ul> 23 </ul>
24 </div> 24 </div>
25 25
26 <div class="col s12"> 26 <div class="col s12">
27 <h5>{{ 'howto.top_menu.mobile_apps'|trans }}</h5> 27 <h5>{{ 'howto.top_menu.mobile_apps'|trans }}</h5>
28 <ul> 28 <ul>
29 <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> 29 <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>
30 <li>iOS: <a href="https://itunes.apple.com/app/wallabag/id828331015?mt=8" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li> 30 <li>iOS: <a href="{{ addonsUrl.ios }}" target="_blank">{{ 'howto.mobile_apps.ios'|trans }}</a></li>
31 <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> 31 <li>Windows Phone: <a href="{{ addonsUrl.windows }}" target="_blank">{{ 'howto.mobile_apps.windows'|trans }}</a></li>
32 </ul> 32 </ul>
33 </div> 33 </div>
34 34
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig
new file mode 100644
index 00000000..7cb19966
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/footer.html.twig
@@ -0,0 +1,41 @@
1<footer class="page-footer cyan darken-2">
2 <div class="container">
3 <div class="row">
4 <div class="col l6 s12">
5 <h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
6 <p class="grey-text text-lighten-4">
7 <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.google_play }}" title="Android">
8 <span class="icon-android"></span>
9 </a>
10 <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.ios }}" title="iOS">
11 <span class="icon-apple"></span>
12 </a>
13 <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.firefox }}" title="Firefox">
14 <span class="icon-firefox"></span>
15 </a>
16 <a target="_blank" class="grey-text text-lighten-3" href="{{ addonsUrl.chrome }}" title="Chrome">
17 <span class="icon-chrome"></span>
18 </a>
19 </p>
20 </div>
21 <div class="col l4 offset-l2 s12">
22 <h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
23 <a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.twitter }}" title="Twitter">
24 <span class="icon-twitter"></span>
25 </a>
26 <a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.google_plus }}" title="Google+">
27 <span class="icon-google-plus2"></span>
28 </a>
29 <a target="_blank" class="grey-text text-lighten-3" href="{{ socialsUrl.facebook }}" title="Facebook">
30 <span class="icon-facebook2"></span>
31 </a>
32 </div>
33 </div>
34 </div>
35 <div class="footer-copyright">
36 <div class="container">
37 <p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
38 <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
39 </div>
40 </div>
41</footer>
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
index 33d9e08f..a5c16792 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/layout.html.twig
@@ -122,45 +122,5 @@
122{% endblock %} 122{% endblock %}
123 123
124{% block footer %} 124{% block footer %}
125 <footer class="page-footer cyan darken-2"> 125 {{ render(controller("WallabagCoreBundle:Footer:index")) }}
126 <div class="container">
127 <div class="row">
128 <div class="col l6 s12">
129 <h5 class="white-text">{{ 'footer.wallabag.elsewhere'|trans }}</h5>
130 <p class="grey-text text-lighten-4">
131 <a target="_blank" class="grey-text text-lighten-3" href="https://play.google.com/store/apps/details?id=fr.gaulupeau.apps.InThePoche" title="Android">
132 <span class="icon-android"></span>
133 </a>
134 <a target="_blank" class="grey-text text-lighten-3" href="https://itunes.apple.com/app/id828331015" title="iOS">
135 <span class="icon-apple"></span>
136 </a>
137 <a target="_blank" class="grey-text text-lighten-3" href="https://addons.mozilla.org/firefox/addon/wallabag-v2/" title="Firefox">
138 <span class="icon-firefox"></span>
139 </a>
140 <a target="_blank" class="grey-text text-lighten-3" href="https://chrome.google.com/webstore/detail/wallabagger/gbmgphmejlcoihgedabhgjdkcahacjlj" title="Chrome">
141 <span class="icon-chrome"></span>
142 </a>
143 </p>
144 </div>
145 <div class="col l4 offset-l2 s12">
146 <h5 class="white-text">{{ 'footer.wallabag.social'|trans }}</h5>
147 <a target="_blank" class="grey-text text-lighten-3" href="https://twitter.com/wallabagapp" title="Twitter">
148 <span class="icon-twitter"></span>
149 </a>
150 <a target="_blank" class="grey-text text-lighten-3" href="https://plus.google.com/+WallabagOrg/posts" title="Google+">
151 <span class="icon-google-plus2"></span>
152 </a>
153 <a target="_blank" class="grey-text text-lighten-3" href="https://facebook.com/Wallabag" title="Facebook">
154 <span class="icon-facebook2"></span>
155 </a>
156 </div>
157 </div>
158 </div>
159 <div class="footer-copyright">
160 <div class="container">
161 <p>{{ 'footer.wallabag.powered_by'|trans }} <a target="_blank" href="https://wallabag.org" class="grey-text text-lighten-4">wallabag</a></p>
162 <a class="grey-text text-lighten-4 right" href="{{ path('about') }}">{{ 'footer.wallabag.about'|trans }}</a>
163 </div>
164 </div>
165 </footer>
166{% endblock %} 126{% endblock %}