Skip to content

Instantly share code, notes, and snippets.

@jbalthis
Created April 30, 2014 19:58
Show Gist options
  • Save jbalthis/5071e21648c9362a8293 to your computer and use it in GitHub Desktop.
Save jbalthis/5071e21648c9362a8293 to your computer and use it in GitHub Desktop.
An example of including external css stylesheets as well as local styles in a Twig template
{# An example of including external css stylesheets as well as local styles in a Twig template #}
{# Incorporates bootstrap, jquery, and jquery-ui stylesheets #}
{# Also illustrates how to have a dynamic title inserted into each page by Twig #}
<head>
{% block head %}
<meta charset="UTF-8" />
{% block head_style %}
{% stylesheets
'css/bootstrap.css'
'css/jquery-ui.css'
'css/styles.css'
filter='yui_css'
%}
<link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
{% endstylesheets %}
<style type="text/css">
.numbers{
text-align: right !important;
}
</style>
{% endblock head_style %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% block title %}{% endblock title %}</title>
<link rel="shortcut icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
{% block head_scripts %}
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
{% endblock head_scripts %}
{% endblock head %}
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment