Skip to content

Commit

Permalink
Setting up for sync with live site. Extract Disqus and Analytics keys…
Browse files Browse the repository at this point in the history
… to app/config/config.php
  • Loading branch information
stidges committed Feb 26, 2014
1 parent fa5ca0b commit 39a35ea
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
18 changes: 2 additions & 16 deletions app/Tricks/Services/Navigation/Builder.php
Expand Up @@ -54,9 +54,8 @@ public function make($url, $type = 'menu')
$isActive = $hasActive = true;
}

if ($this->maySeeItem($item)) {
$html .= $this->getNavigationItem($item, $isActive);
}

$html .= $this->getNavigationItem($item, $isActive);
}

return $html;
Expand Down Expand Up @@ -128,17 +127,4 @@ protected function wrapAnchor($anchor, $isActive)

return '<li' . $class . '>' . $anchor . '</li>';
}

/**
* Returns whether the given item should be visible to the user.
*
* @param array $item
* @return bool
*/
protected function maySeeItem(array $item)
{
if ( ! isset($item['logged_in'])) return true;

return $item['logged_in'] && $this->auth->check();
}
}
3 changes: 3 additions & 0 deletions app/config/config.php
Expand Up @@ -7,6 +7,9 @@
'version' => '1.0.0',
'version_date' => 'February 19, 2014',

'analytics_property_id' => 'UA-XXXX-Y',
'disqus_shortname' => 'Your Disqus shortname here',

// Admin email (the notifications are sent to this email, also see the mail.php config for the "From" address)
'admin_email' => '',

Expand Down
3 changes: 3 additions & 0 deletions app/views/home/about.blade.php
Expand Up @@ -16,6 +16,9 @@
<div class="col-md-6">
<h2>Who?</h2>
<p>Laravel Tricks website was created by <a target="_blank" href="http://twitter.com/stidges">Stidges</a> and <a target="_blank" href="http://twitter.com/msurguy">Maks Surguy</a> in November 2013</p>

<h3>Want the source?</h3>
The source of this website is available on <a target="_blank" href="https://github.com/CodepadME/laravel-tricks" title="Get the source of this site">Github</a>.
</div>
</div>
<div class="row">
Expand Down
6 changes: 3 additions & 3 deletions app/views/layouts/main.blade.php
Expand Up @@ -16,7 +16,7 @@
<meta name="description" content="@yield('description')">
<meta name="author" content="Stidges, @stidges and Maks Surguy, @msurguy">
<title>@yield('title') | Laravel-Tricks.com</title>
<link rel="stylesheet" href="{{ URL::asset('css/laratricks.min.3.css') }}">
<link rel="stylesheet" href="{{ URL::asset('css/laratricks.min.4.css') }}">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
@yield('styles')
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
Expand All @@ -40,15 +40,15 @@
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-XXXX-Y', 'auto');
ga('create', '{{ Config::get("config.analytics_property_id") }}', 'auto');
ga('send', 'pageview');
</script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
@yield('scripts')
<script type="text/javascript">
var disqus_shortname = 'YOUR DISQUS SHORTNAME HERE';
var disqus_shortname = '{{ Config::get("config.disqus_shortname") }}';
(function(){var e=document.createElement("script");e.async=true;e.type="text/javascript";e.src="//"+disqus_shortname+".disqus.com/count.js";(document.getElementsByTagName("HEAD")[0]||document.getElementsByTagName("BODY")[0]).appendChild(e)})()
</script>
</body>
Expand Down
9 changes: 8 additions & 1 deletion app/views/partials/footer.blade.php
@@ -1,5 +1,12 @@
<div id="footer">
<div class="container">
<p class="text-muted credit">Website built with <a href="http://laravel.com">Laravel</a> by <a target="_blank" href="http://twitter.com/stidges">Stidges</a> &amp; <a target="_blank" href="http://twitter.com/msurguy">Maks Surguy</a> | <a href="{{ url('about') }}">About</a> <a target="_blank" href="http://twitter.com/laraveltricks"><i class="fa fa-twitter fa-lg pull-right"></i></a></p>
<p class="text-muted credit">Website built with <a href="http://laravel.com">Laravel</a> by <a target="_blank" href="http://twitter.com/stidges">Stidges</a> &amp; <a target="_blank" href="http://twitter.com/msurguy">Maks Surguy</a> | <a href="{{ url('about') }}">About</a>
<span class="pull-right">
<a target="_blank" href="http://twitter.com/laraveltricks" title="Follow updates"><i class="fa fa-twitter fa-lg"></i></a>
|
<a target="_blank" href="https://github.com/CodepadME/laravel-tricks" title="Get the source of this site"><i class="fa fa-github fa-lg"></i></a>
</span>
</p>

</div>
</div>
1 change: 1 addition & 0 deletions public/css/laratricks.css
Expand Up @@ -262,6 +262,7 @@ h2.title-between {
.trick-card-timeago {
display: block;
color: #999;
padding-bottom: 5px;
}

.trick-card-stat-block {
Expand Down
2 changes: 1 addition & 1 deletion public/css/laratricks.min.css

Large diffs are not rendered by default.

0 comments on commit 39a35ea

Please sign in to comment.