certik/hpfem.org
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Intro ----- These are the sources of the http://hpfem.org/ web. We welcome any suggestions for our pages, feel free to send us a patch. Follow the instructions below to edit the pages. How to edit the pages --------------------- Please edit only the templates in the directory "templates", and then just run "./generate" from the root directory and it will take the templates and generate the .html files. The "./generate" script depends on the jinja2 library (on Debian/Ubuntu, install the "python-jinja2" package). For example, if you look into templates/hermes.html: {% extends "layout.html" %} {% block title %} hp-FEM: Hermes project {% endblock %} {% block content %} <h1 class="heading">Hermes project</h1> <p><strong>Hermes</strong> is a free C++/Python library of adaptive hp-FEM algorithms. The following links will lead you to the 1D, 2D and 3D versions of the library: <ul> <li><a href="#">Hermes1D</a> (not available yet)</li> <li><a href="http://hpfem.math.unr.edu/projects/hermes2d">Hermes2D</a></li> <li><a href="http://hpfem.math.unr.edu/bugs/projects/show/hermes3d">Hermes3D</a></li> </ul> {% endblock %} Then you can see, that it takes layout.html (which is the whole html that you can download from freetemplates.org) a and it only changes the title and the content. So the contens is now only edited at one place in templates/layout.html, then you run "./generate" and it will updated all pages. When you want to add/delete a new page, then just create/delete a template and add/delete it's name from ./generate: #! /usr/bin/env python from jinja2 import Environment, FileSystemLoader env = Environment(loader=FileSystemLoader('templates')) templates = ["hermes.html", "contact.html", "femcodes.html", "index.html"] for template in templates: t = env.get_template(template) open(template, "w").write(t.render()) Add/delete it from the list "templates".
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published