随机发病,运势,冷笑话,段子
This commit is contained in:
90
frontend/60sapi/娱乐消遣/随机发病文学/css/background.css
Normal file
90
frontend/60sapi/娱乐消遣/随机发病文学/css/background.css
Normal file
@@ -0,0 +1,90 @@
|
||||
body {
|
||||
background-color: #1a1a1a;
|
||||
color: #e0e0e0;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#bg-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -2;
|
||||
overflow: hidden;
|
||||
transition: transform 0.2s ease-out;
|
||||
}
|
||||
|
||||
.floating-emoji {
|
||||
position: absolute;
|
||||
user-select: none;
|
||||
opacity: 0;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
|
||||
@keyframes float-top-to-bottom {
|
||||
0% { transform: translateY(-10vh) rotate(0deg); opacity: 0; }
|
||||
10%, 90% { opacity: 0.7; }
|
||||
100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
|
||||
}
|
||||
|
||||
@keyframes float-bottom-to-top {
|
||||
0% { transform: translateY(110vh) rotate(0deg); opacity: 0; }
|
||||
10%, 90% { opacity: 0.7; }
|
||||
100% { transform: translateY(-10vh) rotate(360deg); opacity: 0; }
|
||||
}
|
||||
|
||||
@keyframes float-left-to-right {
|
||||
0% { transform: translateX(-10vw) rotate(0deg); opacity: 0; }
|
||||
10%, 90% { opacity: 0.7; }
|
||||
100% { transform: translateX(110vw) rotate(360deg); opacity: 0; }
|
||||
}
|
||||
|
||||
@keyframes float-right-to-left {
|
||||
0% { transform: translateX(110vw) rotate(0deg); opacity: 0; }
|
||||
10%, 90% { opacity: 0.7; }
|
||||
100% { transform: translateX(-10vw) rotate(360deg); opacity: 0; }
|
||||
}
|
||||
|
||||
.text-fragment {
|
||||
position: absolute;
|
||||
font-size: 24px;
|
||||
color: rgba(255, 0, 255, 0.4);
|
||||
opacity: 0;
|
||||
animation: float-fragment 15s linear infinite, fade-in-out 15s linear infinite;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
@keyframes float-fragment {
|
||||
0% { transform: translate(0, 0) rotate(0deg); }
|
||||
25% { transform: translate(20px, 40px) rotate(15deg); }
|
||||
50% { transform: translate(-30px, -10px) rotate(-10deg); }
|
||||
75% { transform: translate(10px, -30px) rotate(5deg); }
|
||||
100% { transform: translate(0, 0) rotate(0deg); }
|
||||
}
|
||||
|
||||
@keyframes fade-in-out {
|
||||
0%, 100% { opacity: 0; }
|
||||
10%, 90% { opacity: 0.4; }
|
||||
}
|
||||
|
||||
.screen-crack {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M 100 100 L 0 0 M 100 100 L 200 0 M 100 100 L 50 200 M 100 100 L 150 200" stroke="rgba(255,255,255,0.5)" stroke-width="1" fill="none"/></svg>');
|
||||
opacity: 0;
|
||||
animation: flicker-crack 25s steps(1, end) infinite;
|
||||
}
|
||||
|
||||
@keyframes flicker-crack {
|
||||
0%, 100% { opacity: 0; }
|
||||
50% { opacity: 0.3; }
|
||||
51% { opacity: 0; }
|
||||
75% { opacity: 0.2; }
|
||||
76% { opacity: 0; }
|
||||
}
|
||||
235
frontend/60sapi/娱乐消遣/随机发病文学/css/style.css
Normal file
235
frontend/60sapi/娱乐消遣/随机发病文学/css/style.css
Normal file
@@ -0,0 +1,235 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
min-height: 100vh;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.content-card {
|
||||
background: rgba(20, 20, 20, 0.7);
|
||||
border: none;
|
||||
padding: 40px;
|
||||
max-width: 600px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
backdrop-filter: blur(5px);
|
||||
position: relative;
|
||||
clip-path: polygon(2% 5%, 97% 0%, 100% 95%, 0% 100%);
|
||||
}
|
||||
|
||||
.body-animated .content-card {
|
||||
animation: tremble 0.4s infinite, glitch-shadow 1.5s steps(1, end) infinite;
|
||||
}
|
||||
|
||||
@keyframes tremble {
|
||||
0% { clip-path: polygon(2% 5%, 97% 0%, 100% 95%, 0% 100%); }
|
||||
25% { clip-path: polygon(2% 5%, 98% 2%, 99% 100%, 1% 98%); }
|
||||
50% { clip-path: polygon(3% 4%, 96% 1%, 100% 96%, 2% 100%); }
|
||||
75% { clip-path: polygon(1% 6%, 97% 3%, 98% 95%, 0% 99%); }
|
||||
100% { clip-path: polygon(2% 5%, 97% 0%, 100% 95%, 0% 100%); }
|
||||
}
|
||||
|
||||
@keyframes glitch-shadow {
|
||||
0% {
|
||||
box-shadow:
|
||||
0 0 8px rgba(255, 0, 255, 0.5),
|
||||
inset 0 0 8px rgba(255, 0, 255, 0.4);
|
||||
}
|
||||
33% {
|
||||
box-shadow:
|
||||
0 0 8px rgba(0, 255, 255, 0.5),
|
||||
inset 0 0 8px rgba(0, 255, 255, 0.4);
|
||||
}
|
||||
66% {
|
||||
box-shadow:
|
||||
0 0 8px rgba(0, 255, 0, 0.5),
|
||||
inset 0 0 8px rgba(0, 255, 0, 0.4);
|
||||
}
|
||||
100% {
|
||||
box-shadow:
|
||||
0 0 8px rgba(255, 0, 255, 0.5),
|
||||
inset 0 0 8px rgba(255, 0, 255, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
#literature-text {
|
||||
font-size: 1.2em;
|
||||
line-height: 1.8;
|
||||
min-height: 100px;
|
||||
color: #e0e0e0;
|
||||
text-shadow: 0 0 5px rgba(0, 255, 135, 0.5);
|
||||
animation: text-flicker 15s linear infinite;
|
||||
}
|
||||
|
||||
.body-animated #literature-text {
|
||||
animation: text-flicker 15s linear infinite, text-shadow-glitch 2s steps(1, end) infinite;
|
||||
}
|
||||
|
||||
@keyframes text-flicker {
|
||||
0%, 100% { opacity: 1; }
|
||||
50.0% { opacity: 0.95; }
|
||||
50.5% { opacity: 1; }
|
||||
}
|
||||
|
||||
@keyframes text-shadow-glitch {
|
||||
0% {
|
||||
text-shadow:
|
||||
1px 0 0 rgba(255,0,255,0.5),
|
||||
-1px 0 0 rgba(0,255,255,0.5);
|
||||
}
|
||||
10% {
|
||||
text-shadow:
|
||||
-1px 0 0 rgba(255,0,255,0.5),
|
||||
1px 0 0 rgba(0,255,255,0.5);
|
||||
}
|
||||
11%, 100% {
|
||||
text-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.controls {
|
||||
margin-top: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
#new-literature-btn {
|
||||
background-color: #ff00ff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
padding: 12px 25px;
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
border-radius: 5px;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
|
||||
}
|
||||
|
||||
#new-literature-btn:hover {
|
||||
transform: scale(1.05);
|
||||
box-shadow: 0 0 15px #ff00ff, 0 0 30px #ff00ff;
|
||||
}
|
||||
|
||||
#new-literature-btn:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Animation Toggle Switch */
|
||||
.switch-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
.slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 4px;
|
||||
bottom: 4px;
|
||||
background-color: white;
|
||||
transition: .4s;
|
||||
}
|
||||
|
||||
input:checked + .slider {
|
||||
background-color: #ff00ff;
|
||||
}
|
||||
|
||||
input:checked + .slider:before {
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
.slider.round {
|
||||
border-radius: 34px;
|
||||
}
|
||||
|
||||
.slider.round:before {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Glitch Overlay & Animations */
|
||||
#glitch-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.body-animated #glitch-overlay {
|
||||
animation: color-shift 15s steps(1, end) infinite;
|
||||
}
|
||||
|
||||
@keyframes color-shift {
|
||||
0%, 100% { background: transparent; }
|
||||
10% { background: rgba(255, 0, 0, 0.05); }
|
||||
10.1% { background: transparent; }
|
||||
20% { background: rgba(0, 255, 0, 0.05); }
|
||||
20.1% { background: transparent; }
|
||||
30% { background: rgba(0, 0, 255, 0.05); }
|
||||
30.1% { background: transparent; }
|
||||
}
|
||||
|
||||
.flicker-block {
|
||||
position: absolute;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.body-animated .flicker-block {
|
||||
animation: flicker 3s infinite;
|
||||
}
|
||||
|
||||
@keyframes flicker {
|
||||
0%, 100% { opacity: 0; }
|
||||
50% { opacity: 1; }
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media (max-width: 768px) {
|
||||
.content-card {
|
||||
padding: 20px;
|
||||
}
|
||||
#literature-text {
|
||||
font-size: 1em;
|
||||
}
|
||||
.controls {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
34
frontend/60sapi/娱乐消遣/随机发病文学/index.html
Normal file
34
frontend/60sapi/娱乐消遣/随机发病文学/index.html
Normal file
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>随机发病文学</title>
|
||||
<link rel="stylesheet" href="css/background.css">
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="bg-container">
|
||||
</div>
|
||||
<div id="glitch-overlay"></div>
|
||||
|
||||
<div class="container">
|
||||
<div class="content-card">
|
||||
<p id="literature-text">正在加载发病文学...</p>
|
||||
</div>
|
||||
|
||||
<div class="controls">
|
||||
<button id="new-literature-btn">再疯一次</button>
|
||||
<div class="switch-container">
|
||||
<label for="animation-toggle">关闭动画</label>
|
||||
<label class="switch">
|
||||
<input type="checkbox" id="animation-toggle" checked>
|
||||
<span class="slider round"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
147
frontend/60sapi/娱乐消遣/随机发病文学/js/script.js
Normal file
147
frontend/60sapi/娱乐消遣/随机发病文学/js/script.js
Normal file
@@ -0,0 +1,147 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const literatureTextElem = document.getElementById('literature-text');
|
||||
const newLiteratureBtn = document.getElementById('new-literature-btn');
|
||||
const animationToggle = document.getElementById('animation-toggle');
|
||||
const bgContainer = document.getElementById('bg-container');
|
||||
const body = document.body;
|
||||
|
||||
const apiEndpoints = [
|
||||
'https://60s.api.shumengya.top/v2/fabing',
|
||||
// Add fallback APIs here if available
|
||||
];
|
||||
|
||||
let currentApiIndex = 0;
|
||||
|
||||
async function fetchLiterature() {
|
||||
literatureTextElem.textContent = '正在卖力发疯中...';
|
||||
literatureTextElem.style.opacity = '0.5';
|
||||
|
||||
try {
|
||||
const response = await fetch(apiEndpoints[currentApiIndex]);
|
||||
if (!response.ok) {
|
||||
throw new Error('Network response was not ok');
|
||||
}
|
||||
const data = await response.json();
|
||||
if (data.code === 200) {
|
||||
literatureTextElem.textContent = data.data.saying;
|
||||
} else {
|
||||
throw new Error('API returned an error');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Fetch error:', error);
|
||||
currentApiIndex = (currentApiIndex + 1) % apiEndpoints.length;
|
||||
if (currentApiIndex !== 0) {
|
||||
fetchLiterature(); // Retry with the next API
|
||||
} else {
|
||||
literatureTextElem.textContent = '疯不起来了,请稍后再试。';
|
||||
}
|
||||
} finally {
|
||||
literatureTextElem.style.opacity = '1';
|
||||
}
|
||||
}
|
||||
|
||||
function createFloatingEmojis() {
|
||||
const existingEmojis = bgContainer.querySelectorAll('.floating-emoji');
|
||||
existingEmojis.forEach(e => e.remove());
|
||||
|
||||
const emojis = ['🤯', '😵', '🤪', '🥴', '🤡', '👹', '👻', '💀', '💥', '🔥', '🌪️', '😵💫'];
|
||||
const animationNames = ['float-top-to-bottom', 'float-bottom-to-top', 'float-left-to-right', 'float-right-to-left'];
|
||||
const emojiCount = 25;
|
||||
|
||||
for (let i = 0; i < emojiCount; i++) {
|
||||
const emojiEl = document.createElement('div');
|
||||
emojiEl.className = 'floating-emoji';
|
||||
emojiEl.textContent = emojis[Math.floor(Math.random() * emojis.length)];
|
||||
|
||||
const animationName = animationNames[Math.floor(Math.random() * animationNames.length)];
|
||||
emojiEl.style.animationName = animationName;
|
||||
emojiEl.style.animationDuration = `${Math.random() * 10 + 15}s`; // 15-25 seconds
|
||||
emojiEl.style.animationDelay = `${Math.random() * 20}s`;
|
||||
emojiEl.style.fontSize = `${Math.random() * 20 + 20}px`;
|
||||
|
||||
// Set initial position based on animation direction
|
||||
if (animationName.includes('top') || animationName.includes('bottom')) { // Vertical movement
|
||||
emojiEl.style.left = `${Math.random() * 100}vw`;
|
||||
} else { // Horizontal movement
|
||||
emojiEl.style.top = `${Math.random() * 100}vh`;
|
||||
}
|
||||
|
||||
bgContainer.appendChild(emojiEl);
|
||||
}
|
||||
}
|
||||
|
||||
function createFragments() {
|
||||
const existingFragments = bgContainer.querySelectorAll('.text-fragment');
|
||||
existingFragments.forEach(f => f.remove());
|
||||
|
||||
const fragments = ['我', '疯', '了', '?', '!', '…', '救命', '为什么', '好烦', '啊啊啊'];
|
||||
for (let i = 0; i < 20; i++) {
|
||||
const frag = document.createElement('div');
|
||||
frag.className = 'text-fragment';
|
||||
frag.textContent = fragments[Math.floor(Math.random() * fragments.length)];
|
||||
frag.style.top = `${Math.random() * 100}%`;
|
||||
frag.style.left = `${Math.random() * 100}%`;
|
||||
frag.style.animationDelay = `${Math.random() * 15}s`;
|
||||
frag.style.fontSize = `${Math.random() * 12 + 12}px`;
|
||||
bgContainer.appendChild(frag);
|
||||
}
|
||||
}
|
||||
|
||||
function createCracks() {
|
||||
for (let i = 0; i < 2; i++) {
|
||||
const crack = document.createElement('div');
|
||||
crack.className = 'screen-crack';
|
||||
crack.style.top = `${Math.random() * 80}%`;
|
||||
crack.style.left = `${Math.random() * 80}%`;
|
||||
crack.style.transform = `rotate(${Math.random() * 360}deg)`;
|
||||
crack.style.animationDelay = `${Math.random() * 25}s`;
|
||||
bgContainer.appendChild(crack);
|
||||
}
|
||||
}
|
||||
|
||||
function createFlickerBlocks() {
|
||||
const glitchOverlay = document.getElementById('glitch-overlay');
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const block = document.createElement('div');
|
||||
block.className = 'flicker-block';
|
||||
block.style.width = `${Math.random() * 100 + 50}px`;
|
||||
block.style.height = `${Math.random() * 100 + 50}px`;
|
||||
block.style.top = `${Math.random() * 90}%`;
|
||||
block.style.left = `${Math.random() * 90}%`;
|
||||
block.style.animationDuration = `${Math.random() * 2 + 2}s`;
|
||||
block.style.animationDelay = `${Math.random() * 3}s`;
|
||||
glitchOverlay.appendChild(block);
|
||||
}
|
||||
}
|
||||
|
||||
function toggleAnimations() {
|
||||
if (animationToggle.checked) {
|
||||
body.classList.add('body-animated');
|
||||
} else {
|
||||
body.classList.remove('body-animated');
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('mousemove', (e) => {
|
||||
if (!animationToggle.checked) return;
|
||||
const x = (window.innerWidth / 2) - e.pageX;
|
||||
const y = (window.innerHeight / 2) - e.pageY;
|
||||
bgContainer.style.transform = `translateX(${x / 50}px) translateY(${y / 50}px)`;
|
||||
});
|
||||
|
||||
newLiteratureBtn.addEventListener('click', fetchLiterature);
|
||||
animationToggle.addEventListener('change', toggleAnimations);
|
||||
|
||||
// Initial setup
|
||||
createFloatingEmojis();
|
||||
createFragments();
|
||||
createCracks();
|
||||
createFlickerBlocks();
|
||||
toggleAnimations();
|
||||
fetchLiterature();
|
||||
|
||||
window.addEventListener('resize', () => {
|
||||
createFloatingEmojis();
|
||||
createFragments();
|
||||
});
|
||||
});
|
||||
47
frontend/60sapi/娱乐消遣/随机发病文学/接口集合.json
Normal file
47
frontend/60sapi/娱乐消遣/随机发病文学/接口集合.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"api_name": "60s-api",
|
||||
"api_version": "2.22.1",
|
||||
"api_docs": "https://docs.60s-api.viki.moe",
|
||||
"author": "Viki <hi@viki.moe>",
|
||||
"user_group": "595941841",
|
||||
"github_repo": "https://github.com/vikiboss/60s",
|
||||
"updated": "2025/09/01 11:12:08",
|
||||
"updated_at": 1756696328000,
|
||||
"endpoints": [
|
||||
"/v2/60s",
|
||||
"/v2/answer",
|
||||
"/v2/baike",
|
||||
"/v2/bili",
|
||||
"/v2/bing",
|
||||
"/v2/changya",
|
||||
"/v2/chemical",
|
||||
"/v2/douyin",
|
||||
"/v2/duanzi",
|
||||
"/v2/epic",
|
||||
"/v2/exchange_rate",
|
||||
"/v2/fabing",
|
||||
"/v2/hitokoto",
|
||||
"/v2/ip",
|
||||
"/v2/kfc",
|
||||
"/v2/luck",
|
||||
"/v2/maoyan",
|
||||
"/v2/today_in_history",
|
||||
"/v2/toutiao",
|
||||
"/v2/weibo",
|
||||
"/v2/zhihu",
|
||||
"/v2/lunar",
|
||||
"/v2/ai-news",
|
||||
"/v2/awesome-js",
|
||||
"/v2/qrcode",
|
||||
"/v2/dad-joke",
|
||||
"/v2/hacker-news/:type",
|
||||
"/v2/og",
|
||||
"/v2/hash",
|
||||
"/v2/fanyi",
|
||||
"/v2/fanyi/langs",
|
||||
"/v2/weather",
|
||||
"/v2/weather/forecast",
|
||||
"/v2/ncm-rank",
|
||||
"/v2/ncm-rank/:id"
|
||||
]
|
||||
}
|
||||
8
frontend/60sapi/娱乐消遣/随机发病文学/返回接口.json
Normal file
8
frontend/60sapi/娱乐消遣/随机发病文学/返回接口.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"code": 200,
|
||||
"message": "获取成功。数据来自官方/权威源头,以确保稳定与实时。开源地址 https://github.com/vikiboss/60s,反馈群 595941841",
|
||||
"data": {
|
||||
"index": 347,
|
||||
"duanzi": "我不想读书,主要是因为家里牛啊,猪啊羊啊都没人喂。"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user