Skip to content

Commit

Permalink
✨feat(linkicon): 添加drawio、png、、jpg、jpeg、tif图片后缀
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Mar 5, 2025
1 parent 88f0948 commit 97e5db9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/link_icon/drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/link_icon/img.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions style/module/link_icon.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,25 @@
background-image: url('/appearance/themes/Tsundoku/src/link_icon/compress.svg');
}

/* 添加drawio文件图标 */
.protyle-wysiwyg [data-node-id] span[data-type~='a']:is([data-href ^="assets/"], [data-href ^="file://"]):is([data-href $=".drawio"],[data-href $=".drawio.svg"],[data-href $=".drawio.png"]):not(:empty)::before,
.protyle-wysiwyg [data-node-id] span[data-type~='url']:is([data-href ^="assets/"], [data-href ^="file://"]):is([data-href $=".drawio"],[data-href $=".drawio.svg"],[data-href $=".drawio.png"]):not(:empty)::before,
.protyle-wysiwyg [data-node-id] a:is([href ^="assets/"], [href ^="file://"]):is([href $=".drawio"],[href $=".drawio.svg"],[href $=".drawio.png"])::before,
.b3-typography a:is([href ^="assets/"], [href ^="file://"]):is([href $=".drawio"],[href $=".drawio.svg"],[href $=".drawio.png"])::before,
.av__celltext--url:is([data-url $=".drawio"],[data-url $=".drawio.svg"],[data-url $=".drawio.png"])::before {
content: '';
background-image: url('/appearance/themes/Tsundoku/src/link_icon/drawio.svg');
}
/* 添加jpg、png、jpeg、tif文件图标 */
.protyle-wysiwyg [data-node-id] span[data-type~='a']:is([data-href ^="assets/"], [data-href ^="file://"]):is([data-href $=".jpg"],[data-href $=".jpeg"],[data-href $=".png"],[data-href $=".tif"]):not(:empty)::before,
.protyle-wysiwyg [data-node-id] span[data-type~='url']:is([data-href ^="assets/"], [data-href ^="file://"]):is([data-href $=".jpg"],[data-href $=".jpeg"],[data-href $=".png"],[data-href $=".tif"]):not(:empty)::before,
.protyle-wysiwyg [data-node-id] a:is([href ^="assets/"], [href ^="file://"]):is([href $=".jpg"],[href $=".jpeg"],[href $=".png"],[href $=".tif"])::before,
.b3-typography a:is([href ^="assets/"], [href ^="file://"]):is([href $=".jpg"],[href $=".jpeg"],[href $=".png"],[href $=".tif"])::before,
.av__celltext--url:is([data-url $=".jpg"],[data-url $=".jpeg"],[data-url $=".png"],[data-url $=".tif"])::before {
content: '';
background-image: url('/appearance/themes/Tsundoku/src/link_icon/img.svg');
}
/* 添加pdf文件图标 */
.protyle-wysiwyg [data-node-id] span[data-type~='a']:is([data-href ^="assets/"], [data-href ^="file://"])[data-href $=".pdf"]:not(:empty)::before,
.protyle-wysiwyg [data-node-id] span[data-type~='url']:is([data-href ^="assets/"], [data-href ^="file://"])[data-href $=".pdf"]:not(:empty)::before,
.protyle-wysiwyg [data-node-id] a:is([href ^="assets/"], [href ^="file://"])[href $=".pdf"]::before,
Expand Down

0 comments on commit 97e5db9

Please sign in to comment.