Add announce page
Taken from http://prod.game1.ll.sdo.com/resources/maintenace/maintenance.php Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
+5
-1
@@ -8,6 +8,7 @@ import (
|
||||
"honoka-chan/encrypt"
|
||||
"honoka-chan/resp"
|
||||
"honoka-chan/utils"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -15,7 +16,10 @@ import (
|
||||
)
|
||||
|
||||
func AnnounceIndexHandler(ctx *gin.Context) {
|
||||
ctx.String(http.StatusOK, "Hello, world!")
|
||||
ctx.HTML(http.StatusOK, "announce.tmpl", gin.H{
|
||||
"title": "Love Live! 学园偶像祭 非官方服务器",
|
||||
"content": template.HTML("目前开发完毕的功能包括:登录、相册、Live、个人信息。<br>其他功能仍在开发中,有报错属于正常现象。"),
|
||||
})
|
||||
}
|
||||
|
||||
func AnnounceCheckStateHandler(ctx *gin.Context) {
|
||||
|
||||
@@ -22,6 +22,8 @@ func main() {
|
||||
} else {
|
||||
// Router
|
||||
r := gin.Default()
|
||||
r.Static("/static", "static")
|
||||
r.LoadHTMLGlob("static/*.tmpl")
|
||||
|
||||
// /
|
||||
r.Any("/", func(ctx *gin.Context) {
|
||||
@@ -77,7 +79,7 @@ func main() {
|
||||
m.POST("/album/seriesAll", handler.AlbumSeriesAllHandler)
|
||||
|
||||
}
|
||||
r.GET("/webview.php/announce/index", handler.AnnounceIndexHandler, middleware.KlabHeader)
|
||||
r.GET("/webview.php/announce/index", handler.AnnounceIndexHandler)
|
||||
// Server APIs
|
||||
|
||||
r.Run(":8080") // listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
{{ define "announce.tmpl" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="viewport" content="width=880, target-densitydpi=device-dpi, user-scalable=no">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<title>{{ .title }}</title>
|
||||
<link rel="stylesheet" href="/static/css/base.css">
|
||||
<link rel="stylesheet" href="/static/css/window.css">
|
||||
<link rel="stylesheet" href="/static/css/perfect-scrollbar.css">
|
||||
<link rel="stylesheet" href="/static/css/ll-perfect-scrollbar.css">
|
||||
<style>
|
||||
h2 {
|
||||
color: red;
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
p + p {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.update-link {
|
||||
color: #0be;
|
||||
display: block;
|
||||
font-size: 150%;
|
||||
margin: 20px auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.notice {
|
||||
color: red;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="no-back">
|
||||
<div id="outer">
|
||||
<div id="inner">
|
||||
<div id="header">
|
||||
<h1>{{ .title }}</h1>
|
||||
</div>
|
||||
<div id="body">
|
||||
<p>{{ .content }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/js/perfect-scrollbar.min.js"></script>
|
||||
<script>
|
||||
new PerfectScrollbar('#body', {suppressScrollX: true});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,80 @@
|
||||
@charset "utf-8";
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-user-select: none;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
|
||||
body {
|
||||
box-sizing: border-box;
|
||||
color: #191919;
|
||||
font-family: sans-serif;
|
||||
font-size: 22px;
|
||||
width: 880px;
|
||||
-webkit-text-size-adjust : 100%;
|
||||
}
|
||||
|
||||
#body {
|
||||
height: 542px;
|
||||
position: relative;
|
||||
width: 880px;
|
||||
}
|
||||
|
||||
.with-scroll #body {
|
||||
padding: 0 19px 0 13px;
|
||||
width: 848px;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
-webkit-user-select: auto;
|
||||
}
|
||||
|
||||
.clearfix {
|
||||
clear: both;
|
||||
content: ".";
|
||||
display: block;
|
||||
font-size: 0;
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.border1 {
|
||||
background-image: url("../../img/common/border1.png?r=20220516");
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
height: 34px;
|
||||
min-width: 500px;
|
||||
}
|
||||
|
||||
.table {
|
||||
border-collapse: collapse;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
border: 1px solid #fc6399;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
.table th {
|
||||
background-color: lightpink;
|
||||
}
|
||||
|
||||
.table.table-striped > tbody > tr:nth-child(odd) {
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.table.table-striped > tbody > tr:nth-child(even) {
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
ul, ol, dl {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-left: 1em;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
.ps__rail-x,
|
||||
.ps__rail-y {
|
||||
background-color: #ffd0e8 !important;
|
||||
border-radius: 10px !important;
|
||||
display: block !important;
|
||||
opacity: 0.8 !important;
|
||||
}
|
||||
|
||||
.ps__rail-x {
|
||||
height: 6px !important;
|
||||
}
|
||||
.ps__rail-y {
|
||||
width: 6px !important;
|
||||
}
|
||||
|
||||
.ps__thumb-x,
|
||||
.ps__thumb-y {
|
||||
background-color: #ff80af !important;
|
||||
border-radius: 10px !important;
|
||||
opacity: 0.8 !important;
|
||||
}
|
||||
|
||||
.ps__thumb-x {
|
||||
height: 6px !important;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.ps__thumb-y {
|
||||
width: 6px !important;
|
||||
right: 0;
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
* Container style
|
||||
*/
|
||||
.ps {
|
||||
overflow: hidden !important;
|
||||
overflow-anchor: none;
|
||||
-ms-overflow-style: none;
|
||||
touch-action: auto;
|
||||
-ms-touch-action: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scrollbar rail styles
|
||||
*/
|
||||
.ps__rail-x {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
transition: background-color .2s linear, opacity .2s linear;
|
||||
-webkit-transition: background-color .2s linear, opacity .2s linear;
|
||||
height: 15px;
|
||||
/* there must be 'bottom' or 'top' for ps__rail-x */
|
||||
bottom: 0px;
|
||||
/* please don't change 'position' */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.ps__rail-y {
|
||||
display: none;
|
||||
opacity: 0;
|
||||
transition: background-color .2s linear, opacity .2s linear;
|
||||
-webkit-transition: background-color .2s linear, opacity .2s linear;
|
||||
width: 15px;
|
||||
/* there must be 'right' or 'left' for ps__rail-y */
|
||||
right: 0;
|
||||
/* please don't change 'position' */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.ps--active-x > .ps__rail-x,
|
||||
.ps--active-y > .ps__rail-y {
|
||||
display: block;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.ps:hover > .ps__rail-x,
|
||||
.ps:hover > .ps__rail-y,
|
||||
.ps--focus > .ps__rail-x,
|
||||
.ps--focus > .ps__rail-y,
|
||||
.ps--scrolling-x > .ps__rail-x,
|
||||
.ps--scrolling-y > .ps__rail-y {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.ps .ps__rail-x:hover,
|
||||
.ps .ps__rail-y:hover,
|
||||
.ps .ps__rail-x:focus,
|
||||
.ps .ps__rail-y:focus,
|
||||
.ps .ps__rail-x.ps--clicking,
|
||||
.ps .ps__rail-y.ps--clicking {
|
||||
background-color: #eee;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
/*
|
||||
* Scrollbar thumb styles
|
||||
*/
|
||||
.ps__thumb-x {
|
||||
background-color: #aaa;
|
||||
border-radius: 6px;
|
||||
transition: background-color .2s linear, height .2s ease-in-out;
|
||||
-webkit-transition: background-color .2s linear, height .2s ease-in-out;
|
||||
height: 6px;
|
||||
/* there must be 'bottom' for ps__thumb-x */
|
||||
bottom: 2px;
|
||||
/* please don't change 'position' */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.ps__thumb-y {
|
||||
background-color: #aaa;
|
||||
border-radius: 6px;
|
||||
transition: background-color .2s linear, width .2s ease-in-out;
|
||||
-webkit-transition: background-color .2s linear, width .2s ease-in-out;
|
||||
width: 6px;
|
||||
/* there must be 'right' for ps__thumb-y */
|
||||
right: 2px;
|
||||
/* please don't change 'position' */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.ps__rail-x:hover > .ps__thumb-x,
|
||||
.ps__rail-x:focus > .ps__thumb-x,
|
||||
.ps__rail-x.ps--clicking .ps__thumb-x {
|
||||
background-color: #999;
|
||||
height: 11px;
|
||||
}
|
||||
|
||||
.ps__rail-y:hover > .ps__thumb-y,
|
||||
.ps__rail-y:focus > .ps__thumb-y,
|
||||
.ps__rail-y.ps--clicking .ps__thumb-y {
|
||||
background-color: #999;
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
/* MS supports */
|
||||
@supports (-ms-overflow-style: none) {
|
||||
.ps {
|
||||
overflow: auto !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
||||
.ps {
|
||||
overflow: auto !important;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
@charset "utf-8";
|
||||
|
||||
#outer {
|
||||
background-color: white;
|
||||
border: 2px solid white;
|
||||
border-radius: 14px;
|
||||
box-shadow: 3px 3px 0 0 #cecccd;
|
||||
display: block;
|
||||
height: 529px;
|
||||
margin: 0 3px 3px 0;
|
||||
width: 873px;
|
||||
}
|
||||
|
||||
#inner {
|
||||
border: 2px solid #fc6399;
|
||||
border-radius: 12px;
|
||||
height: 525px;
|
||||
width: 869px;
|
||||
}
|
||||
|
||||
#header {
|
||||
margin-bottom: -3px;
|
||||
padding: 3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.no-header #header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
h1 {
|
||||
background-color: #fc6399;
|
||||
border-radius: 9px;
|
||||
color: white;
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
height: 57px;
|
||||
line-height: 57px;
|
||||
padding: 0 9px 0 44px;
|
||||
width: 810px;
|
||||
}
|
||||
|
||||
.no-back h1 {
|
||||
padding-left: 15px;
|
||||
width: 839px;
|
||||
}
|
||||
|
||||
#back {
|
||||
background-image: url("../../img/common/button_back.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: contain;
|
||||
left: 7px;
|
||||
height: 40px;
|
||||
position: absolute;
|
||||
top: 11px;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
#back.tapped {
|
||||
background-image: url("../../img/common/button_back_se.png");
|
||||
}
|
||||
|
||||
.no-back #back {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#body {
|
||||
height: 455px;
|
||||
margin: 5px 3px 5px;
|
||||
padding: 0 19px 0 13px;
|
||||
position: relative;
|
||||
width: 831px;
|
||||
}
|
||||
|
||||
.no-header #body {
|
||||
height: 515px;
|
||||
}
|
||||
Vendored
+6
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user