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

Commit

Permalink
Merge pull request #465 from gianarb/feature/twitter-widget
Browse files Browse the repository at this point in the history
Widget Twitter account @zfmodules
  • Loading branch information
localheinz committed Mar 26, 2015
2 parents 80e336d + c519618 commit 5888957
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
9 changes: 9 additions & 0 deletions module/Application/view/application/index/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@
</div>
</div>
</div>
<div class="block">
<h4><strong>Twitter</strong></h4>
<hr>
<div class="row">
<div class="col-md-12">
<?php echo $this->twitterWidget(); ?>
</div>
</div>
</div>
<?php echo $this->newUsers(); ?>
</div>
</div>
2 changes: 2 additions & 0 deletions module/Application/view/layout/layout.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<?php $this->headLink()->appendStylesheet($this->basePath('css/style.css?201502241620')); ?>
<?php $this->headLink()->appendAlternate($this->url('feed'), 'application/rss+xml', 'RSS Feed for ZF2 Modules'); ?>
<?php echo $this->headLink(); ?>

<?php echo $this->headScript(); ?>
</head>
<body>
<aside class="fork-me-ribbon">
Expand Down
1 change: 1 addition & 0 deletions module/ZfModule/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
'repository' => Helper\Repository::class,
'moduleDescription' => Helper\ModuleDescription::class,
'composerView' => Helper\ComposerView::class,
'twitterWidget' => Helper\TwitterWidget::class,
],
],
'service_manager' => [
Expand Down
16 changes: 16 additions & 0 deletions module/ZfModule/src/ZfModule/View/Helper/TwitterWidget.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace ZfModule\View\Helper;

use Zend\View\Helper\AbstractHelper;

class TwitterWidget extends AbstractHelper
{
/**
* @return string
*/
public function __invoke()
{
return $this->getView()->render('zf-module/helper/twitter-widget-view.phtml');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<a href="https://twitter.com/zfmodules" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @zfmodules</a>
<?php $this->headScript()->appendFile("/js/twitter-widget.js", "application/javascript");?>
1 change: 1 addition & 0 deletions public/js/twitter-widget.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5888957

Please sign in to comment.