-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 81347f3
Showing
8 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Xiaomayisjh's Minecraft Server</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Xiaomayisjh's Minecraft Server</h1> | ||
<h2>bj3.mossfrp.cn:42031</h2> | ||
<button class="copy-button" onclick="copyToClipboard()">Copy</button> | ||
<div class="language-toggle"> | ||
<button onclick="switchLanguage('en')">English</button> | ||
<button onclick="switchLanguage('zh')">中文</button> | ||
</div> | ||
<div id="description" class="description"> | ||
<!-- Description content will be updated dynamically --> | ||
</div> | ||
<button id="downloadButton" class="download-button" onclick="downloadServer()">Download PCL 2.0</button> | ||
</div> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const descriptions = { | ||
en: "Welcome to the Minecraft server in Class 7! Explore our wonderful world. \nVersion 1.20.2 original, username only supports English and numbers.\nBackup Download:", | ||
zh: "欢迎来到7班的Minecraft服务器!探索我们的精彩世界\n版本号1.20.2原版,用户名仅支持英文及数字\n备用下载:https://ltcat.lanzoum.com/b0aj6gsid(提取码:pcl2)" | ||
}; | ||
|
||
function switchLanguage(language) { | ||
document.getElementById('description').innerText = descriptions[language]; | ||
} | ||
|
||
function downloadServer(url) { | ||
// Add your download logic here | ||
alert("Downloading..."); | ||
function downloadServer(url) { | ||
const a = document.createElement('a'); | ||
a.href = url; | ||
a.download = '文件名'; | ||
a.style.display = 'none'; | ||
document.body.appendChild(a); | ||
a.click(); | ||
document.body.removeChild(a); | ||
} | ||
|
||
downloadServer('https://gitee.com/xiaomayisjh/mc/raw/master/Plain%20Craft%20Launcher%202.exe'); | ||
} | ||
function copyToClipboard() { | ||
const h2 = document.querySelector('h2'); | ||
const range = document.createRange(); | ||
const selection = window.getSelection(); | ||
range.selectNodeContents(h2); | ||
selection.removeAllRanges(); | ||
selection.addRange(range); | ||
document.execCommand('copy'); | ||
selection.removeAllRanges(); | ||
alert('服务器地址已复制到剪贴板,请粘贴至多人游戏的"添加服务器"中'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: #f4f4f4; | ||
margin: 0; | ||
padding: 0; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
} | ||
|
||
.container { | ||
text-align: center; | ||
background-color: #fff; | ||
padding: 20px; | ||
border-radius: 10px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
} | ||
|
||
.language-toggle button { | ||
margin: 5px; | ||
padding: 8px 16px; | ||
font-size: 14px; | ||
cursor: pointer; | ||
} | ||
|
||
.description { | ||
margin-top: 20px; | ||
} | ||
|
||
.download-button { | ||
margin-top: 20px; | ||
padding: 10px 20px; | ||
font-size: 18px; | ||
background-color: #4caf50; | ||
color: #fff; | ||
border: none; | ||
border-radius: 5px; | ||
cursor: pointer; | ||
} |