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.
30 lines
721 B
30 lines
721 B
# -*- coding: utf-8 -*-
|
|
|
|
"""Endpoints for the commenting subsystem."""
|
|
|
|
from flask import Blueprint, g
|
|
|
|
import rophako.model.emoticons as Emoticons
|
|
from rophako.utils import template
|
|
from rophako.log import logger
|
|
from config import *
|
|
|
|
mod = Blueprint("emoticons", __name__, url_prefix="/emoticons")
|
|
|
|
|
|
@mod.route("/")
|
|
def index():
|
|
"""List the available emoticons."""
|
|
theme = Emoticons.load_theme()
|
|
|
|
smileys = []
|
|
for img in sorted(theme["map"]):
|
|
smileys.append({
|
|
"img": img,
|
|
"triggers": theme["map"][img],
|
|
})
|
|
|
|
g.info["theme"] = EMOTICON_THEME
|
|
g.info["theme_name"] = theme["name"]
|
|
g.info["smileys"] = smileys
|
|
return template("emoticons/index.html")
|