Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the acf domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u378631216/domains/wphai.com/public_html/wp-includes/functions.php on line 6131

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the easy-watermark domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u378631216/domains/wphai.com/public_html/wp-includes/functions.php on line 6131

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the shortcodes-ultimate domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u378631216/domains/wphai.com/public_html/wp-includes/functions.php on line 6131

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the limit-login-attempts-reloaded domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/u378631216/domains/wphai.com/public_html/wp-includes/functions.php on line 6131
wordpress网站侧栏加一个AI提示的代码 - WP大海

wp侧栏小工具加一个推广AI的模块,类似对话打字效果,下面是代码:

<div class="widget widget-chatgpt">
<div class="chatgpt-msg">
<div class="item"><span>小明</span><div class="msg"><span id="typed-me-span">帮我写个关于***的开题报告</span></div></div>
<div class="item"><span>AI助手</span><div id="typed-text" class="msg"><span id="typed-text-span">好的,正在构思中,请稍等...</span></div></div>
</div>
<a href="<?php echo _MBT('child_openai_link');?>" target="_blank" class="btn">我要AI创作</a>
<script>
const div = document.getElementById('typed-me-span');
const text = div.innerHTML;
div.innerHTML = '';

for(let i = 0; i < text.length; i++) {
setTimeout(function(){
div.innerHTML += text.charAt(i);
}, i * 100);
}

setTimeout(function(){
jQuery("#typed-text-span").css("opacity","1");
const div2 = document.getElementById('typed-text-span');
const text = div2.innerHTML;
div2.innerHTML = '';

for(let i = 0; i < text.length; i++) {
setTimeout(function(){
div2.innerHTML += text.charAt(i);
}, i * 100);
}
},'2000');

</script>
</div>

css代码

.widget-chatgpt .btn{width:100%; background: linear-gradient( 270deg, #ff5f33 0%, #fe987c 100%); box-shadow: 0px 6px 10px 0px rgb(254 152 124 / 40%);display:block;color:#fff;padding:10px 0}
.widget-chatgpt .chatgpt-msg .item{margin-bottom:20px;overflow:hidden;text-align:right}
.widget-chatgpt .chatgpt-msg .item > span{display:block;color:#999;margin-bottom:3px;font-size:14px;}
.widget-chatgpt .chatgpt-msg .item .msg{background:#f5f5f5;padding:6px 14px;border-radius:8px 0 8px 8px;max-width:80%;font-size:14px;word-break: break-word;-webkit-user-select: text;-moz-user-select: text;user-select: text;display: inline-block;text-align: left; white-space: nowrap; overflow: hidden;width:210px;}
.widget-chatgpt .chatgpt-msg .item .msg #typed-me-span{animation: typing 4s steps(40, end);}
.widget-chatgpt .chatgpt-msg .item .msg #typed-text-span{animation: typing 10s steps(100, end);opacity:0}
.widget-chatgpt .chatgpt-msg .item:nth-child(2n){text-align:left}
.widget-chatgpt .chatgpt-msg .item:nth-child(2n) .msg{border-radius:0 8px 8px 8px}
常见问题
如何下载?
可以点击右侧边栏或者文章底部的【立即下载】按钮。然后按照【网盘地址】进行下载。
不是最新版本?
可以提交工单。或者发邮件到 uishop@qq.com。
声明:1、本站大部分资源均为网络采集所得,仅供用来学习研究,请于下载后的24h内自行删除,正式商用请购买正版。2、所有汉化类文件和个别标注了“原创”的产品均为本站原创发布,任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。3、如若本站内容侵犯了原著者的合法权益,请携带相关版权文件联系我们进行下架或删除。4、虚拟下载类资源具有可复制性,一经下载后本站有权拒绝退款或更换其他商品!
0

评论0

没有账号?注册  忘记密码?

社交账号快速登录