-
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.
Merge pull request #31 from haitang000/DEV
👌 优化Icon随机逻辑
- Loading branch information
Showing
8 changed files
with
140 additions
and
5 deletions.
There are no files selected for viewing
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,8 @@ | ||
# Container image that runs your code | ||
FROM alpine:3.10 | ||
|
||
# Copies your code file from your action repository to the filesystem path `/` of the container | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
# Code file to execute when the docker container starts up (`entrypoint.sh`) | ||
ENTRYPOINT ["/entrypoint.sh"] |
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,16 @@ | ||
# action.yml | ||
name: 'XiaYanISeeYou' | ||
description: 'A ' | ||
inputs: | ||
who-to-greet: # id of input | ||
description: 'Who to greet' | ||
required: true | ||
default: 'World' | ||
outputs: | ||
time: # id of output | ||
description: 'The time we greeted you' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.who-to-greet }} |
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,49 @@ | ||
worker_processes 1; | ||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/json; | ||
|
||
sendfile on; | ||
|
||
keepalive_timeout 65; | ||
|
||
server { | ||
listen 18080; | ||
# 指定前端项目所在的位置(容器内的位置) | ||
location / { | ||
root /usr/share/static; | ||
} | ||
|
||
error_page 404 /404.html; | ||
location = /404.html { | ||
root static; | ||
} | ||
location /api { | ||
rewrite /api/(.*) /$1 break; | ||
# 容器在同一个网络,可以使用容器名访问,hamll就代表了其IP | ||
proxy_pass http://hmall:8080; | ||
} | ||
} | ||
server { | ||
listen 18081; | ||
# 指定前端项目所在的位置(容器内的位置) | ||
location / { | ||
root /usr/share/static; | ||
} | ||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root html; | ||
} | ||
location /api { | ||
rewrite /api/(.*) /$1 break; | ||
# 容器在同一个网络,可以使用容器名访问,hamll就代表了其IP | ||
proxy_pass http://hmall:8080; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,33 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> | ||
<meta name="Keywords" content="夏彦,夏彦照片墙,夏彦美图,夏彦卡面,夏彦I see you,xyicu"> | ||
<meta name="description" content="夏彦I see you❤ - 一个整理夏彦美图的网站"> | ||
|
||
<title>夏彦 I see you ❤</title> | ||
<link rel="stylesheet" href="styles/index-style.css"> | ||
<link rel="shortcut icon" href="image/icon/logo.jpg"> | ||
</head> | ||
|
||
<body> | ||
<div class="title"> | ||
<img src="image/icon/Study.png" id="maintenance-icon"> | ||
<h1 id="title-h1">当前服务正在进行维护</h1> | ||
<p id="title-p">您目前访问的网站正在维护,这可能需要较长时间,很抱歉为您带来不便</p> | ||
</div> | ||
<footer> | ||
<div class="footer-links-contianer"> | ||
<a class="footer-links" href="https://status.haitang000.top">网站运行状态</a> | ||
<a class="footer-links" href="https://afdian.com/a/haitang_HTUI">赞助作者</a> | ||
<a class="footer-links" href="https://github.com/haitang000/XiaYan-I-see-you">网站 GitHub 仓库</a> | ||
</div> | ||
</footer> | ||
</body> | ||
|
||
</html> | ||
|
||
<script src="script/cursor.js"></script> | ||
<script src="script/icon_random.js"></script> |
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 |
---|---|---|
@@ -1,7 +1,36 @@ | ||
window.onload = randomErrorIcon; | ||
/*window.onload = randomIcon; | ||
function randomErrorIcon (){ | ||
var ErrorIcon = new Array('image/icon/Thinking.png','image/icon/Cry.png','image/icon/Alone.png') | ||
var randomNum = Math.floor((Math.random() * ErrorIcon.length)); | ||
document.getElementById("error-icon").src = ErrorIcon[randomNum]; | ||
function randomIcon (){ | ||
//图片路径 | ||
var ErrorIcon = new Array('image/icon/Thinking.png','image/icon/Cry.png','image/icon/Cry2.png','image/icon/Alone.png') | ||
var MaintenanceIcon = new Array('image/icon/Study.png','image/icon/Thinking.png','image/icon/PlayWithPhone.png') | ||
//随机数生成 | ||
var randomNumError = Math.floor((Math.random() * ErrorIcon.length)); | ||
var randomNumMaintenance = Math.floor((Math.random() * MaintenanceIcon.length)); | ||
//替换图片 | ||
document.getElementById("error-icon").src = ErrorIcon[randomNumError]; | ||
document.getElementById("maintenance-icon").src = MaintenanceIcon[randomNumMaintenance]; | ||
}*/ | ||
|
||
window.onload = function() { | ||
randomIcon('error-icon', [ | ||
'image/icon/Thinking.png', | ||
'image/icon/Cry.png', | ||
'image/icon/Cry2.png', | ||
'image/icon/Alone.png' | ||
]); | ||
|
||
randomIcon('maintenance-icon', [ | ||
'image/icon/Study.png', | ||
'image/icon/Thinking.png', | ||
'image/icon/PlayWithPhone.png' | ||
]); | ||
}; | ||
|
||
function randomIcon(elementId, iconArray) { | ||
const element = document.getElementById(elementId); | ||
if (element) { | ||
const randomIndex = Math.floor(Math.random() * iconArray.length); | ||
element.src = iconArray[randomIndex]; | ||
} | ||
} |