main.py 417 B

12345678910111213
  1. def define_env(env):
  2. @env.macro
  3. def pageinfo(authors = None, created = None, updated = None):
  4. parts = []
  5. if authors is not None:
  6. parts.append(", ".join(authors if isinstance(authors, list) else [ authors ]))
  7. if created is not None:
  8. parts.append("Created " + created)
  9. if updated is not None:
  10. parts.append("Updated " + updated)
  11. return "<br><small>" + " |&nbsp;".join(parts) + "</small>"