Christoffer Niska avatar Christoffer Niska committed 1eab13f

Added social networking elements to the demo.

Comments (0)

Files changed (2)

demo/less/styles.less

 	}
 }
 
+.navbar {
+	.add-this {
+	    background: #EEE;
+	    margin: 6px 0;
+		padding: 6px 12px;
+		.border-radius(16px);
+	}
+}
+
 .subnav {
 	border: 1px solid #E5E5E5;
 	font-size: 12px;

demo/protected/views/layouts/main.php

 
 <body id="top">
 
+<div id="fb-root"></div>
+<script type="text/javascript">
+	(function(d, s, id) {
+		var js, fjs = d.getElementsByTagName(s)[0];
+		if (d.getElementById(id)) return;
+		js = d.createElement(s); js.id = id;
+		js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
+		fjs.parentNode.insertBefore(js, fjs);
+	}(document, 'script', 'facebook-jssdk'));
+</script>
+
 <?php $this->widget('BootNavbar',array(
 	'brand'=>CHtml::encode(Yii::app()->name),
 	'collapse'=>true,
 				array('label'=>'Setup', 'url'=>array('site/setup')),
 			),
 		),
+		'
+		<div class="add-this pull-right">
+			<!-- AddThis Button BEGIN -->
+			<div class="addthis_toolbox addthis_default_style">
+			<a class="addthis_button_facebook"></a>
+			<a class="addthis_button_twitter"></a>
+			<a class="addthis_button_google"></a>
+			<a class="addthis_button_email"></a>
+			<a class="addthis_button_compact"></a>
+			<a class="addthis_counter addthis_bubble_style"></a>
+			</div>
+			<!-- AddThis Button END -->
+		</div>'
 	),
 )); ?>
 
 
 	<?php echo $content; ?>
 
+	<section id="comments">
+
+		<h2>Comments</h2>
+
+		<div class="fb-comments" data-href="<?php echo Yii::app()->request->requestUri; ?>" data-num-posts="10" data-width="470"></div>
+
+		<a class="top" href="#top">Back to top &uarr;</a>
+
+	</section>
+
 	<hr />
 
 	<footer>
 
 </div>
 
+<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4f362fc83fc39768"></script>
+
 </body>
 </html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.