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">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>One API</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css"> <!-- 引入样式文件 -->
|
| 8 |
+
<style>
|
| 9 |
+
body {
|
| 10 |
+
margin: 0;
|
| 11 |
+
font-family: Arial, sans-serif;
|
| 12 |
+
display: flex;
|
| 13 |
+
justify-content: flex-start; /* 左对齐 */
|
| 14 |
+
align-items: center;
|
| 15 |
+
height: 100vh;
|
| 16 |
+
background-size: cover;
|
| 17 |
+
background-position: center;
|
| 18 |
+
transition: background-image 1s ease-in-out;
|
| 19 |
+
color: white;
|
| 20 |
+
padding: 0 20px; /* 减少左右内边距 */
|
| 21 |
+
}
|
| 22 |
+
.container {
|
| 23 |
+
max-width: 600px;
|
| 24 |
+
width: 100%; /* 使容器宽度适应屏幕 */
|
| 25 |
+
}
|
| 26 |
+
h1 {
|
| 27 |
+
font-size: 48px;
|
| 28 |
+
margin-bottom: 30px;
|
| 29 |
+
text-shadow: 2px 2px 0 black; /* 添加黑色描边 */
|
| 30 |
+
}
|
| 31 |
+
p {
|
| 32 |
+
font-size: 18px;
|
| 33 |
+
margin-bottom: 30px;
|
| 34 |
+
text-shadow: 1px 1px 0 black; /* 添加黑色描边 */
|
| 35 |
+
}
|
| 36 |
+
.button-container {
|
| 37 |
+
display: flex; /* 使用 flexbox */
|
| 38 |
+
flex-wrap: wrap; /* 允许换行 */
|
| 39 |
+
justify-content: flex-start; /* 左对齐 */
|
| 40 |
+
}
|
| 41 |
+
button {
|
| 42 |
+
padding: 10px 20px;
|
| 43 |
+
background-color: black; /* 设置按钮背景色为黑色 */
|
| 44 |
+
border: none;
|
| 45 |
+
border-radius: 5px;
|
| 46 |
+
color: white;
|
| 47 |
+
text-decoration: none;
|
| 48 |
+
font-size: 16px;
|
| 49 |
+
margin-right: 10px; /* 添加按钮之间的右间隔 */
|
| 50 |
+
margin-bottom: 10px; /* 添加按钮底部间隔 */
|
| 51 |
+
transition: background-color 0.3s;
|
| 52 |
+
}
|
| 53 |
+
button:hover {
|
| 54 |
+
background-color: rgba(255, 255, 255, 0.5);
|
| 55 |
+
}
|
| 56 |
+
</style>
|
| 57 |
+
</head>
|
| 58 |
+
<body>
|
| 59 |
+
<div class="container">
|
| 60 |
+
<h1>New API</h1>
|
| 61 |
+
<p>由HongShi使用NewAPI搭建的API网站,仅限Linux.do用户使用,支持的模型列表请查看关于页面。</p>
|
| 62 |
+
|
| 63 |
+
<div class="button-container">
|
| 64 |
+
<button onclick="window.open('https://home.hongshi.us.kg', '_blank')">
|
| 65 |
+
<div class="svg-wrapper-1">
|
| 66 |
+
<div class="svg-wrapper">
|
| 67 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
| 68 |
+
<path fill="none" d="M0 0h24v24H0z"></path>
|
| 69 |
+
<path fill="currentColor" d="M1.946 9.315c-.522-.174-.527-.455.01-.634l19.087-6.362c.529-.176.832.12.684.638l-5.454 19.086c-.15.529-.455.547-.679.045L12 14l6-8-8 6-8.054-2.685z"></path>
|
| 70 |
+
</svg>
|
| 71 |
+
</div>
|
| 72 |
+
</div>
|
| 73 |
+
<span>我的主页</span>
|
| 74 |
+
</button>
|
| 75 |
+
|
| 76 |
+
<button onclick="window.open('https://api.hongshi.me/about', '_blank')">
|
| 77 |
+
<div class="svg-wrapper-1">
|
| 78 |
+
<div class="svg-wrapper">
|
| 79 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
| 80 |
+
<path fill="none" d="M0 0h24v24H0z"></path>
|
| 81 |
+
<path fill="currentColor" d="M1.946 9.315c-.522-.174-.527-.455.01-.634l19.087-6.362c.529-.176.832.12.684.638l-5.454 19.086c-.15.529-.455.547-.679.045L12 14l6-8-8 6-8.054-2.685z"></path>
|
| 82 |
+
</svg>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
<span>关于页面</span>
|
| 86 |
+
</button>
|
| 87 |
+
|
| 88 |
+
<button onclick="window.open('https://thanks.hongshi-app.us.kg', '_blank')">
|
| 89 |
+
<div class="svg-wrapper-1">
|
| 90 |
+
<div class="svg-wrapper">
|
| 91 |
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
| 92 |
+
<path fill="none" d="M0 0h24v24H0z"></path>
|
| 93 |
+
<path fill="currentColor" d="M1.946 9.315c-.522-.174-.527-.455.01-.634l19.087-6.362c.529-.176.832.12.684.638l-5.454 19.086c-.15.529-.455.547-.679.045L12 14l6-8-8 6-8.054-2.685z"></path>
|
| 94 |
+
</svg>
|
| 95 |
+
</div>
|
| 96 |
+
</div>
|
| 97 |
+
<span>感谢名单</span>
|
| 98 |
+
</button>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<script>
|
| 103 |
+
// 壁纸链接
|
| 104 |
+
const desktopWallpapers = [
|
| 105 |
+
'./background1.jpg',
|
| 106 |
+
'./background2.jpg',
|
| 107 |
+
'./background3.jpg',
|
| 108 |
+
'./background4.jpg',
|
| 109 |
+
'./background5.jpg',
|
| 110 |
+
'./background6.jpg',
|
| 111 |
+
'./background7.jpg',
|
| 112 |
+
'./background8.jpg',
|
| 113 |
+
'./background9.jpg',
|
| 114 |
+
'./background10.jpg'
|
| 115 |
+
];
|
| 116 |
+
const mobileWallpapers = [
|
| 117 |
+
'./m-background1.jpg',
|
| 118 |
+
'./m-background2.jpg',
|
| 119 |
+
'./m-background3.jpg',
|
| 120 |
+
'./m-background4.jpg',
|
| 121 |
+
'./m-background5.jpg',
|
| 122 |
+
'./m-background6.jpg',
|
| 123 |
+
'./m-background7.jpg',
|
| 124 |
+
'./m-background8.jpg',
|
| 125 |
+
'./m-background9.jpg',
|
| 126 |
+
'./m-background10.jpg'
|
| 127 |
+
];
|
| 128 |
+
// 根据设备类型选择壁纸
|
| 129 |
+
const isMobile = window.innerWidth <= 768; // 768px 以下为移动端
|
| 130 |
+
const wallpapers = isMobile ? mobileWallpapers : desktopWallpapers;
|
| 131 |
+
let currentIndex = 0;
|
| 132 |
+
// 随机选择一张壁纸作为初始背景
|
| 133 |
+
function getRandomIndex() {
|
| 134 |
+
return Math.floor(Math.random() * wallpapers.length);
|
| 135 |
+
}
|
| 136 |
+
currentIndex = getRandomIndex();
|
| 137 |
+
document.body.style.backgroundImage = `url(${wallpapers[currentIndex]})`;
|
| 138 |
+
// 调整样式
|
| 139 |
+
if (isMobile) {
|
| 140 |
+
document.body.style.padding = "0 20px"; /* 修改整体内边距 */
|
| 141 |
+
document.querySelector(".container").style.maxWidth = "100%"; /* 移除最大宽度限制 */
|
| 142 |
+
}
|
| 143 |
+
</script>
|
| 144 |
+
</body>
|
| 145 |
+
</html>
|