Skip to content

Commit

Permalink
feat: 调整链接预览样式,限制行数
Browse files Browse the repository at this point in the history
  • Loading branch information
Night-stars-1 committed Feb 4, 2024
1 parent 94e761d commit 2424e7f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 21 deletions.
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "QQ增强",
"slug": "qqpromote",
"description": "复读姬,二维码识别,时间显示,翻译,屏蔽更新,链接预览,ChatGPT,禁止回复自动AT,侧边栏管理,自动登录,屏蔽通话,群聊名称扩展",
"version": "1.3.9",
"version": "1.4.0",
"authors": [
{
"name": "Night-stars-1",
Expand All @@ -15,7 +15,7 @@
"repo": "Night-stars-1/LiteLoaderQQNT-Plugin-QQPromote",
"branch": "master",
"release": {
"tag": "v1.3.9"
"tag": "v1.4.0"
}
},
"platform": [
Expand Down
40 changes: 25 additions & 15 deletions src/config/WebPage.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/* 链接预览 */
.WebPage {
display:flex;
margin-top: .25rem;
margin-bottom: .125rem;
padding: .375rem;
line-height: 1.3rem;
background-color: rgb(217,245,206);
border-radius: .25rem;
position: relative;
overflow: hidden;
}
/* 主控件-前缀(颜色条) */
.WebPage:before {
Expand All @@ -21,45 +19,57 @@
width: 3px;
background:rgb(69, 175, 84);
}
/* 主控件-悬浮 */
/* 主控件-悬浮
.WebPage:hover {
background-color: var(--overlay_hover);
}
*/

/* 小图片 */
/* 小图片
.WebPage.with-small-photo .WebPage--content {
display: flex;
flex-direction: row-reverse;
}
*/

/* 内容 */
.WebPage .WebPage--content {
max-width: var(--message-width);
position: relative;
margin-inline-start: .25rem;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 8;
overflow: hidden;
}

/* 文本 */
.WebPage .WebPage-text {
display: flex;
flex-direction: column;
flex-grow: 1;
align-items: flex-start;
position: relative;
}

/* 标题和描述 */
.WebPage .site-title,
.WebPage .site-description {
/*
word-break:break-word;
margin-top:1px
*/
max-width: var(--message-width);
word-wrap: break-word;
word-wrap: break-word;
}

/* 图片最大宽度 */
.WebPage .media-photo {
max-width: var(--message-width);
max-width: var(--message-width);
border-radius: 0.375rem;
}

/* 图片-环绕布局 */
.WebPage.with-small-photo .media-photo {
float: right;
margin-left: 0.5em;
}

/* 夜间模式-输入框 */
@media (prefers-color-scheme: dark) {
.WebPage {
color: rgb(242, 242, 242);
background-color: rgb(39,62,85,0.5);
}
}
2 changes: 1 addition & 1 deletion src/renderer/myelement.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* @Date: 2024-01-19 16:40:54
* @LastEditors: Night-stars-1 [email protected]
* @LastEditTime: 2024-02-03 20:28:29
* @LastEditTime: 2024-02-04 19:08:37
*/
const separator_ele = document.createElement("div");
separator_ele.innerHTML = /*html*/`
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/videoBackGround.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* @Date: 2024-01-26 17:29:07
* @LastEditors: Night-stars-1 [email protected]
* @LastEditTime: 2024-02-02 19:24:06
* @LastEditTime: 2024-02-04 18:02:30
*/
async function setVideoBackGround(location) {
const setting_data = (await qqpromote.getSettings()).setting;
if (setting_data.video_background[location.hash]?.value && !document.querySelector(".qqpromote_video")){
document.body.insertAdjacentHTML('afterbegin', `
document.body.insertAdjacentHTML('afterbegin', /*html*/`
<video class="qqpromote_video" autoplay muted loop>
<source src="local:///H:/Download/Video/83122.mp4" type="video/mp4">
<source src="local:///C:/Users/Administrator/Videos/动漫/[Airota][Majo no Tabitabi][BDRip 1080p HEVC-10bit FLAC ASS]/[Airota][Majo no Tabitabi][02][BDRip 1080p HEVC-10bit FLAC ASS].mkv" type="video/mp4">
</video>
`);// <div class="qqpromote_video_overlay"></div>
Expand Down

0 comments on commit 2424e7f

Please sign in to comment.