A Python content management system designed for kirsle.net featuring a blog, comments and photo albums. https://rophako.kirsle.net/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 754B

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. """Endpoints for the commenting subsystem."""
  4. from flask import Blueprint, g
  5. import rophako.model.emoticons as Emoticons
  6. from rophako.utils import template
  7. from rophako.settings import Config
  8. mod = Blueprint("emoticons", __name__, url_prefix="/emoticons")
  9. @mod.route("/")
  10. def index():
  11. """List the available emoticons."""
  12. theme = Emoticons.load_theme()
  13. smileys = []
  14. for img in sorted(theme["map"]):
  15. smileys.append({
  16. "img": img,
  17. "triggers": theme["map"][img],
  18. })
  19. g.info["theme"] = Config.emoticons.theme
  20. g.info["theme_name"] = theme["name"]
  21. g.info["smileys"] = smileys
  22. return template("emoticons/index.html")