A Python content management system designed for kirsle.net featuring a blog, comments and photo albums. https://rophako.kirsle.net/
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

30 rader
714 B

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