PageRenderTime 70ms CodeModel.GetById 4ms RepoModel.GetById 0ms app.codeStats 0ms

/demo/protected/views/layouts/main.php

https://bitbucket.org/Crisu83/yii-bootstrap/
PHP | 194 lines | 174 code | 18 blank | 2 comment | 5 complexity | 1525597eba87d632a371138204fc87d7 MD5 | raw file
Possible License(s): BSD-2-Clause, Apache-2.0, BSD-3-Clause, GPL-3.0, LGPL-2.1
  1. <!doctype html>
  2. <html>
  3. <head prefix="og: http://ogp.me/ns# <?php echo Yii::app()->fb->appNamespace; ?>: http://ogp.me/ns/apps/<?php echo Yii::app()->fb->appNamespace; ?>#">
  4. <?php Yii::app()->controller->widget('ext.seo.widgets.SeoHead', array(
  5. 'defaultDescription'=>Yii::app()->params['appDescription'],
  6. 'httpEquivs'=>array('Content-Type'=>'text/html; charset=utf-8', 'Content-Language'=>'en-US'),
  7. 'title'=>array('class'=>'ext.seo.widgets.SeoTitle', 'separator'=>' :: '),
  8. )); ?>
  9. <link rel="shortcut icon" href="<?php echo Yii::app()->request->baseUrl; ?>/favicon.ico">
  10. <?php Yii::app()->bootstrap->registerAllCss(); ?>
  11. <?php Yii::app()->bootstrap->registerCoreScripts(); ?>
  12. <?php Yii::app()->clientScript->registerCssFile(Yii::app()->request->baseUrl.'/css/styles.css'); ?>
  13. <!--[if lt IE 9]>
  14. <script type="text/javascript" src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
  15. <![endif]-->
  16. <script type="text/javascript">
  17. var _gaq = _gaq || [];
  18. _gaq.push(['_setAccount', 'UA-29040179-1']);
  19. _gaq.push(['_trackPageview']);
  20. (function() {
  21. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  22. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  23. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  24. })();
  25. </script>
  26. </head>
  27. <body id="top">
  28. <div id="fb-root"></div>
  29. <script>
  30. window.fbAsyncInit = function() {
  31. FB.init({
  32. appId : <?php echo Yii::app()->fb->appID; ?>, // App ID
  33. status : true, // check login status
  34. cookie : true, // enable cookies to allow the server to access the session
  35. xfbml : true // parse XFBML
  36. });
  37. // Additional initialization code here
  38. };
  39. // Load the SDK Asynchronously
  40. (function(d){
  41. var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
  42. js = d.createElement('script'); js.id = id; js.async = true;
  43. js.src = "//connect.facebook.net/en_US/all.js";
  44. d.getElementsByTagName('head')[0].appendChild(js);
  45. }(document));
  46. </script>
  47. <?php $this->widget('bootstrap.widgets.TbNavbar',array(
  48. 'type'=>'inverse',
  49. 'brand'=>CHtml::encode(Yii::app()->name),
  50. 'brandUrl'=>false,
  51. 'collapse'=>true,
  52. 'items'=>array(
  53. array(
  54. 'class'=>'bootstrap.widgets.TbMenu',
  55. 'items'=>array(
  56. array('label'=>'Docs', 'url'=>Yii::app()->homeUrl,
  57. 'active'=>Yii::app()->controller->id === 'site' && Yii::app()->controller->action->id === 'index'),
  58. array('label'=>'Setup', 'url'=>array('site/setup')),
  59. ),
  60. 'htmlOptions'=>array('class'=>'pull-left'),
  61. ),
  62. '<div class="add-this pull-right">
  63. <!-- AddThis Button BEGIN -->
  64. <div class="addthis_toolbox addthis_default_style">
  65. <a class="addthis_button_facebook"></a>
  66. <a class="addthis_button_twitter"></a>
  67. <a class="addthis_button_google"></a>
  68. <a class="addthis_button_email"></a>
  69. <a class="addthis_button_compact"></a>
  70. <a class="addthis_counter addthis_bubble_style"></a>
  71. </div>
  72. <!-- AddThis Button END -->
  73. </div>',
  74. array(
  75. 'class'=>'bootstrap.widgets.TbMenu',
  76. 'items'=>array(
  77. array('label'=>'Bootstrap Home', 'url'=>'http://www.getbootstrap.com', 'linkOptions'=>array('target'=>'_blank')),
  78. array('label'=>'Fork me on Bitbucket', 'url'=>'http://www.bitbucket.org/Crisu83/yii-bootstrap', 'linkOptions'=>array('target'=>'_blank')),
  79. array('label'=>'Follow me on Twitter', 'url'=>'http://www.twitter.com/Crisu83', 'linkOptions'=>array('target'=>'_blank')),
  80. ),
  81. 'htmlOptions'=>array('class'=>'pull-right'),
  82. ),
  83. ),
  84. )); ?>
  85. <div class="container">
  86. <div class="row">
  87. <div class="span9">
  88. <?php $this->beginWidget('bootstrap.widgets.TbHeroUnit', array(
  89. 'heading'=>Yii::app()->name,
  90. )); ?>
  91. <p>
  92. Bringing together the <?php echo CHtml::link('Yii PHP framework', 'http://www.yiiframework.com'); ?> and
  93. <?php echo CHtml::link('Twitter Bootstrap', 'http://twitter.github.com/bootstrap/'); ?>.
  94. </p>
  95. <p>
  96. <?php echo CHtml::link('Yii-Bootstrap', 'http://www.yiiframework.com/extension/bootstrap/'); ?>
  97. is an extension for Yii that provides a wide range of widgets that allow developers to easily use Bootstrap with Yii.
  98. All widgets have been developed following Yii's conventions and work seamlessly together with Bootstrap and its jQuery plugins.
  99. </p>
  100. <?php $this->endWidget(); ?>
  101. <?php if (!empty($this->breadcrumbs)):?>
  102. <?php $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
  103. 'links'=>$this->breadcrumbs,
  104. )); ?>
  105. <?php endif?>
  106. </div>
  107. <div class="span3">
  108. <div class="donate">
  109. <h3>Support development</h3>
  110. <p>Would you like to say thanks for the time and effort put on this project? Consider donating.</p>
  111. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  112. <input type="hidden" name="cmd" value="_s-xclick">
  113. <input type="hidden" name="hosted_button_id" value="YYJJSWSMN62WU">
  114. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  115. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  116. </form>
  117. <hr />
  118. <p>Would you like to support the development of this project on a monthly basis? Consider subscribing.</p>
  119. <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
  120. <input type="hidden" name="cmd" value="_s-xclick">
  121. <input type="hidden" name="hosted_button_id" value="7UFJKA5YAJR8G">
  122. <table>
  123. <tr><td><input type="hidden" name="on0" value="Donate"></td></tr><tr><td><select name="os0">
  124. <option value="Option 1">5.00 EUR (monthly)</option>
  125. <option value="Option 2">10.00 EUR (monthly)</option>
  126. <option value="Option 3">20.00 EUR (monthly)</option>
  127. </select> </td></tr>
  128. </table>
  129. <input type="hidden" name="currency_code" value="EUR">
  130. <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_subscribe_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
  131. <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
  132. </form>
  133. </div>
  134. </div>
  135. </div>
  136. <?php echo $content; ?>
  137. <hr />
  138. <footer>
  139. <div class="row">
  140. <div class="span6">
  141. <p class="powered">
  142. Powered by <?php echo CHtml::link('Yii', 'http://www.yiiframework.com', array('target'=>'_blank')); ?> /
  143. <?php echo CHtml::link('Yii-Bootstrap', 'http://www.yiiframework.com/extension/bootstrap', array('target'=>'_blank')); ?> /
  144. <?php echo CHtml::link('Yii-SEO', 'http://www.yiiframework.com/extension/seo', array('target'=>'_blank')); ?> /
  145. <?php echo CHtml::link('Bootstrap', 'http://twitter.github.com/bootstrap', array('target'=>'_blank')); ?> /
  146. <?php echo CHtml::link('jQuery', 'http://www.jquery.com', array('target'=>'_blank')); ?> /
  147. <?php echo CHtml::link('LESS', 'http://www.lesscss.org', array('target'=>'_blank')); ?>
  148. </p>
  149. </div>
  150. <div class="span6">
  151. <p class="copy">
  152. &copy; Christoffer Niska <?php echo date('Y'); ?>
  153. </p>
  154. </div>
  155. </div>
  156. </footer>
  157. </div>
  158. <?php Yii::app()->clientScript->registerScriptFile('http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f362fc83fc39768', CClientScript::POS_END); ?>
  159. </body>
  160. </html>