From beb10e00a9a9ae8a3516537df8b0a3bad8be55dc Mon Sep 17 00:00:00 2001 From: Ching Date: Sat, 22 Jan 2022 00:01:44 +0800 Subject: [PATCH] =?UTF-8?q?feat(recipe):=20=E4=BF=AE=E6=94=B9=E8=8F=9C?= =?UTF-8?q?=E8=B0=B1=E9=A3=9E=E4=B9=A6=E5=8D=A1=E7=89=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改菜谱飞书卡片样式 Signed-off-by: Ching --- recipe/models.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/recipe/models.py b/recipe/models.py index 6065a26..d6aed4e 100644 --- a/recipe/models.py +++ b/recipe/models.py @@ -94,12 +94,18 @@ class Recipe(models.Model): "config": { "wide_screen_mode": True }, + "header": { + "title": { + "tag": "plain_text", + "content": self.name, + }, + "template": "blue" + }, "elements": [ { "tag": "markdown", - "content": "# **%s**\n类型:%s\n评分:%s\n难度:%s" % ( - self.name, self.display_recipe_type, self.display_rate, - self.display_difficult) + "content": "**类型**:%s\n**评分**:%s\n**难度**:%s" % ( + self.display_recipe_type, self.display_rate, self.display_difficult) }, { "tag": "action",