Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Commit 5888957

Browse files
committed
Merge pull request #465 from gianarb/feature/twitter-widget
Widget Twitter account @zfmodules
2 parents 80e336d + c519618 commit 5888957

File tree

6 files changed

+31
-0
lines changed

6 files changed

+31
-0
lines changed

module/Application/view/application/index/index.phtml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@
5555
</div>
5656
</div>
5757
</div>
58+
<div class="block">
59+
<h4><strong>Twitter</strong></h4>
60+
<hr>
61+
<div class="row">
62+
<div class="col-md-12">
63+
<?php echo $this->twitterWidget(); ?>
64+
</div>
65+
</div>
66+
</div>
5867
<?php echo $this->newUsers(); ?>
5968
</div>
6069
</div>

module/Application/view/layout/layout.phtml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<?php $this->headLink()->appendStylesheet($this->basePath('css/style.css?201502241620')); ?>
1515
<?php $this->headLink()->appendAlternate($this->url('feed'), 'application/rss+xml', 'RSS Feed for ZF2 Modules'); ?>
1616
<?php echo $this->headLink(); ?>
17+
18+
<?php echo $this->headScript(); ?>
1719
</head>
1820
<body>
1921
<aside class="fork-me-ribbon">

module/ZfModule/config/module.config.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
'repository' => Helper\Repository::class,
9999
'moduleDescription' => Helper\ModuleDescription::class,
100100
'composerView' => Helper\ComposerView::class,
101+
'twitterWidget' => Helper\TwitterWidget::class,
101102
],
102103
],
103104
'service_manager' => [
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace ZfModule\View\Helper;
4+
5+
use Zend\View\Helper\AbstractHelper;
6+
7+
class TwitterWidget extends AbstractHelper
8+
{
9+
/**
10+
* @return string
11+
*/
12+
public function __invoke()
13+
{
14+
return $this->getView()->render('zf-module/helper/twitter-widget-view.phtml');
15+
}
16+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<a href="https://twitter.com/zfmodules" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @zfmodules</a>
2+
<?php $this->headScript()->appendFile("/js/twitter-widget.js", "application/javascript");?>

public/js/twitter-widget.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)