1
0
forked from bot/app

feat: 配置项目的热修改

This commit is contained in:
远野千束 2024-03-30 19:24:09 +08:00
parent c15c604752
commit 9b2b0a7c7d
15 changed files with 11526 additions and 47 deletions

View File

@ -11,7 +11,7 @@ from liteyuki.utils.language import get_user_lang
from liteyuki.utils.ly_typing import T_Bot, T_MessageEvent
from liteyuki.utils.message import Markdown as md, send_markdown
from .reloader import Reloader
from liteyuki.utils.htmlrender import launch_browser, stop_browser
from liteyuki.utils import htmlrender
require("nonebot_plugin_alconna")
from nonebot_plugin_alconna import on_alconna, Alconna, Args, Subcommand, Arparma
@ -124,11 +124,11 @@ async def _(result: Arparma, event: T_MessageEvent, bot: T_Bot):
@driver.on_startup
async def on_startup():
await launch_browser()
htmlrender.browser = await htmlrender.get_browser()
nonebot.logger.info("Browser Started.")
@driver.on_shutdown
async def on_shutdown():
await stop_browser()
await htmlrender.shutdown_browser()
nonebot.logger.info("Browser Stopped.")

View File

@ -1,8 +1,9 @@
import requests
from nonebot.adapters.onebot.v11 import MessageSegment
from nonebot.permission import SUPERUSER
from liteyuki.utils.htmlrender import render_html
from liteyuki.utils.htmlrender import template_to_pic, html_to_pic
from liteyuki.utils.resource import get
from liteyuki.utils.resource import get_path
from nonebot import on_command
stats = on_command("stats", priority=5, permission=SUPERUSER)
@ -10,6 +11,9 @@ stats = on_command("stats", priority=5, permission=SUPERUSER)
@stats.handle()
async def _():
html = get("templates/stats.html")
html_bytes = await render_html(open(html, "r", encoding="utf-8").read())
await stats.finish(MessageSegment.image(html_bytes))
image_bytes = await template_to_pic(
template_path=get_path("templates/index.html", abs_path=True),
templates={}
)
await stats.finish(MessageSegment.image(image_bytes))

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiEyp8kv8JHgFVrJJbecmNE.woff2) format('woff2');
unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiEyp8kv8JHgFVrJJnecmNE.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiEyp8kv8JHgFVrJJfecg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiByp8kv8JHgFVrLEj6Z11lFc-K.woff2) format('woff2');
unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiByp8kv8JHgFVrLEj6Z1JlFc-K.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiByp8kv8JHgFVrLEj6Z1xlFQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* devanagari */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiByp8kv8JHgFVrLCz7Z11lFc-K.woff2) format('woff2');
unicode-range: U+0900-097F, U+1CD0-1CF6, U+1CF8-1CF9, U+200C-200D, U+20A8, U+20B9, U+25CC, U+A830-A839, U+A8E0-A8FB;
}
/* latin-ext */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiByp8kv8JHgFVrLCz7Z1JlFc-K.woff2) format('woff2');
unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Poppins';
font-style: normal;
font-weight: 700;
font-display: swap;
src: url(https://ks.liteyuki.icu:809/812/static/font/pxiByp8kv8JHgFVrLCz7Z1xlFQ.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

View File

@ -0,0 +1,6 @@
/**
* Owl Carousel v2.3.4
* Copyright 2013-2018 David Deutsch
* Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
*/
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(http://demo.mxyhn.xyz:8020/cssthemes6/3.31ZF02/css/owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}

View File

@ -0,0 +1,68 @@
@media (max-width: 1120px) {}
@media (max-width: 992px) {
.hero_area {
height: auto;
}
.custom_nav-container .nav_search-btn {
background-position: center;
margin-top: 10px;
}
.slider_section {
padding-top: 45px;
padding-bottom: 75px;
}
.info_items {
width: 100%;
}
}
@media (max-width: 768px) {
.contact_section .form_container {
padding: 45px 0;
}
.info_items {
flex-direction: column;
align-items: center;
}
.contact_section .heading_container {
justify-content: center;
}
.contact_section .heading_container h2::before {
left: 50%;
transform: translateX(-50%);
}
.contact_section button {
margin: 45px auto 0 auto;
}
}
@media (max-width: 576px) {
.slider_section .detail-box h1 {
font-size: 3rem;
}
}
@media (max-width: 480px) {}
@media (max-width: 420px) {
.slider_section .detail-box h1 {
letter-spacing: .3rem;
}
}
@media (max-width: 360px) {}
@media (min-width: 1200px) {
.container {
max-width: 1170px;
}
}

View File

@ -0,0 +1,623 @@
body {
font-family: "Poppins", sans-serif;
color: #000000;
background-color: #ffffff;
}
.layout_padding {
padding-top: 120px;
padding-bottom: 120px;
}
.layout_padding2 {
padding-top: 45px;
padding-bottom: 45px;
}
.layout_padding2-top {
padding-top: 45px;
}
.layout_padding2-bottom {
padding-bottom: 45px;
}
.layout_padding-top {
padding-top: 120px;
}
.layout_padding-bottom {
padding-bottom: 120px;
}
.heading_container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
text-align: center;
}
.heading_container h2 {
font-weight: bold;
position: relative;
padding-bottom: 15px;
text-transform: uppercase;
}
.heading_container h2::before {
content: "";
position: absolute;
bottom: 0;
left: 50%;
width: 55px;
height: 5px;
background-color: #a2d8f4;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
/*header section*/
.hero_area {
height: 100vh;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
background-image: url(https://ks.liteyuki.icu:809/812/static/image/hero-bg.png);
background-size: cover;
background-attachment: fixed;
background-position: center;
}
.sub_page .hero_area {
height: auto;
}
.sub_page .who_section.layout_padding {
padding-top: 0;
}
.hero_area.sub_pages {
height: auto;
}
.header_section .container-fluid {
padding-right: 25px;
padding-left: 25px;
}
.header_section .nav_container {
margin: 0 auto;
}
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link {
margin: 10px 30px;
padding: 0;
padding-bottom: 3px;
color: #ffffff;
text-align: center;
position: relative;
text-transform: uppercase;
font-size: 15px;
}
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item .nav-link::after {
display: none;
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 3px;
border-radius: 5px;
background-color: #ffffff;
}
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item.active a::after,
.custom_nav-container.navbar-expand-lg .navbar-nav .nav-item:hover a::after {
display: block;
background-color: #a2d8f4;
}
a,
a:hover,
a:focus {
text-decoration: none;
}
a:hover,
a:focus {
color: initial;
}
.btn,
.btn:focus {
outline: none !important;
-webkit-box-shadow: none;
box-shadow: none;
}
.user_option {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.user_option a {
color: #ffffff;
margin: 10px 30px;
}
.custom_nav-container .nav_search-btn {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/search-icon.png);
background-size: 22px;
background-repeat: no-repeat;
background-position-y: 7px;
width: 35px;
height: 35px;
padding: 0;
border: none;
}
.navbar-brand {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
position: relative;
}
.navbar-brand span {
font-size: 22px;
text-transform: uppercase;
font-weight: bold;
color: #ffffff;
position: relative;
z-index: 3;
}
.custom_nav-container {
z-index: 99999;
padding: 15px 0;
}
.custom_nav-container .navbar-toggler {
outline: none;
}
.custom_nav-container .navbar-toggler .navbar-toggler-icon {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/menu.png);
background-size: 55px;
}
/*end header section*/
.slider_section {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
color: #ffffff;
}
.slider_section #carouselExampleIndicators {
width: 100%;
}
.slider_section .row {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.slider_section .box {
margin: 125px 0;
}
.slider_section .detail-box {
text-align: center;
}
.slider_section .detail-box h1,
.slider_section .detail-box h2,
.slider_section .detail-box h3 {
text-transform: uppercase;
font-weight: bold;
}
.slider_section .detail-box h2 {
font-size: 2.5rem;
}
.slider_section .detail-box h1 {
font-size: 3.5rem;
font-weight: bold;
letter-spacing: 0.5rem;
}
.slider_section .detail-box p {
margin-top: 25px;
}
.slider_section .detail-box a {
display: inline-block;
padding: 8px 35px;
background-color: transparent;
border: 2px solid #ffffff;
color: #ffffff;
border-radius: 100px;
backdrop-filter: blur(10px);
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
text-transform: uppercase;
margin-top: 35px;
}
.slider_section .detail-box a:hover {
background-color: #ffffff;
color: #000000;
}
.slider_section #carouselExampleIndicators .carousel-indicators {
position: unset;
margin: 45px 0 0;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.slider_section #carouselExampleIndicators .carousel-indicators li {
width: 14px;
height: 14px;
background-color: transparent;
border: 2px solid #ffffff;
border-radius: 100%;
opacity: 1;
}
.slider_section #carouselExampleIndicators .carousel-indicators li.active {
border: 4px solid #ffffff;
}
.us_section {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/us-bg.jpg);
background-size: cover;
background-attachment: fixed;
color: #ffffff;
}
.us_section .us_container {
padding-top: 25px;
}
.us_section .us_container .box {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
text-align: center;
margin: 25px 10px 0 10px;
}
.us_section .us_container .box .img-box {
height: 100px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.us_section .us_container .box .img-box img {
max-width: 100%;
}
.us_section .us_container .box .detail-box h5 {
font-weight: bold;
}
.heathy_section {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/healthy-bg.jpg);
background-size: cover;
background-attachment: fixed;
color: #ffffff;
text-align: center;
}
.heathy_section h2 {
font-weight: bold;
}
.heathy_section p {
margin-top: 35px;
line-height: 1.8;
}
.heathy_section .btn-box {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
margin-top: 45px;
}
.heathy_section .btn-box a {
display: inline-block;
padding: 8px 35px;
background-color: transparent;
border: 1.5px solid #ffffff;
color: #ffffff;
border-radius: 0;
-webkit-transition: -webkit-transform 0.3s;
transition: -webkit-transform 0.3s;
transition: transform 0.3s;
transition: transform 0.3s, -webkit-transform 0.3s;
text-transform: uppercase;
}
.heathy_section .btn-box a:hover {
background-color: #ffffff;
color: #000000;
}
.trainer_section {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/trainer-bg.png);
background-position: center;
background-size: cover;
background-attachment: fixed;
color: #ffffff;
}
.trainer_section .box {
margin-top: 55px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
text-align: center;
}
.trainer_section .box .name h5 {
font-weight: bold;
margin-bottom: 15px;
}
.trainer_section .box .img-box {
border-radius: 15px;
overflow: hidden;
}
.trainer_section .box .img-box img {
width: 100%;
}
.trainer_section .box .social_box {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
width: 225px;
padding: 12px 45px;
background-color: rgba(255, 255, 255, 0.2);
border-radius: 50px;
backdrop-filter: blur(10px);
margin-top: -25px;
}
.contact_section {
position: relative;
background-color: #27223f;
color: #ffffff;
}
.contact_section .heading_container {
-webkit-box-pack: start;
-ms-flex-pack: start;
justify-content: start;
}
.contact_section .heading_container h2::before {
text-align: left;
left: 0;
-webkit-transform: none;
transform: none;
}
.contact_section .row {
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.contact_section .img-box img {
width: 100%;
}
.contact_section .form_container {
padding: 45px 0 45px 15px;
}
.contact_box {
padding: 25px 0 45px 15px;
}
.contact_section input {
width: 100%;
border: none;
background-color: #ffffff;
outline: none;
color: #000000;
margin-top: 25px;
padding: 12px;
}
.contact_section input::-webkit-input-placeholder {
color: #2a2a2c;
}
.contact_section input:-ms-input-placeholder {
color: #2a2a2c;
}
.contact_section input::-ms-input-placeholder {
color: #2a2a2c;
}
.contact_section input::placeholder {
color: #2a2a2c;
}
.contact_section input.message-box {
padding: 45px 12px;
}
.contact_section button {
padding: 10px 45px;
outline: none;
border: none;
color: #ffffff;
background: #a2d8f4;
margin: 20px 15px 20px 15px;
text-transform: uppercase;
border-radius: 80px;
}
.info_section {
background-color: #252233;
}
.info_items {
width: 70%;
margin: 0 auto;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.info_items .item {
width: 200px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
text-align: center;
}
.info_items .item .img-box {
width: 80px;
height: 80px;
border-radius: 100%;
background-repeat: no-repeat;
background-position: center;
}
.info_items .item .detail-box {
margin-top: 5px;
color: #fff;
}
.info_items {
position: relative;
}
.info_items a {
position: relative;
}
.info_items .item .img-box.box-1 {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/server.png);
}
.info_items .item .img-box.box-2 {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/group_fill.png);
}
.info_items .item .img-box.box-3 {
background-image: url(https://ks.liteyuki.icu:809/812/static/image/Web.png);
}
.info-btn {
color: #d0e9ff;
}
.info-btn:hover {
color: #a2d8f4;
}
/* footer section*/
.footer_section {
background-color: #a2d8f4;
padding: 20px;
font-weight: 500;
}
.footer_section p {
color: #fff;
margin: 0;
text-align: center;
}
.announce {
color: #a9a9a9;
font-size: 5px;
}
.footer_section a {
color: #292929;
}
#tips {
color: #999;
font-size: 80%;
}
/* end footer section*/
/*# sourceMappingURL=style.css.map */

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1,294 @@
<!DOCTYPE html>
<html lang="zh" xmlns="http://www.w3.org/1999/html">
<head>
<!-- Basic -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- Mobile Metas -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Liteyuki Server | An awesome server welcome you!</title>
<!-- slider stylesheet -->
<link rel="stylesheet" type="text/css" href="css/owl.carousel.min.css">
<!-- bootstrap core css -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<!-- fonts style -->
<link href="css/css.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
<!-- responsive style -->
<link href="css/responsive.css" rel="stylesheet">
<style>
.fixed-top-bar {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: rgba(162, 216, 244, 0.3);
color: white;
z-index: 100;
padding: 5px 5px; /* 调整顶栏的上下内边距 */
backdrop-filter: blur(10px); /* 设置高斯模糊效果,调整模糊程度 */
}
.fixed-top-bar {
/* ... 其他样式 ... */
display: flex;
justify-content: space-between; /* 将左侧和右侧内容分别放置两端 */
align-items: center;
}
.fixed-top-bar img {
margin-right: 5px; /* 调整图标和文字之间的间距 */
}
.buttons {
display: flex;
gap: 10px; /* 按钮之间的间隔 */
}
.btn {
padding: 5px 5px;
color: #d0e9ff; /* 按钮的文字颜色 */
border: none;
cursor: pointer;
}
.btn:hover {
color: #a2d8f4;
}
</style>
</head>
<body>
<div class="fixed-top-bar">
<!-- 固定顶栏内容 -->
<a class="navbar-brand" href="#">
<span><img src="https://ks.liteyuki.icu:809/static/img/liteyuki_icon.png" alt="liteyuki_icon" height="40"></span>
<span>Liteyuki</span>
</a>
<div class="buttons">
<a class="btn" href="https://qm.qq.com/q/PX6cjzXNCc">加入Q群</a>
<a class="btn" href="https://lab.liteyuki.icu">轻雪社区</a>
</div>
<!-- 其他固定顶栏的内容 -->
</div>
<div class="hero_area">
<!-- header section strats -->
<header class="header_section">
<div class="container-fluid">
<nav class="navbar navbar-expand-lg custom_nav-container">
<!-- <a class="navbar-brand" href="#">-->
<!-- </a>-->
</nav>
</div>
</header>
<!-- end header section -->
<!-- slider section -->
<section class="slider_section position-relative">
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="carousel-item active">
<div class="col-lg-10 col-md-11 mx-auto">
<div class="detail-box">
<div>
<h2>Liteyuki Server</h2>
<h3>轻雪公益插件服</h3>
<p>
Liteyuki Server 轻雪服务器是由雪萤工坊旗下轻雪工作室团队运营的一个公益性质的服务器,
我们致力于为玩家提供一个良好的游戏环境,让玩家能够在这里体验到最纯粹的游戏乐趣。服务器定期的活动,丰富的游戏玩法,以及良好的管理团队,都是我们的优势。
</p>
<div class="join-btn">
<a href="https://qm.qq.com/q/PX6cjzXNCc">加入聊天社群</a>
</div>
<p id="now-online">当前状态: 获取中...</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- end slider section -->
</div>
<section class="trainer_section layout_padding">
<div class="container">
<div class="heading_container">
<h2>管理团队</h2>
<!-- 此处您也可以选择展示自己服务器的图片。用途全由您决定 -->
</div>
<div class="row">
<div class="col-lg-4 col-md-6 mx-auto">
<div class="box">
<div class="name">
<h5>SnowyKami(SF_Kami)</h5>
</div>
<div class="img-box">
<img src="https://ks.liteyuki.icu:809/812/static/picture/t2.png" alt="">
</div>
<div class="social_box">
<a href="https://qm.qq.com/q/r6FqZZafmg">
<img src="https://ks.liteyuki.icu:809/812/static/picture/qq.png" alt="qq" height="20">
</a>
<a href="https://space.bilibili.com/233938750">
<img src="https://ks.liteyuki.icu:809/812/static/picture/bili.png" alt="bili" height="20">
</a>
<a href="https://snowykami.me">
<img src="https://ks.liteyuki.icu:809/812/static/picture/link.png" alt="link.png"
height="22">
</a>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 mx-auto">
<div class="box">
<div class="name">
<h5>LuoChenXi(LuoChenXil_)</h5>
</div>
<div class="img-box">
<img src="https://ks.liteyuki.icu:809/812/static/picture/t1.png" alt="">
</div>
<div class="social_box">
<a href="">
<img src="https://ks.liteyuki.icu:809/812/static/picture/qq.png" alt="" height="20">
</a>
<a href="">
<img src="https://ks.liteyuki.icu:809/812/static/picture/bili.png" alt="" height="20">
</a>
<a href="">
<img src="https://ks.liteyuki.icu:809/812/static/picture/email.png" alt="" height="16">
</a>
</div>
</div>
</div>
<!-- <div class="col-lg-4 col-md-6 mx-auto">-->
<!-- <div class="box">-->
<!-- <div class="name">-->
<!-- <h5>Alex</h5>-->
<!-- </div>-->
<!-- <div class="img-box">-->
<!-- <img src="static/picture/t3.png" alt="">-->
<!-- </div>-->
<!-- <div class="social_box">-->
<!-- <a href="#">-->
<!-- <img src="static/picture/WeChat.png" alt="">-->
<!-- </a>-->
<!-- <a href="#">-->
<!-- <img src="static/picture/QQ.png" alt="">-->
<!-- </a>-->
<!-- <a href="#">-->
<!-- <img src="static/picture/email.png" alt="">-->
<!-- </a>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</section>
<section class="contact_section">
<div class="container-fluid">
<div class="row">
<div class="col-md-6 px-0">
<div class="img-box">
<img src="https://ks.liteyuki.icu:809/812/static/picture/2023-08-31_02.16.03.png" alt="">
</div>
</div>
<div class="col-lg-5 col-md-6">
<div class="form_container pr-0 pr-lg-5 mr-0 mr-lg-2">
<div class="heading_container">
<h2>关于服务器</h2>
</div>
<div class="contact_box">
<p>
服务器目前装载了粘液科技系列tpa领地商店等基础功能插件。
</p>
<p>
服务器启用了正版验证和白名单,需要向管理员申请加入白名单,加入白名单后即可进入服务器游玩。<br><br>
暂时没有电脑没关系我们的服务器安装了Geyser支持基岩版进入。
</p>
<p>
服务器目前处于测试阶段欢迎大家加入我们的QQ群一起来玩耍。
</p>
<!-- <p class="announce">-->
<!-- <br>注意:本页所有文字、图片仅作演示,无实际意义,版权归原作者所有。<br>-->
<!-- ATTENTION: All words and pictures on this page are only for-->
<!-- demonstration.The copyright belongs to the original author.-->
<!-- </p>-->
<a href="https://qm.qq.com/q/PX6cjzXNCc" target="_blank">
<button>加入Q群</button>
</a>
<a href="https://lab.liteyuki.icu" target="_blank">
<button>加入社区</button>
</a>
<a href="https://afdian.net/a/snowykami" target="_blank">
<button>赞助我们</button>
</a>
<p id="tips">若QQ群链接无法打开请在QQ内打开点击或手动输入群号172811867</p>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="info_section layout_padding2">
<div class="container">
<div class="info_items">
<a href="#">
<div class="item">
<div class="img-box box-1"></div>
<div class="detail-box">
<p>
<a class="info-btn" href="https://mcstatus.io/status/java/mc.liteyuki.icu" target="_blank">
地址mc.liteyuki.icu</a>
</p>
</div>
</div>
</a>
<a href="#">
<div class="item">
<div class="img-box box-3"></div>
<div class="detail-box">
<p><a class="info-btn" href="https://liteyuki.icu" target="_blank">轻雪官网liteyuki.icu</a></p>
</div>
</div>
</a>
</div>
</div>
</section>
<footer class="container-fluid footer_section">
<p>
<a href="https://icp.gov.moe/?keyword=20240224" target="_blank">萌ICP备20240224号</a>
</p>
<p>
&copy; 2020-2024 Liteyuki Studio All rights reserved.
</p>
<p></p>
</footer>
<!-- footer section -->
<!-- 引入 jQuery -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!-- 引入 Bootstrap JavaScript 插件 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
<script src="js/server_api.js"></script>
</body>
</html>

View File

@ -0,0 +1,19 @@
let server_addr = "mc.liteyuki.icu";
let api_url = "https://api.mcstatus.io/v2/status/java/" + server_addr;
let server_status = document.getElementById("now-online");
fetch(api_url)
.then(response => {
console.log(response);
return response.json();
})
.then(data => {
if (data.online){
server_status.textContent = "当前状态: 在线 " + data.players.online + " / " +data.players.max;
} else {
server_status.textContent = "当前状态: 服务器离线";
}
}
)

View File

@ -1,6 +1,7 @@
import nonebot
from nonebot.log import logger
from nonebot.plugin import PluginMetadata
from playwright.async_api import Browser
from .browser import (
get_browser as get_browser,
@ -25,36 +26,4 @@ __plugin_meta__ = PluginMetadata(
extra={},
)
driver = nonebot.get_driver()
@driver.on_startup
async def init(**kwargs):
"""Start Browser
Returns:
Browser: Browser
"""
browser = await get_browser(**kwargs)
logger.info("Browser Started.")
return browser
@driver.on_shutdown
async def shutdown():
await shutdown_browser()
logger.info("Browser Stopped.")
browser_init = init
__all__ = [
"browser_init",
"capture_element",
"get_new_page",
"html_to_pic",
"md_to_pic",
"template_to_html",
"template_to_pic",
"text_to_pic",
]
browser: Browser

View File

@ -1,3 +1,4 @@
import os.path
from os import getcwd
from pathlib import Path
from typing import Literal, Optional, Union
@ -204,7 +205,6 @@ async def html_to_pic(
async def template_to_pic(
template_path: str,
template_name: str,
templates: dict,
pages: Optional[dict] = None,
wait: int = 0,
@ -216,7 +216,6 @@ async def template_to_pic(
Args:
template_path (str): 模板路径
template_name (str): 模板名
templates (dict): 模板内参数 : {"name": "abc"}
pages (dict): 网页参数 Defaults to
{"base_url": f"file://{getcwd()}", "viewport": {"width": 500, "height": 10}}
@ -234,10 +233,10 @@ async def template_to_pic(
}
template_env = jinja2.Environment( # noqa: S701
loader=jinja2.FileSystemLoader(template_path),
loader=jinja2.FileSystemLoader(os.path.dirname(template_path)),
enable_async=True,
)
template = template_env.get_template(template_name)
template = template_env.get_template(os.path.basename(template_path))
return await html_to_pic(
template_path=f"file://{template_path}",

View File

@ -43,12 +43,13 @@ def load_resource_from_dir(path: str):
_loaded_resource_packs.append(ResourceMetadata(**metadata))
def get(path: str, default: Any = None) -> str | Any:
def get_path(path: str, abs_path: bool = False, default: Any = None) -> str | Any:
"""
获取资源包中的文件
Args:
abs_path:
default: 默认
path: 文件相对路径
Returns: 文件绝对路径
"""
return _resource_data.get(path, default)
return _resource_data.get(path, default) if not abs_path else os.path.abspath(_resource_data.get(path, default))