右键菜单添加复制当前页面链接按钮
新建 /themes/solitude/js/copylink.js
,内容如下:
1 2 3 4 5 6 7 8 9 10
| function copyPostLink() { const postLink = window.location.href;
navigator.clipboard.writeText(postLink).then(() => { utils.snackbarShow("当前页面链接已复制到剪贴板", false, 2000); }).catch(err => { console.error("无法复制链接", err); utils.snackbarShow("复制失败,请重试", false, 2000); }); }
|
修改 _config.solitude.yml
,引入js:
1 2 3
| extends: body: - <script src="/js/copylink.js" async></script>
|
然后右键菜单添加该项即可:
1 2 3 4 5 6 7
| right_menu: custom_list: - name: 复制链接 click: copyPostLink() id: menu-copyPostLink class: icon: fas fa-link
|
第六项:https://r1n.top/post/c28e60f4.html
导航栏页面
引用站外链接
links 页面
想改成只显示 title ,hover 显示 desc,调不好,只能这样了,当 avatar 值为 None 触发,但就在我要推送的时候,我想到:为什么不把条件设置为空呢😅🤣
themes\solitude\layout\includes\widgets\page\links\linksCard.pug >line 14
1 2 3 4 5 6 7 8 9
| if item.avatar .site-card-avatar img.flink-avatar.cf-friends-avatar(src=item.avatar + (data.suffix || ''), alt=item.name) //- .img-alt.is-center= item.name else - var avatarStyle = 'display:none' .site-card-text span.title.cf-friends-name= item.name span.desc(title=item.descr)= item.descr
|
themes\solitude\layout\includes\widgets\page\links\banner.pug >line 30
1 2 3 4 5 6
| a.tags-group-icon(href=url_for(y.link), title=y.name) if y.avatar img(src=y.avatar + (site.data.links.banner_suffix || ''), title=y.name) else img(src=y.topimg + (site.data.links.banner_suffix || ''), title=y.name) span.tags-group-title=y.name
|
themes\solitude\source\css_page\links.stylline >line 152 .site-card-text > .title
about 页面
themes\solitude\layout\includes\widgets\page\about\hobbies.pug >line 16
1 2 3
| .icon-group each icon in game.icon_group i(style=`background: url(${icon}) center / cover;`)
|
嘉然
1 2 3 4 5 6 7 8 9
| body: - <script src="https://cdn.jsdelivr.net/npm/greensock@1.20.2/dist/TweenLite.js"></script> - <script src="https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js"></script> - <script src="https://cdn.jsdelivr.net/npm/pixi.js@5.3.6/dist/pixi.min.js"></script> - <script src="https://cdn.jsdelivr.net/npm/pixi-live2d-display@0.3.1/dist/cubism4.min.js"></script> - <link href="https://cdn.jsdelivr.net/gh/journey-ad/blog-img@76ba2b3/live2d/lib/pio.css" rel="stylesheet" type="text/css"/> - <script src="https://cdn.jsdelivr.net/gh/journey-ad/blog-img@76ba2b3/live2d/lib/pio.js"></script> - <script src="https://cdn.jsdelivr.net/gh/journey-ad/blog-img@76ba2b3/live2d/lib/pio_sdk4.js"></script> - <script src="https://cdn.jsdelivr.net/gh/journey-ad/blog-img@76ba2b3/live2d/lib/load.js"></script>
|
灯箱(failed)
在 Font Matter 添加 no_lightbox 为 true 实现文章不显现 lightbox
但是改造失败了,退而求其次:使用 js 吧
1 2 3 4 5 6 7 8 9
| window.addEventListener('DOMContentLoaded', () => { document.querySelectorAll('a.fancybox').forEach(a => { const img = a.querySelector('img'); if (img) { a.parentNode.replaceChild(img, a); } }); })
|
themes\solitude\scripts\filter\default.js >line 25
1
| data.no_lightbox = data.hasOwnProperty("no_lightbox") ? data.no_lightbox === true : false;
|
themes\solitude\layout\includes\inject\body.pug >line 48、104
1
| if theme.lightbox || page.no_lightbox === false
|
themes\solitude\source\js\main.js >line 922
1
| lightbox && page.no_lightbox === false
|
themes\solitude\layout\includes\inject\head.pug >line 16
1
| if theme.lightbox && theme.fancybox && page.no_lightbox == false
|