Azide e2a97a9e56
适配小刻食堂平台 (#379)
* 🐛 插入新的Schedulable时应传入use_batch参数

*  适配ceobecanteen平台

Co-authored-by: phidiaLam <2957035701@qq.com>

*   明日方舟公告与官网采用截图分享 (#480)

*  明日方舟公告与官网采用截图分享

* 💄 auto fix by pre-commit hooks

* 🐛 修复缺少的导入,优化逻辑

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Azide <rukuy@qq.com>

* 🐛 优化截图图片效果

* 🐛 修复错误将转发内图片视作头图的问题

* 🍱 使用正式 Bison Logo

* 💄 auto fix by pre-commit hooks

* 🐛 请求小刻API时不在headers里添加过多字段

* 🐛 get_comb_id方法删除无用的targets参数

* 💡 get_comb_id方法更新注释

* 🔥 移除发送部分的更改

*  在命名中明确表示cond_func意图

* ♻️ 拆分get_comb_id功能

* ♻️ 调整缓存逻辑

*  使用uri在theme中调用platform截图

* ♻️ 重构截图逻辑

*  添加模糊匹配提示

*  适配新版Site

* 💄 auto fix by pre-commit hooks

* 🐛 去掉不必要的排序

* 🐛 修正不应出现的驼峰变量名

* ♻️ 按review意见修改

* ♻️ 调整截图函数逻辑

* 🔊 调低日志等级

* ✏️ 修复一些拼写和格式

---------

Co-authored-by: phidiaLam <2957035701@qq.com>
Co-authored-by: 洛梧藤 <67498817+phidiaLam@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-13 01:06:42 +08:00

122 lines
3.1 KiB
Django/Jinja

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>小刻食堂分享卡片</title>
</head>
<body>
<div id="ceobecanteen-card">
{% if card.content.image %}
<img src="{{ card.content.image }}" class="cover-img">
{% endif %}
{% if card.content.text %}
<div class="main-content">{{ card.content.text }}</div>
{% if card.retweet %}
<div class="retweet">
{% if card.retweet.author %}
<div class="origin-author">{{ card.retweet.author }}</div>
{% endif %}
{% if card.retweet.content %}
<div class="retweet-content">{{ card.retweet.content }}</div>
{% endif %}
{% if card.retweet.image %}
<img class='retweet-image' src="{{ card.retweet.image }}">
{% endif %}
</div>
{% endif %}
{% endif %}
<div class="footer">
<div class="datasource">
<div class="datasource-text">
<div class="datasource-name">{{ card.info.datasource }}</div>
<div class="time">{{ card.info.time }}</div>
</div>
<img class='qr' src="{{ card.qr }}">
</div>
<div class="source">
<img class='bison-logo' src="bison_logo.png">
<div class="source-text">
<div class="slogan">小刻吃到饼啦!</div>
<div class="linkage">bison&amp;小刻食堂联动</div>
<div class="description">来自小刻食堂再转发</div>
</div>
<img class='ceobe-logo' src="ceobecanteen_logo.png">
</div>
</div>
</div>
</body>
</html>
<style type="text/css">
#ceobecanteen-card {
width: 700px;
background-color: rgb(240, 236, 233);
}
.cover-img {
width: 100%;
}
.main-content {
padding: 30px;
white-space: pre-line;
}
.retweet {
margin: -20px 30px 20px;
background-color: rgb(226, 223, 219);
border: solid 1px rgb(212, 210, 207);
border-radius: 3px;
padding: 5px;
}
.retweet .retweet-image {
width: 100%;
}
.footer {
margin: 0 2%;
height: 80px;
border-top: 1px solid rgb(185, 181, 177);
display: flex;
padding: 10px 0;
}
.footer .datasource {
width: 45%;
padding-right: 5px;
border-right: 1px solid rgb(185, 181, 177);
display: flex;
justify-content: space-around;
}
.footer .datasource .datasource-text {
align-self: center;
}
.footer .datasource .datasource-text .datasource-name {
font-weight: bold;
font-size: 24px;
}
.footer .datasource .datasource-text .time {
font-size: 13px;
color: rgb(138, 136, 134);
}
.footer .datasource .qr {
width: 80px;
object-fit: contain;
}
.source {
width: 55%;
display: flex;
justify-content: space-evenly;
color: rgb(138, 136, 134);
font-size: 13px;
}
.footer .source .source-text {
align-self: center;
}
.source .slogan {
font-weight: bold;
font-size: 24px;
color: black;
}
.source .bison-logo,
.source .ceobe-logo {
width: 60px;
object-fit: contain;
}
</style>