【原创】关于Argon 主题添加的一部分扩展详情

admin 2022年12月3日16:28:01评论54 views字数 14629阅读48分45秒阅读模式

首先感谢作者solstice23开源主题。辛苦了!!!

主题地址:https://github.com/solstice23

官方文档&博客:https://solstice23.top/archives/746

拒绝白嫖从我做起!!!

【原创】关于Argon 主题添加的一部分扩展详情

钱虽不多但至少在这个白嫖成风的网络世界给作者一定的动力

[huayang]

?ok咱们进入正题

一定要禁用Google 字体

一定要禁用Google 字体

一定要禁用Google 字体

否则卡得一批

网页加载速度的问题可以看这篇文章https://segmentfault.com/a/1190000019211567?utm_source=tag-newest

雪花

官方文档:https://github.com/VincentGarreau/particles.js

<!--雪花-->
<div id="snow"></div>
<style>
    #snow {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        right: 0;
        z-index: -1;
        pointer-events: none;
        transition: filter .5s ease;
    }
    html.darkmode #snow{
        filter: invert(0.3);
    }
</style>
<script srcb64="https://hellohy.top/xuehua/particles.min.js"></script>
<script>
    particlesJS('snow', {"particles":{"number":{"value":104,"density":{"enable":true,"value_area":800}},"color":{"value":"#fff"},"shape":{"type":"circle","stroke":{"width":0,"color":"#000000"},"polygon":{"nb_sides":5},"image":{"srcb64":"img/github.svg","width":100,"height":100}},"opacity":{"value":0.5,"random":true,"anim":{"enable":false,"speed":1,"opacity_min":0.1,"sync":false}},"size":{"value":10,"random":true,"anim":{"enable":false,"speed":40,"size_min":0.1,"sync":false}},"line_linked":{"enable":false,"distance":500,"color":"#ffffff","opacity":0.4,"width":2},"move":{"enable":true,"speed":3,"direction":"bottom","random":false,"straight":false,"out_mode":"out","bounce":false,"attract":{"enable":false,"rotateX":600,"rotateY":1200}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":true,"mode":"bubble"},"onclick":{"enable":true,"mode":"repulse"},"resize":true},"modes":{"grab":{"distance":400,"line_linked":{"opacity":0.5}},"bubble":{"distance":400,"size":4,"duration":0.3,"opacity":1,"speed":3},"repulse":{"distance":200,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}}},"retina_detect":true});
</script>

放在主题的页尾脚本

尽量把js文件放在自己的主机位置

鼠标样式

制作方法参照我写的上一个主题的文章里【原创】关于wordpress以及H-Siren主题的一些改动和解决办法

<!--鼠标样式-->
<style>
a:hover{
    cursor:url("https://hellohy.top/wp-content/themes/H-Siren-master/images/6.png"),auto;
}
body {
    cursor:url("https://hellohy.top/wp-content/themes/H-Siren-master/images/5.png"),auto;
    }
</style>

同样放在页尾脚本里

内裤

这里我以后会做成一个彩蛋页面

先把图上了

【原创】关于Argon 主题添加的一部分扩展详情

鼠标点击特效

<!--鼠标点击特效-->
<script>
!function (e, t, a) {function r() {for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x + "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e].scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999");requestAnimationFrame(r)}function n() {var t = "function" == typeof e.onclick && e.onclick;e.onclick = function (e) {t && t(), o(e)}}function o(e) {var a = t.createElement("div");a.className = "heart", s.push({el: a,x: e.clientX - 5,y: e.clientY - 5,scale: 1,alpha: 1,color: c()}), t.body.appendChild(a)}function i(e) {var a = t.createElement("style");a.type = "text/css";try {a.appendChild(t.createTextNode(e))} catch (t) {a.styleSheet.cssText = e}t.getElementsByTagName("head")[0].appendChild(a)}function c() {return "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")"}var s = [];e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {setTimeout(e, 1e3 / 60)}, i(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), n(), r()}(window, document);
</script>

依然是放在页尾脚本

网页图标

<!--网页图标-->
<link rel="shortcut icon" href="xxx.ico"/>

这个则放在页头脚本因为要放在body前

网站运行时间

/*网站运行时间*/
本娘已经坚持了<SPAN id=span_dt_dt style="color: #fff;"></SPAN>
<SCRIPT language=javascript>
function show_date_time(){
window.setTimeout("show_date_time()", 1000);
BirthDay=new Date("6/13/2019 00:00:00");//这个日期是可以修改的
today=new Date();
timeold=(today.getTime()-BirthDay.getTime());
sectimeold=timeold/1000
secondsold=Math.floor(sectimeold);
msPerDay=24*60*60*1000
e_daysold=timeold/msPerDay
daysold=Math.floor(e_daysold);
e_hrsold=(e_daysold-daysold)*24;
hrsold=Math.floor(e_hrsold);
e_minsold=(e_hrsold-hrsold)*60;
minsold=Math.floor((e_hrsold-hrsold)*60);
seconds=Math.floor((e_minsold-minsold)*60);
span_dt_dt.innerHTML=""+daysold+"天"+hrsold+"小时"+minsold+"分"+seconds+"秒";
}
show_date_time();
</SCRIPT>

这个和那个备案都放在页脚内容

复制粘贴版权弹窗

进入主题编辑器找到functions.php粘贴下列代码

 //复制粘贴
    function jiub() {
     echo '<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.css" >';
     echo '<script srcb64="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.js"></script>';
     echo '<script>document.body.oncopy = function() { swal("复制成功!", "转载请务必保留原文链接,申明来源,谢谢合作!!","success");};</script>';
    }
    add_action( 'wp_footer', 'jiub', 100 );

再进入footer.php进行调用

<?php jiub(); ?>
【原创】关于Argon 主题添加的一部分扩展详情

小工具

网络攻击实时地图

首先添加右侧html小工具

写入下列代码代码

<a href="https://cybermap.kaspersky.com/cn">
进入实时攻击演示模式
</a>
<iframe width="200" height="327" srcb64="https://cybermap.kaspersky.com/cn/widget/dynamic/dark" frameborder="0"></iframe>

热门文章

首先要下载插件Advanced Random Posts Widget

【原创】关于Argon 主题添加的一部分扩展详情

安装并使用

【原创】关于Argon 主题添加的一部分扩展详情
标题
【原创】关于Argon 主题添加的一部分扩展详情
最大文章数及源

邮箱

//使用 smtp 发邮件
add_action('phpmailer_init', 'fanly_mail_smtp');
function fanly_mail_smtp( $phpmailer ) {
    $phpmailer->IsSMTP();
    $phpmailer->SMTPAuth = true;//启用 SMTPAuth 服务
    $phpmailer->Port = 465;//SMTP 邮件发送端口,这个和下面的 SSL 验证对应,如果这里填写 25,则下面参数为空
    $phpmailer->SMTPSecure ="ssl";//是否验证 ssl,与 MTP 邮件发送端口对应,如果不填写,则上面的端口须为 25
    $phpmailer->Host = "smtp.qq.com";//邮箱的 SMTP 服务器地址,目前 smtp.qq.com 为 QQ 邮箱 SMTP
    $phpmailer->Username = "[email protected]";//你的邮箱地址
    $phpmailer->Password ="***************";//以前是邮箱登录密码,现在是一个授权码
}
//发件地址记得和 smtp 邮箱一致即可
add_filter( 'wp_mail_from', 'fanly_wp_mail_from' );
function fanly_wp_mail_from() {
    return '[email protected]';

把以上代码写入function.php文件即可

如果是qq邮箱$phpmailer->Password在以下获取

设置->账号,打开如下图的按钮你会获得一个码,填上就可以使用了

【原创】关于Argon 主题添加的一部分扩展详情

插件

【原创】关于Argon 主题添加的一部分扩展详情
【原创】关于Argon 主题添加的一部分扩展详情

福利

【原创】关于Argon 主题添加的一部分扩展详情
【原创】关于Argon 主题添加的一部分扩展详情

其他

统计代码也是放在页尾脚本

还有别的一些设计参见【原创】关于wordpress以及H-Siren主题的一些改动和解决办法

懒虫

{"argon_theme_color":"#5e72e4","argon_theme_color_hex_preview":"#5e72e4","argon_show_customize_theme_color_picker":true,"argon_darkmode_autoswitch":"false","argon_enable_amoled_dark":"true","argon_card_radius":"8","argon_card_shadow":"default","argon_page_layout":"triple","argon_font":"sans-serif","argon_assets_path":"jsdelivr","argon_wp_path":"/","argon_dateformat":"YMD","argon_enable_headroom":"true","argon_toolbar_title":"浅浅淡淡","argon_toolbar_icon":"https://hellohy.top/img/%E5%86%85%E8%A3%A4-03.png","argon_toolbar_icon_link":"https://hellohy.top","argon_banner_title":"我独自度过了太多时光,沉默已成一种习惯。","argon_banner_subtitle":"柏瑞尔·马卡姆《夜航西飞》","argon_banner_background_url":"--bing--","argon_banner_background_color_type":"shape-primary","argon_banner_background_hide_shapes":true,"argon_enable_banner_title_typing_effect":"true","argon_banner_typing_effect_interval":"200","argon_page_background_url":"https://hellohy.top/img/海边女孩6K动漫壁纸_彼岸图网.jpg","argon_page_background_dark_url":"","argon_page_background_opacity":"1","argon_page_background_banner_style":"transparent","argon_show_toolbar_mask":true,"argon_sidebar_banner_title":"浅浅淡淡","argon_sidebar_banner_subtitle":"--hitokoto--","argon_sidebar_auther_name":"华扬","argon_sidebar_auther_image":"http://cn-sec.com/wp-content/uploads/2022/12/20221203082758-9.jpg","argon_sidebar_announcement":"页面优化完成,下一步将目录的优化整理","argon_fab_show_settings_button":"true","argon_fab_show_darkmode_button":"false","argon_fab_show_gotocomment_button":"true","argon_seo_description":"","argon_seo_keywords":"","argon_article_meta":"author|time|categories|edittime|views|comments","argon_show_readingtime":"true","argon_reading_speed":"300","argon_reading_speed_en":"160","argon_show_thumbnail_in_banner_in_content_page":"false","argon_first_image_as_thumbnail_by_default":"false","argon_reference_list_title":"参考","argon_show_sharebtn":"true","argon_show_headindex_number":"true","argon_donate_qrcode_url":"https://hellohy.top/img/mm_reward_qrcode_1611051840906.png","argon_additional_content_after_post":"","argon_related_post":"category,tag","argon_related_post_sort_orderby":"rand","argon_related_post_sort_order":"DESC","argon_related_post_limit":"5","argon_article_header_style":"article-header-style-2","argon_outdated_info_time_type":"modifiedtime","argon_outdated_info_days":"-1","argon_outdated_info_tip_type":"inpost","argon_outdated_info_tip_content":"本文最后更新于 %date_delta% 天前,其中的信息可能已经有所发展或是发生改变。","argon_footer_html":"蜀ICP备 20020830<br>\n\n本娘已经坚持了<SPAN id=span_dt_dt style=\"color: #fff;\"></SPAN>\n<SCRIPT language=javascript>\nfunction show_date_time(){\nwindow.setTimeout(\"show_date_time()\", 1000);\nBirthDay=new Date(\"6/13/2019 00:00:00\");//这个日期是可以修改的\ntoday=new Date();\ntimeold=(today.getTime()-BirthDay.getTime());\nsectimeold=timeold/1000\nsecondsold=Math.floor(sectimeold);\nmsPerDay=24*60*60*1000\ne_daysold=timeold/msPerDay\ndaysold=Math.floor(e_daysold);\ne_hrsold=(e_daysold-daysold)*24;\nhrsold=Math.floor(e_hrsold);\ne_minsold=(e_hrsold-hrsold)*60;\nminsold=Math.floor((e_hrsold-hrsold)*60);\nseconds=Math.floor((e_minsold-minsold)*60);\nspan_dt_dt.innerHTML=\"\"+daysold+\"天\"+hrsold+\"小时\"+minsold+\"分\"+seconds+\"秒\";\n}\nshow_date_time();\n</SCRIPT>","argon_enable_code_highlight":"true","argon_code_theme":"vs","argon_math_render":"mathjax3","argon_mathjax_cdn_url":"//cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js","argon_mathjax_v2_cdn_url":"//cdn.jsdelivr.net/npm/[email protected]/MathJax.js?config=TeX-AMS_HTML","argon_katex_cdn_url":"//cdn.jsdelivr.net/npm/[email protected]/dist/","argon_enable_lazyload":"true","argon_lazyload_threshold":"800","argon_lazyload_effect":"fadeIn","argon_lazyload_loading_style":"2","argon_enable_fancybox":"true","argon_enable_zoomify":"false","argon_zoomify_duration":"200","argon_zoomify_easing":"cubic-bezier(0.4,0,0,1)","argon_zoomify_scale":"0.9","argon_enable_pangu":"article","argon_custom_html_head":"<!--网页图标-->\n<link rel=\"shortcut icon\" href=\"https://hellohy.top/wp-content/themes/H-Siren-master/images/favicon.ico\"/>","argon_custom_html_foot":"<!--鼠标样式-->\n<style>\na:hover{\n    cursor:url(\"https://hellohy.top/wp-content/themes/H-Siren-master/images/6.png\"),auto;\n}\n\nbody {\n    cursor:url(\"https://hellohy.top/wp-content/themes/H-Siren-master/images/5.png\"),auto;\n    }\n</style>\n\n<!--鼠标点击特效-->\n<script>\n!function (e, t, a) {function r() {for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = \"left:\" + s[e].x + \"px;top:\" + s[e].y + \"px;opacity:\" + s[e].alpha + \";transform:scale(\" + s[e].scale + \",\" + s[e].scale + \") rotate(45deg);background:\" + s[e].color + \";z-index:99999\");requestAnimationFrame(r)}function n() {var t = \"function\" == typeof e.onclick && e.onclick;e.onclick = function (e) {t && t(), o(e)}}function o(e) {var a = t.createElement(\"div\");a.className = \"heart\", s.push({el: a,x: e.clientX - 5,y: e.clientY - 5,scale: 1,alpha: 1,color: c()}), t.body.appendChild(a)}function i(e) {var a = t.createElement(\"style\");a.type = \"text/css\";try {a.appendChild(t.createTextNode(e))} catch (t) {a.styleSheet.cssText = e}t.getElementsByTagName(\"head\")[0].appendChild(a)}function c() {return \"rgb(\" + ~~(255 * Math.random()) + \",\" + ~~(255 * Math.random()) + \",\" + ~~(255 * Math.random()) + \")\"}var s = [];e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || function (e) {setTimeout(e, 1e3 / 60)}, i(\".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}\"), n(), r()}(window, document);\n</script>\n\n<!--雪花-->\n<div id=\"snow\"></div>\n<style>\n    #snow {\n        position: fixed;\n        left: 0;\n        top: 0;\n        bottom: 0;\n        right: 0;\n        z-index: -1;\n        pointer-events: none;\n        transition: filter .5s ease;\n    }\n    html.darkmode #snow{\n        filter: invert(0.3);\n    }\n</style>\n<script srcb64=\"https://hellohy.top/xuehua/particles.min.js\"></script>\n<script>\n    particlesJS('snow', {\"particles\":{\"number\":{\"value\":104,\"density\":{\"enable\":true,\"value_area\":800}},\"color\":{\"value\":\"#fff\"},\"shape\":{\"type\":\"circle\",\"stroke\":{\"width\":0,\"color\":\"#000000\"},\"polygon\":{\"nb_sides\":5},\"image\":{\"srcb64\":\"img/github.svg\",\"width\":100,\"height\":100}},\"opacity\":{\"value\":0.5,\"random\":true,\"anim\":{\"enable\":false,\"speed\":1,\"opacity_min\":0.1,\"sync\":false}},\"size\":{\"value\":10,\"random\":true,\"anim\":{\"enable\":false,\"speed\":40,\"size_min\":0.1,\"sync\":false}},\"line_linked\":{\"enable\":false,\"distance\":500,\"color\":\"#ffffff\",\"opacity\":0.4,\"width\":2},\"move\":{\"enable\":true,\"speed\":3,\"direction\":\"bottom\",\"random\":false,\"straight\":false,\"out_mode\":\"out\",\"bounce\":false,\"attract\":{\"enable\":false,\"rotateX\":600,\"rotateY\":1200}}},\"interactivity\":{\"detect_on\":\"canvas\",\"events\":{\"onhover\":{\"enable\":true,\"mode\":\"bubble\"},\"onclick\":{\"enable\":true,\"mode\":\"repulse\"},\"resize\":true},\"modes\":{\"grab\":{\"distance\":400,\"line_linked\":{\"opacity\":0.5}},\"bubble\":{\"distance\":400,\"size\":4,\"duration\":0.3,\"opacity\":1,\"speed\":3},\"repulse\":{\"distance\":200,\
"duration\":0.4},\"push\":{\"particles_nb\":4},\"remove\":{\"particles_nb\":2}}},\"retina_detect\":true});\n</script>\n\n<!--百度统计-->\n<script>\nvar _hmt = _hmt || [];\n(function() {\n  var hm = document.createElement(\"script\");\n  hm.srcb64 = \"xxx\";\n  var s = document.getElementsByTagName(\"script\")[0]; \n  s.parentNode.insertBefore(hm, s);\n})();\n</script>\n\n","argon_enable_smoothscroll_type":"2","argon_enable_into_article_animation":"true","argon_comment_pagination_type":"page","argon_comment_emotion_keyboard":"true","argon_hide_name_email_site_input":"false","argon_comment_need_captcha":"true","argon_comment_allow_markdown":"true","argon_comment_allow_editing":"true","argon_comment_allow_privatemode":"true","argon_comment_allow_mailnotice":"true","argon_comment_mailnotice_checkbox_checked":true,"argon_comment_enable_qq_avatar":"false","argon_comment_avatar_vcenter":"false","argon_who_can_visit_comment_edit_history":"commentsender","argon_comment_ua":"platform,browser,version","argon_fold_long_comments":"false","argon_gravatar_cdn":"","argon_text_gravatar":"true","argon_pjax_disabled":"false","argon_hide_categories":"","argon_enable_login_css":"true","argon_home_show_shuoshuo":"false","argon_enable_timezone_fix":"true","argon_hide_shortcode_in_preview":"false","argon_enable_mobile_scale":"true","argon_disable_googlefont":"false","argon_update_source":"github","argon_hide_footer_author":"false"}
【原创】关于Argon 主题添加的一部分扩展详情

我就惯着你!!!

[/huayang]

FROM:浅浅淡淡[hellohy]

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年12月3日16:28:01
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【原创】关于Argon 主题添加的一部分扩展详情http://cn-sec.com/archives/1443048.html

发表评论

匿名网友 填写信息