Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
SunWuyuan committed Feb 16, 2024
1 parent a33a24f commit ceaf1e1
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 59 deletions.
18 changes: 9 additions & 9 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#网站信息
sitename='' #网站名称,必须填写
slogan='' #网站标语,必须填写
sitedomain='' #网站域名,不需要https://开头与/结尾,必须填写
privacypolicyurl='' #隐私政策链接,法律建议你填
termsofserviceurl='' #服务条款链接,法律建议你填
adminemail='' #网站联系邮箱,无则空
SiteName='' #网站名称,必须填写
SiteSlogan='' #网站标语,必须填写
SiteDomain='' #网站域名,不需要https://开头与/结尾,必须填写
SitePrivacyPolicy='' #隐私政策链接,法律建议你填
SiteTermsofService='' #服务条款链接,法律建议你填
SiteFeedbackEmail='' #网站联系邮箱,无则空

#recaptcha,均必填
rekey='' #谷歌验证码key
Expand All @@ -14,9 +14,9 @@ resecret='' #谷歌验证码secret
reurl='https://www.recaptcha.net/recaptcha/api.js' #不需要加?和后面的内容,ourworld会自动添加callback
reverify='https://www.recaptcha.net/recaptcha/api/siteverify'

#兼容hcaptcha示例
# reurl='https://js.hcaptcha.com/1/api.js'
# reverify='https://api.hcaptcha.com/siteverify'
#兼容turnstile示例
# reurl='https://challenges.cloudflare.com/turnstile/v0/api.js'
# reverify='https://challenges.cloudflare.com/turnstile/v0/siteverify'

#邮箱,均必填
#所有支持的服务商可以在此找到:
Expand Down
2 changes: 1 addition & 1 deletion server/router_scratch.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ router.get("/getExtensionLibrary", (req, res, next) => {
extensionURL: "/static/extensions/coco-math-extension.js",
iconURL: "/static/extensions/cocoExt.jpg",
insetIconURL: "/static/extensions/cocoLogo.png",
description: process.env.sitename + "自定义扩展",
description: process.env.SiteName + "自定义扩展",
featured: true,
},
];
Expand Down
30 changes: 15 additions & 15 deletions server/router_user.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ router.post("/register", function (req, res) {
transporter.sendMail(
{
// 发件人邮箱
from: `${process.env.sitename}"社区注册消息" <${process.env.mailfrom}>`,
from: `${process.env.SiteName}"社区注册消息" <${process.env.mailfrom}>`,
// 邮件标题
subject: process.env.sitename + "社区注册消息",
subject: process.env.SiteName + "社区注册消息",
// 目标邮箱
to: username,
// 邮件内容
Expand All @@ -262,9 +262,9 @@ router.post("/register", function (req, res) {
<div class="box_4 flex-col" style="margin-top: 92px;display: flex;flex-direction: column;align-items: center;">
<div class="text-group_5 flex-col justify-between"
style="display: flex;flex-direction: column;align-items: center;margin: 0 20px;"><span class="text_1"
style="font-size: 26px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #000000;line-height: 37px;text-align: center;">嘿!你在${process.env.sitename}申请了账户</span><span
style="font-size: 26px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #000000;line-height: 37px;text-align: center;">嘿!你在${process.env.SiteName}申请了账户</span><span
class="text_2"
style="font-size: 16px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #00000030;line-height: 22px;margin-top: 21px;text-align: center;">你在${process.env.sitename}申请了账户,这是你的账户信息</span>
style="font-size: 16px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #00000030;line-height: 22px;margin-top: 21px;text-align: center;">你在${process.env.SiteName}申请了账户,这是你的账户信息</span>
</div>
<div class="box_2 flex-row"
style="margin: 0 20px;min-height: 128px;min-width: 600px;background: #F7F7F7;border-radius: 12px;margin-top: 34px;display: flex;flex-direction: column;align-items: flex-start;padding: 32px 16px;width: calc(100% - 40px);">
Expand All @@ -278,17 +278,17 @@ router.post("/register", function (req, res) {
style="display: flex;position: relative;border: 1px dashed #1289d82e;box-sizing: content-box;height: 0px;overflow: visible;width: 100%;">
<a class="text-wrapper_2 flex-col"
style="min-width: 106px;height: 38px;background: #1289d82e;border-radius: 32px;display: flex;align-items: center;justify-content: center;text-decoration: none;margin: auto;margin-top: 32px;"
href="https://${process.env.sitedomain}"><span class="text_5" style="color: #068bf8;">立即登录</span></a>
href="https://${process.env.SiteDomain}"><span class="text_5" style="color: #068bf8;">立即登录</span></a>
</div>
<table style="width:100%;font-weight:300;margin-bottom:10px;border-collapse:collapse">
<tbody>
<tr style="font-weight:300">
<td style="width:3.2%;max-width:30px;"></td>
<td style="max-width:540px;">
<p style="text-align:center; margin:20px auto 14px auto;font-size:12px;color:#999;">
此为系统邮件,如需联系请联系${process.env.adminemail} <br /><a
此为系统邮件,如需联系请联系${process.env.SiteFeedbackEmail} <br /><a
style="text-decoration:none;word-break:break-all;word-wrap:normal; color: #333;"
target="_blank"> 您收到这份邮件是因为您注册了${process.env.sitename}账户 </a></p>
target="_blank"> 您收到这份邮件是因为您注册了${process.env.SiteName}账户 </a></p>
<p id="cTMail-rights"
style="max-width: 100%; margin:auto;font-size:12px;color:#999;text-align:center;line-height:22px;">
<img border="0" src="https://cdn.wuyuan.dev/img/qrcode_for_gh_a55736ccbcb4_258_6dxqg3_.jpg"
Expand Down Expand Up @@ -367,9 +367,9 @@ router.post("/repw", function (req, res) {
transporter.sendMail(
{
// 发件人邮箱
from: `${process.env.sitename}"密码重置消息" <${process.env.mailfrom}>`,
from: `${process.env.SiteName}"密码重置消息" <${process.env.mailfrom}>`,
// 邮件标题
subject: process.env.sitename + "密码重置消息",
subject: process.env.SiteName + "密码重置消息",
// 目标邮箱
to: username,
// 邮件内容
Expand All @@ -382,9 +382,9 @@ router.post("/repw", function (req, res) {
<div class="box_4 flex-col" style="margin-top: 92px;display: flex;flex-direction: column;align-items: center;">
<div class="text-group_5 flex-col justify-between"
style="display: flex;flex-direction: column;align-items: center;margin: 0 20px;"><span class="text_1"
style="font-size: 26px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #000000;line-height: 37px;text-align: center;">嘿!你在${process.env.sitename}申请重置密码</span><span
style="font-size: 26px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #000000;line-height: 37px;text-align: center;">嘿!你在${process.env.SiteName}申请重置密码</span><span
class="text_2"
style="font-size: 16px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #00000030;line-height: 22px;margin-top: 21px;text-align: center;">你在${process.env.sitename}申请了重置密码,这是你的密码重置信息</span>
style="font-size: 16px;font-family: PingFang-SC-Bold, PingFang-SC;font-weight: bold;color: #00000030;line-height: 22px;margin-top: 21px;text-align: center;">你在${process.env.SiteName}申请了重置密码,这是你的密码重置信息</span>
</div>
<div class="box_2 flex-row"
style="margin: 0 20px;min-height: 128px;min-width: 600px;background: #F7F7F7;border-radius: 12px;margin-top: 34px;display: flex;flex-direction: column;align-items: flex-start;padding: 32px 16px;width: calc(100% - 40px);">
Expand All @@ -398,21 +398,21 @@ router.post("/repw", function (req, res) {
style="display: flex;position: relative;border: 1px dashed #1289d82e;box-sizing: content-box;height: 0px;overflow: visible;width: 100%;">
<a class="text-wrapper_2 flex-col"
style="min-width: 106px;height: 38px;background: #1289d82e;border-radius: 32px;display: flex;align-items: center;justify-content: center;text-decoration: none;margin: auto;margin-top: 32px;"
href="https://${process.env.sitedomain}/user/repw?token=${jwttoken}"><span class="text_5"
href="https://${process.env.SiteDomain}/user/repw?token=${jwttoken}"><span class="text_5"
style="color: #068bf8;">重设密码</span></a>
<p style="text-align:center; margin:20px auto 5px auto;font-size:12px;color:#999;">也可以复制以下链接</p>
<p style="text-align:center; margin:0px auto 0px auto;font-size:12px;color:#999;word-break:break-all">
https://${process.env.sitedomain}/user/repw?token=${jwttoken}</p>
https://${process.env.SiteDomain}/user/repw?token=${jwttoken}</p>
</div>
<table style="width:100%;font-weight:300;margin-bottom:10px;border-collapse:collapse">
<tbody>
<tr style="font-weight:300">
<td style="width:3.2%;max-width:30px;"></td>
<td style="max-width:540px;">
<p style="text-align:center; margin:20px auto 14px auto;font-size:12px;color:#999;">
此为系统邮件,如需联系请联系${process.env.adminemail} <br /><a
此为系统邮件,如需联系请联系${process.env.SiteFeedbackEmail} <br /><a
style="text-decoration:none;word-break:break-all;word-wrap:normal; color: #333;"
target="_blank"> 您收到这份邮件是因为您在${process.env.sitename}上申请重置密码</a></p>
target="_blank"> 您收到这份邮件是因为您在${process.env.SiteName}上申请重置密码</a></p>
<p id="cTMail-rights"
style="max-width: 100%; margin:auto;font-size:12px;color:#999;text-align:center;line-height:22px;">
<img border="0" src="https://cdn.wuyuan.dev/img/qrcode_for_gh_a55736ccbcb4_258_6dxqg3_.jpg"
Expand Down
6 changes: 3 additions & 3 deletions views/404.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>
<%= process.env.sitename %>
<%= process.env.SiteName %>
</title>
<link rel="shortcut icon" href="<%= process.env.staticurl %>/img/siteicon.png">
<meta name="description" content="<%= process.env.slogan %>">
<meta name="keyword" content="<%= process.env.slogan %>">
<meta name="description" content="<%= process.env.SiteSlogan %>">
<meta name="keyword" content="<%= process.env.SiteSlogan %>">


<% include linkfile.ejs %></head>
Expand Down
6 changes: 3 additions & 3 deletions views/about.ejs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<%- include('html-head.ejs', {pageTitle: '关于'}); %>

<div class="mdui-typo-display-1"><%= process.env.sitename %></div>
<div class="mdui-typo-display-1"><%= process.env.SiteName %></div>

<div class="mdui-typo-subheading"><%= process.env.sitename %>是一个重视个体的开源scratch论坛</div>
<div class="mdui-typo-subheading"><%= process.env.SiteName %>是一个重视个体的开源scratch论坛</div>

<div class="mdui-typo">
<blockquote>
<p>从前,有一个叫做思快池的池塘,人们每天快乐地在里面玩耍。但有一天,有一些心怀不轨的人在里面种了一种花,叫辱花。这种花会源源不断地释放出两种毒:岗毒和苔毒。之前,这些毒物并没被人接触到,可是有一天,一个矮小的黑影摘下了辱花,将这两种毒释放了出来。有人怀疑这个黑影是来自边城的猫,但未下定论。这些毒物被释放出来之后,开始毒害思快池中快乐游玩着的人们,最终,思快池中的一点毒水被人发现,官员们害怕这点毒水会毒害更多的人们,就把思快池填平了。之前在其中游玩的人们很怀念思快池,所以~就有了这个网站
</p>
<footer>——哔哩哔哩 是一刀斩哒</footer>
</blockquote>
</div><p>目前网站正在测试,可能会搬各大论坛上的作品,所有作品版权归原作者所有,搬运仅用于测试项目稳定性,社区正式上线前会全部删除,目前社区用户上传的作品也会一并清除。社区开发会很慢,bug也会很多,别针之类的社区有十多人开发而<%= process.env.sitename %>只有孙悟元一人,慢速更新请多包涵</p>
</div><p>目前网站正在测试,可能会搬各大论坛上的作品,所有作品版权归原作者所有,搬运仅用于测试项目稳定性,社区正式上线前会全部删除,目前社区用户上传的作品也会一并清除。社区开发会很慢,bug也会很多,别针之类的社区有十多人开发而<%= process.env.SiteName %>只有孙悟元一人,慢速更新请多包涵</p>
</p>
<%- include('./html-footer.ejs', {page: 'about'}); %>
4 changes: 2 additions & 2 deletions views/admin/admin_default.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@

<div id='header-box' style="color:#FFF;">
<img id="avatar_img" src="<%= process.env.staticurl %>/img/logo.png" style="margin-top: 128px;">
<h3 style="font-size:x-large; margin: 24px 0;">欢迎使用<%= process.env.sitename %></h3>
<div><%= process.env.sitename %>,每一行代码都足以改变世界</div>
<h3 style="font-size:x-large; margin: 24px 0;">欢迎使用<%= process.env.SiteName %></h3>
<div><%= process.env.SiteName %>,每一行代码都足以改变世界</div>
</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions views/error.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>错误 - <%= process.env.sitename %></title>
<title>错误 - <%= process.env.SiteName %></title>
<link rel="shortcut icon" href="<%= process.env.staticurl %>/img/siteicon.png">
<meta name="description" content="<%= process.env.slogan %>">
<meta name="keyword" content="<%= process.env.slogan %>">
<meta name="description" content="<%= process.env.SiteSlogan %>">
<meta name="keyword" content="<%= process.env.SiteSlogan %>">
<link rel="stylesheet" type="text/css" href="<%= process.env.staticurl %>/layui/css/layui.css">


Expand Down
6 changes: 3 additions & 3 deletions views/html-head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title><%= process.env.sitename %> - <%= pageTitle %></title>
<title><%= process.env.SiteName %> - <%= pageTitle %></title>
<link rel="shortcut icon" href="<%= process.env.staticurl %>/img/siteicon.png">
<meta name="description" content="<%= process.env.slogan %>">
<meta name="keyword" content="<%= process.env.slogan %>">
<meta name="description" content="<%= process.env.SiteSlogan %>">
<meta name="keyword" content="<%= process.env.SiteSlogan %>">

<link id="layui_theme_css" rel="stylesheet">
<link rel="stylesheet" href="https://npm.elemecdn.com/[email protected]/dist/css/mdui.min.css" />
Expand Down
14 changes: 7 additions & 7 deletions views/login_or_register.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<div class="layui-col-md6" style="padding: 30px 0 0 0px;">
<div id='login-page'>
<div class="mdui-typo-display-2">
<%= process.env.sitename %> 登录
<%= process.env.SiteName %> 登录
</div>

<div class="reply-form" style="height: max-content;">
Expand Down Expand Up @@ -56,7 +56,7 @@
<% if (reg==1) { %>
<div id='reg-page' style="display: none;">
<div class="mdui-typo-display-2">
<%= process.env.sitename %> 注册
<%= process.env.SiteName %> 注册
</div>
<div class="reply-form" style="height: max-content;">
Expand Down Expand Up @@ -85,7 +85,7 @@
<% } %>
<div id='getPW-page' style="display: none;">
<div class="mdui-typo-display-2">
<%= process.env.sitename %> 找回密码
<%= process.env.SiteName %> 找回密码
</div>
<div class="reply-form" style="height: max-content;">
<div>
Expand All @@ -109,7 +109,7 @@
<div class="mdui-dialog" id="privacy" style='border-radius: 15px;'>
<div class="mdui-dialog-title">您正在使用由孙悟元提供的服务</div>
<div class="mdui-dialog-content">
我们可能会收集您的个人信息,具体参见<a href="<%= process.env.privacypolicyurl %>" target="_blank"
我们可能会收集您的个人信息,具体参见<a href="<%= process.env.SitePrivacyPolicy %>" target="_blank"
class="mdui-text-color-blue">隐私策略</a><br />
<label class="mdui-checkbox">
<input type="checkbox" id="privacy-chick" />
Expand All @@ -124,22 +124,22 @@
我同意将我的个人数据传输到中国以外的地区
</label>
<br /><br />
<%= process.env.sitename %>上,你需要遵守<a href="https://scratch.mit.edu/community_guidelines" target="_blank"
<%= process.env.SiteName %>上,你需要遵守<a href="https://scratch.mit.edu/community_guidelines" target="_blank"
class="mdui-text-color-blue">社区行为准则(第三方站点)</a><br />
<label class="mdui-checkbox">
<input type="checkbox" id="zhunze-chick" />
<i class="mdui-checkbox-icon"></i>
我已阅读并同意将会遵守社区行为准则
</label>
<br /><br />
你需要同意<a href="<%= process.env.termsofserviceurl %>" target="_blank"
你需要同意<a href="<%= process.env.SiteTermsofService %>" target="_blank"
class="mdui-text-color-blue">用户协议</a><br />
<label class="mdui-checkbox">
<input type="checkbox" id="xiugai-chick" />
<i class="mdui-checkbox-icon"></i>
我已阅读并同意用户协议
</label>
<br /><br />对于技术手段绕过此页面的行为(视为对<%= process.env.sitename %>
<br /><br />对于技术手段绕过此页面的行为(视为对<%= process.env.SiteName %>
的基础设施进行攻击)涉嫌违法(法入侵计算机系统),我们将保留追究法律责任的权利,且违规获得的账号不受保护,如果您同意以上内容,请点击“复选框”以完成注册流程.
</div>

Expand Down
Loading

0 comments on commit ceaf1e1

Please sign in to comment.