Skip to content

Commit ec38ac1

Browse files
Merged in basic_themeing (pull request nerdapplabs#3)
added skeleton theme; using assetic bundle - http://symfony.com/doc/current/assetic/asset_management.html
2 parents db311c3 + 9856b86 commit ec38ac1

File tree

8 files changed

+1092
-60
lines changed

8 files changed

+1092
-60
lines changed

app/AppKernel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function registerBundles()
2828
new FOS\OAuthServerBundle\FOSOAuthServerBundle(),
2929
new JMS\SerializerBundle\JMSSerializerBundle(),
3030
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
31+
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
3132
// ...
3233
new AppBundle\AppBundle(),
3334
new ApiBundle\ApiBundle()

app/Resources/views/base.html.twig

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4+
<!-- Basic Page Needs
5+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
46
<meta charset="UTF-8" />
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<title>{% block title %}Welcome!{% endblock %}</title>
78
<meta name="description" content="">
89
<meta name="author" content="">
9-
<title>{% block title %}Welcome!{% endblock %}</title>
10-
{% block stylesheets %}{% endblock %}
10+
11+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
12+
<!-- Mobile Specific Metas
13+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
14+
<meta name="viewport" content="width=device-width, initial-scale=1">
15+
16+
<!-- FONT
17+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
18+
<link href="//fonts.googleapis.com/css?family=Raleway:400,300,600" rel="stylesheet" type="text/css">
19+
20+
<!-- CSS
21+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
22+
{% block stylesheets %}
23+
{% stylesheets '@ApiBundle/Resources/public/skeleton/css/*' filter='cssrewrite' %}
24+
<link rel="stylesheet" href="{{ asset_url }}" />
25+
{% endstylesheets %}
26+
{% endblock %}
27+
<!-- Favicon
28+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
1129
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
1230
</head>
1331
<body>
14-
{% include "nav.html.twig" %}
15-
{% block body %}{% endblock %}
32+
33+
34+
<!-- Primary Page Layout
35+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
36+
{% include "nav.html.twig" %}
37+
<div class="container">
38+
<div class="row">
39+
{% block body %}{% endblock %}
40+
</div>
41+
</div>
42+
43+
<!-- End Document
44+
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
45+
1646
{% block javascripts %}{% endblock %}
1747
</body>
1848
</html>

app/Resources/views/nav.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% block nav %}
2-
<nav>
2+
<nav class="row">
33
<div>
44
<div>
55
<a href="/">Nerd Project</a>

app/config/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ framework:
3030
fragments: ~
3131
http_method_override: true
3232

33+
# Assetic Configuration
34+
assetic:
35+
debug: '%kernel.debug%'
36+
use_controller: '%kernel.debug%'
37+
filters:
38+
cssrewrite: ~
39+
3340
# Twig Configuration
3441
twig:
3542
debug: "%kernel.debug%"

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"nelmio/api-doc-bundle": "^2.13",
2727
"friendsofsymfony/user-bundle": "^1.3",
2828
"friendsofsymfony/oauth-server-bundle": "^1.5",
29-
"adoy/oauth2": "dev-master"
29+
"adoy/oauth2": "dev-master",
30+
"symfony/assetic-bundle": "^2.8"
3031
},
3132
"require-dev": {
3233
"sensio/generator-bundle": "~3.0",

0 commit comments

Comments
 (0)