Skip to content

Commit

Permalink
fix: img
Browse files Browse the repository at this point in the history
  • Loading branch information
eallion committed Apr 17, 2023
1 parent 49137dc commit da8e7b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 1 addition & 10 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,6 @@ blockquote {
margin-left: 4px;
}

/* .timeline img {
display: block;
max-height: 50vh;
max-width: 100%;
margin: 10px 0;
border-radius: 16px;
border: 1px solid var(--color-img-border);
} */

.resource-wrapper {
display: flex;
width: 100%;
Expand Down Expand Up @@ -357,7 +348,7 @@ blockquote {
height: 202px;
}

.resimg img {
.timeline img, .resimg img {
display: block;
vertical-align: middle;
max-width: 100%;
Expand Down
5 changes: 3 additions & 2 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function updateHTMl(data) {
.replace(YOUKU_REG, "<div class='video-wrapper'><iframe src='https://player.youku.com/embed/$1' frameborder=0 'allowfullscreen'></iframe></div>")
.replace(YOUTUBE_REG, "<div class='video-wrapper'><iframe src='https://www.youtube.com/embed/$1' title='YouTube video player' frameborder='0' allow='accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture' allowfullscreen title='YouTube Video'></iframe></div>")

// 解析内置资源文件
// 解析内置资源文件
if (data[i].resourceList && data[i].resourceList.length > 0) {
var resourceList = data[i].resourceList;
var imgUrl = '', resUrl = '', resImgLength = 0;
Expand All @@ -248,7 +248,8 @@ function updateHTMl(data) {
if (resexlink) {
resLink = resexlink
} else {
resLink = memos + 'o/r/' + resourceList[j].id + '/' + resourceList[j].filename
fileId = resourceList[j].publicId || resourceList[j].filename
resLink = memos+'o/r/'+resourceList[j].id+'/'+fileId
}
if (resType == 'image') {
imgUrl += '<div class="resimg"><img loading="lazy" src="' + resLink + '"/></div>'
Expand Down

0 comments on commit da8e7b0

Please sign in to comment.