Created
June 19, 2015 02:48
-
-
Save arielmagbanua/43372f1a181049d0cfed to your computer and use it in GitHub Desktop.
Flexible Laravel Blade Template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<title>@yield('title', 'default title')</title> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width"> | |
@yield('meta') | |
<!-- stylesheets --> | |
{{ HTML::style('//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/css/bootstrap.min.css') }} | |
{{ HTML::style('//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css') }} | |
@yield('styles') | |
{{ HTML::style('public/css/app.css') }} | |
{{ HTML::script('//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js') }} | |
<script> | |
var URL = { | |
'base' : '{{ URL::to('/') }}', | |
'current' : '{{ URL::current() }}', | |
'full' : '{{ URL::full() }}' | |
}; | |
</script> | |
</head> | |
<body> | |
@yield('navbar.prepend') | |
@include('app.navbar') | |
@yield('navbar.append') | |
<div id="main"> | |
<div class="container"> | |
@yield('main.prepend') | |
<div id="content"> | |
@yield('content') | |
</div><!-- ./ #content --> | |
<div id="sidebar"> | |
@yield('sidebar') | |
</div><!-- ./ #sidebar --> | |
@yield('main.append') | |
</div> | |
</div><!-- ./ #main --> | |
@yield('footer.prepend') | |
@include('app.footer') | |
@yield('footer.append') | |
<!-- scripts --> | |
{{ HTML::script('//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js') }} | |
{{ HTML::script('//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.3/js/bootstrap.min.js') }} | |
@yield('scripts') | |
{{ HTML::script('public/js/app.js') }} | |
<script> | |
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; | |
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; | |
g.src='//www.google-analytics.com/ga.js'; | |
s.parentNode.insertBefore(g,s)}(document,'script')); | |
</script> | |
</body> | |
</html> | |
- See more at: http://laravelsnippets.com/snippets/flexible-master-layout#sthash.HAeKryb4.dpuf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment