Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[2474] Convert base templates into Jinja templates
- Loading branch information
Showing
4 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% block doctype %}<!DOCTYPE html>{% endblock %} | ||
{% block htmltag %}<html lang="en-gb">{% endblock %} | ||
{% block headtag %}<head>{% endblock %} | ||
{% block meta %} | ||
<meta charset="utf-8" /> | ||
{% endblock %} | ||
<title>{% if title %}{{title}} - {% endif %}CKAN</title> | ||
{% block links %} | ||
<link rel="shortcut icon" href="/base/images/ckan.ico" /> | ||
{% endblock %} | ||
{% block styles %} | ||
<link rel="stylesheet/less" href="/base/less/main.less" /> | ||
<script src="/base/test/vendor/less.js"></script> | ||
{% endblock %} | ||
</head> | ||
{% block bodytag %}<body>{% endblock %} | ||
{% block page %}{% endblock %} | ||
{% block scripts %}{% endblock %} | ||
</body> | ||
</html> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<footer class="site-footer"> | ||
<div class="container"> | ||
<nav class="footer-links row-fluid"> | ||
<ul class="unstyled row-fluid"> | ||
<li><a href="#">Terms and Conditions</a></li> | ||
<li><a href="#">Accessibility</a></li> | ||
<li><a href="#">Code of conduct</a></li> | ||
<li><a href="#">Moderation policy</a></li> | ||
<li><a href="#">FAQ</a></li> | ||
<li><a href="#">Privacy</a></li> | ||
<li><a href="#">Contact us</a></li> | ||
<li><a href="#">Consultation</a></li> | ||
</ul> | ||
</nav> | ||
<div class="attribution"> | ||
<p><strong>Powered by</strong> <a href="">CityData</a> from <a href="">CKAN</a></p> | ||
<p><small>Maps powered by Leaflet, map data © OpenStreetMap contributors, CC-BY-SA, map imagery © CloudMade</small></p> | ||
</div> | ||
</div> | ||
</footer> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<header class="masthead"> | ||
<div class="container"> | ||
<hgroup> | ||
<a class="logo" href="{{ h.url('home') }}"><img width="64" src="{{ h.url_for_static(g.site_logo) }}" alt="{{ g.site_title }} Logo" title="{{ g.site_title }} Logo" /></a> | ||
<h1><a href="{{ h.url('home') }}">{{ g.site_title }}</a></h1> | ||
<p>{{ g.site_description }}</p> | ||
</hgroup> | ||
<div class="account" py:if="c.userobj"> | ||
<a href="{{ h.url_for(controller='user',action='me') }}" class="image"> | ||
{{ h.gravatar((c.userobj.email_hash if c and c.userobj else ''),size=25) }} | ||
</a> | ||
<span class="links"> | ||
<a href="{{ h.url_for(controller='user',action='me') }}">{{ c.user }}</a> | ||
<a class="logout" href="${h.url_for('/user/_logout')}">Log out</a> | ||
</span> | ||
</div> | ||
<nav class="account" py:if="not c.userobj"> | ||
<ul class="unstyled"> | ||
{{ h.build_nav_main(('login', _('Login')),('register', _('Register'))) }} | ||
</ul> | ||
</nav> | ||
<nav> | ||
<ul class="unstyled"> | ||
{{ h.build_nav_main(('search', _('Search')),('default_group', _('Groups')), ('add dataset', _('Add Dataset')), ('about', _('About'))) }} | ||
</ul> | ||
</nav> | ||
</div> | ||
</header> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{% extends "base.jinja.html" %} | ||
|
||
{% block page %} | ||
{% block header %} | ||
{% include "header.jinja.html" %} | ||
{% endblock %} | ||
{% block content %} | ||
<div role="main"> | ||
<div class="container"> | ||
{% block toolbar %} | ||
<div class="toolbar"> | ||
{% block breadcrumb %}{% endblock %} | ||
{% block actions %}{% endblock %} | ||
</div> | ||
{% endblock %} | ||
{% block primary %} | ||
<div class="primary"> | ||
{% block primary_content %}{% endblock %} | ||
</div> | ||
{% endblock %} | ||
{% block secondary %} | ||
<aside class="secondary"> | ||
{% block secondary_content %}{% endblock %} | ||
</aside> | ||
{% endblock %} | ||
</div> | ||
</div> | ||
{% endblock %} | ||
{% block footer %} | ||
{% include "footer.jinja.html" %} | ||
{% endblock %} | ||
{% endblock %} |