In [3]:
%pylab --no-import-all inline
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
from __future__ import with_statement
from jinja2 import Template
In [23]:
template=Template("""
<!DOCTYPE HTML>
<html>
<head>
<title>{{title}}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="js/jquery.min.js"></script>
<script src="js/jquery.poptrox.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-wide.css" />
<link rel="stylesheet" href="css/style-normal.css" />
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
</head>
<body>
<!-- Header -->
<header id="header">
<!-- Logo -->
<h1 id="logo"><a href="#">{{title}}</a></h1>
</header>
<!-- Intro -->
<section id="intro" class="main style1 dark fullscreen">
<div class="content container small">
<header>{{intro_header}}</header>
{{intro_body}}
<footer>{{intro_footer}}</footer>
</div>
</section>
<!-- One -->
<section id="one" class="main style2 right dark fullscreen">
<div class="content box style2">
<header>{{one_header}}</header>
{{one_body}}
</div>
{{one_footer}}
</section>
<!-- Two -->
<section id="two" class="main style2 right dark fullscreen">
<div class="content box style2">
<header>{{two_header}}</header>
{{two_body}}
</div>
{{two_footer}}
</section>
<!-- Work -->
<section id="work" class="main style3 primary">
<div class="content container">
<!-- Contact -->
<section id="contact" class="main style3 secondary">
<div class="content container">
<div class="box container small">
<header><h2>Kontakt</h2></header>
<!-- Begin MailChimp Signup Form -->
<form action="http://hexaplant.us9.list-manage.com/subscribe/post?u=e6afdc61cac19a395b41d26e6&id=e4371aa913" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate>
<form method="post" action="#">
<div class="row half">
<div class="6u"><label for="mce-EMAIL">Email Address </label>
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"></div>
<div class="6u"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"></div>
</div>
</form>
</div>
</div>
</section>
</div>
</section>
</body>
</html>
""")
f=open('index.html','w')
title='HexaPlant'
intro_nav='Intro'
intro_header='<h2>Information</h2>'
intro_body=''
intro_footer='<a href="#one" class="button style2 down">More</a>'
one_nav='One'
one_header='<h2>Ist mitunter nicht offensichtlich.</h2>'
one_body=''
one_footer='<a href="#two" class="button style2 down anchored">Next</a>'
two_nav='Two'
two_header='<h2>Wir helfen ihnen beim durchschauen.</h2>'
two_body=''
two_footer='<a href="#work" class="button style2 down anchored">Next</a>'
work_nav='Work'
work_header='<h2>WorkHeader</h2>'
work_body="""
"""
f.write(template.render(title=title,
intro_nav=intro_nav,intro_header=intro_header,intro_body=intro_body,intro_footer=intro_footer,
one_nav=one_nav,one_header=one_header,one_body=one_body,one_footer=one_footer,
two_nav=two_nav,two_header=two_header,two_body=two_body,two_footer=two_footer,
work_nav=work_nav,work_header=work_header,work_body=work_body
))
f.close()
print('Index.html written')
In [ ]: