Skip to content

Instantly share code, notes, and snippets.

@Im0rtality
Last active August 29, 2015 14:07
Show Gist options
  • Save Im0rtality/8e1ee1a99759981ebecd to your computer and use it in GitHub Desktop.
Save Im0rtality/8e1ee1a99759981ebecd to your computer and use it in GitHub Desktop.
Frontend 1/2 (HTML - the modern way)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-xs-12">
<h1>Hello, world!</h1>
...
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{% endblock %}</title>
{% block stylesheets %}{% stylesheets %}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
{% endstylesheets %}{% block stylesheets %}
</head>
<body>
<div class="container">
{% block content %}{% endblock %}
</div>
{% block javascripts %}{% javascripts %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
{% endjavascripts %}{% endblock %}
</body>
</html>
{% extends "::base.html.twig" %}
{% block title %}Hello world page{% endblock %}
{% block content %}
<div class="row">
<div class="col-xs-12">
<h1>Hello world!</h1>
</div>
</div>
{% endblock %}
{% extends "::base.html.twig" %}
{% block title %}Users{% endblock %}
{% block content %}
<div class="row">
{% for user in users %}
<div class="col-xs-2">
<img src="{{ user.image | make_full_url }}"
alt="Avatar for {{ user.username }}"
class="img-circle">
<p>{{ user.name }} {{ user.lastname }}</p>
</div>
{% endfor %}
</div>
{% endblock %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment