Mercurial > public > sg101
changeset 1200:b9514abc2a67
Initial commit of ssg101.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 24 Jun 2023 16:06:51 -0500 |
parents | 45ce2c20a4e7 |
children | fe10aea76cbd |
files | .hgignore tools/ssg101/ssg101.py tools/ssg101/templates/base.html tools/ssg101/templates/home.html |
diffstat | 4 files changed, 49 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Sun May 07 19:30:52 2023 -0500 +++ b/.hgignore Sat Jun 24 16:06:51 2023 -0500 @@ -5,6 +5,7 @@ *.log.*.gz *.pyc *.swp +.DS_Store secrets.json *.db *.mp3 @@ -22,3 +23,4 @@ sg101/xapian_index sg101/node_modules sg101/bower_components +tools/ssg101/output
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/ssg101/ssg101.py Sat Jun 24 16:06:51 2023 -0500 @@ -0,0 +1,17 @@ +import jinja2 + + +def main(): + print('Hello World') + + env = jinja2.Environment( + loader=jinja2.PackageLoader('ssg101'), + ) + template = env.get_template('home.html') + + with open('output/home.html', 'w') as fp: + fp.write(template.render()) + + +if __name__ == '__main__': + main()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/ssg101/templates/base.html Sat Jun 24 16:06:51 2023 -0500 @@ -0,0 +1,22 @@ +<!doctype html> +<html> + <head> + {% block head %} + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <link href="//cdn.muicss.com/mui-0.10.3/css/mui.min.css" rel="stylesheet" type="text/css" /> + <script src="//cdn.muicss.com/mui-0.10.3/js/mui.min.js"></script> + {% endblock %} + </head> + <body> + <div id="content"> + {% block content %} + {% endblock %} + </div> + <div id="footer"> + {% block footer %} + {% endblock %} + </div> + </body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/ssg101/templates/home.html Sat Jun 24 16:06:51 2023 -0500 @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% block title %}SurfGuitar101.com{% endblock %} +{% block content %} + <h1>SurfGuitar101.com</h1> + <p> + Welcome to the archives of SurfGuitar101.com. + </p> +{% endblock %}