~kungtotte/dtt

7f0d56243d0f2d7c3cc7da006a2b4891f3bb01cc — Thomas Landin 4 months ago c91518b
Add missing templates
3 files changed, 11 insertions(+), 6 deletions(-)

M README.md
M src/dtt.nim
M src/tmpl.nim
M README.md => README.md +0 -6
@@ 28,9 28,3 @@ files.

It's not done by a long-shot, so some things aren't working properly and some
things are just not there yet.

## TODO
- Add missing templates
- Flesh out existing templates
- Create a basic design in *style.css*


M src/dtt.nim => src/dtt.nim +2 -0
@@ 67,6 67,8 @@ proc initCmd(dir: string, force: bool = false) =

  writeFile(wd / "config.cfg", tmpl.cfg)
  writeFile(wd / template_dir / "page.mustache", tmpl.page)
  writeFile(wd / template_dir / "post.mustache", tmpl.post)
  writeFile(wd / template_dir / "header.mustache", tmpl.header)
  writeFile(wd / template_dir / "footer.mustache", tmpl.footer)
  writeFile(wd / output_dir / css_dir / "style.css", tmpl.style)


M src/tmpl.nim => src/tmpl.nim +9 -0
@@ 32,6 32,15 @@ email = "your@email.tld"
    {{{content}}}
  </article>
"""
  header* = """
    <header>
      <nav>
        {{#links}}
            <ul><a href="{{base_url}}/{{target}}.html">{{title}}</a></ul>
        {{/links}}
      </nav>
    </header>
"""
  footer* = """
<footer>
  <p>&copy; <a href="mailto:{{email}}">{{author}}</a></p>