1
0
mirror of https://github.com/github/choosealicense.com synced 2024-12-22 12:50:24 +01:00

Merge pull request #92 from github/better-templating

DRY up templating
This commit is contained in:
Phil Haack 2013-07-13 09:55:41 -07:00
commit 59bd13024d
6 changed files with 58 additions and 81 deletions

15
_includes/footer.html Normal file
View File

@ -0,0 +1,15 @@
<footer class="site-footer cf">
<nav>
<a href="/about/">About</a>
<a href="https://help.github.com/articles/github-terms-of-service">Terms of Service</a>
</nav>
<p>
Please consult a legal expert before adopting a software license for your project.<br>
This site is licensed under the <a href="http://creativecommons.org/licenses/by/3.0/">
Creative Commons Attribution 3.0 Unported License</a>.</p>
</p>
</footer>
</div><!-- /container -->
</body>
</html>

36
_includes/header.html Normal file
View File

@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<link href='/favicon.ico' rel='shortcut icon' type='image/x-icon'>
<link href='http://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link type="text/css" href="/css/application.css" media="screen" rel="stylesheet">
<link type="text/css" href="/css/jquery.qtip.css" media="screen" rel="stylesheet">
<script type="text/javascript" src="/javascripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/javascripts/annotations.js"></script>
<script type="text/javascript" src="/javascripts/app.js"></script>
<script type="text/javascript" src="/javascripts/jquery.qtip.min.js"></script>
<script type="text/javascript" src="/javascripts/modernizr.js"></script>
{% if page.layout == "license" %}
<script type="text/javascript" src="/javascripts/clipboard.js"></script>
<script type="text/javascript" src="/javascripts/ZeroClipboard.js"></script>
{% endif %}
<!--[if (gte IE 6)&(lte IE 8)]>
<script src='/javascripts/selectivizr-min.js' type='text/javascript'></script>
<![endif]-->
</head>
<body class="{{ page.layout }} {{ page.class }}">
<div class='container'>
{% if page.layout == "default" and page.hide_breadcrumbs != true %}
<ol class='breadcrumbs'>
<li>
<a href="/">Home</a>
</li>
</ol>
{% endif %}

View File

@ -1,38 +1,5 @@
<!DOCTYPE html> {% include header.html %}
<html lang='en'>
<head>
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<link href='../../../favicon.ico' rel='shortcut icon' type='image/x-icon'>
<link href='http://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link type="text/css" href="../../../css/application.css" media="screen" rel="stylesheet">
<link type="text/css" href="../../../css/jquery.qtip.css" media="screen" rel="stylesheet">
<script type="text/javascript" src="../../javascripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../javascripts/annotations.js"></script>
<script type="text/javascript" src="../../javascripts/app.js"></script>
<script type="text/javascript" src="../../javascripts/jquery.qtip.min.js"></script>
<script type="text/javascript" src="../../javascripts/modernizr.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src='../../../javascripts/selectivizr-min.js' type='text/javascript'></script>
<![endif]-->
</head>
<body class="{{ page.layout }} {{ page.class }}">
<div class='container'>
{{ content }} {{ content }}
<footer class="site-footer cf"> {% include footer.html %}
<nav>
<a href="/about/">About</a>
<a href="https://help.github.com/articles/github-terms-of-service">Terms of Service</a>
</nav>
<p>
Please consult a legal expert before adopting a software license for your project.<br>
This site is licensed under the <a href="http://creativecommons.org/licenses/by/3.0/">
Creative Commons Attribution 3.0 Unported License</a>.</p>
</p>
</footer>
</div>
</body>
</html>

View File

@ -1,31 +1,9 @@
<!DOCTYPE html> {% include header.html %}
<html lang='en'>
<head>
<title>{% if page.title %}{{ page.title }} - {% endif %}{{ site.title}}</title>
<meta charset='utf-8'>
<meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
<link href='../../../favicon.ico' rel='shortcut icon' type='image/x-icon'>
<link href='http://fonts.googleapis.com/css?family=Chivo:900' rel='stylesheet' type='text/css'>
<link type="text/css" href="../../../css/application.css" media="screen" rel="stylesheet">
<link type="text/css" href="../../css/jquery.qtip.css" media="screen" rel="stylesheet">
<script type="text/javascript" src="../../javascripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../javascripts/annotations.js"></script>
<script type="text/javascript" src="../../javascripts/app.js"></script>
<script type="text/javascript" src="../../javascripts/jquery.qtip.min.js"></script>
<script type="text/javascript" src="../../javascripts/clipboard.js"></script>
<script type="text/javascript" src="../../javascripts/ZeroClipboard.js"></script>
<script type="text/javascript" src="../../javascripts/modernizr.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src='../../../javascripts/selectivizr-min.js' type='text/javascript'></script>
<![endif]-->
</head>
<body class="{{ page.layout }}">
<div class='container'>
<ol class='breadcrumbs'> <ol class='breadcrumbs'>
<li> <li>
<a href="../../../">Home</a> / <a href="../">Licenses</a> <a href="/">Home</a> / <a href="/licenses/">Licenses</a>
</li> </li>
</ol> </ol>
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
@ -43,18 +21,4 @@
</div><!-- /cf --> </div><!-- /cf -->
<footer class="site-footer cf"> {% include footer.html %}
<nav>
<a href="/about/">About</a>
<a href="https://help.github.com/articles/github-terms-of-service">Terms of Service</a>
</nav>
<p>
Please consult a legal expert before adopting a software license for your project.<br>
This site is licensed under the <a href="http://creativecommons.org/licenses/by/3.0/">
Creative Commons Attribution 3.0 Unported License</a>.</p>
</p>
</footer>
</div><!-- /container -->
</body>
</html>

View File

@ -4,12 +4,6 @@ layout: default
permalink: /about/ permalink: /about/
--- ---
<ol class='breadcrumbs'>
<li>
<a href="../../../">Home</a>
</li>
</ol>
# What&#8217;s this about? # What&#8217;s this about?
We want to help developers choose a license for their source code. We want to help developers choose a license for their source code.

View File

@ -1,6 +1,7 @@
--- ---
layout: default layout: default
class: home class: home
hide_breadcrumbs: true
--- ---
<div id='home'> <div id='home'>
<h1>Choosing an OSS license doesnt need to be scary.</h1> <h1>Choosing an OSS license doesnt need to be scary.</h1>