修改主页
This commit is contained in:
131
public/blog/index.php
Executable file → Normal file
131
public/blog/index.php
Executable file → Normal file
@@ -1,12 +1,19 @@
|
|||||||
<!-- blog主页 -->
|
<!-- 主页 -->
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>首页 | ww3</title>
|
<title>首页 | ww3</title>
|
||||||
<meta charset="utf-8" lang="zh-CN">
|
<meta charset="utf-8" lang="zh-CN">
|
||||||
<link rel="icon" type="image/x-icon" href="./icon/original.ico">
|
<link rel="icon" type="image/x-icon" href="./icon/original.ico">
|
||||||
|
<!-- 引入页面蓝图css -->
|
||||||
|
<link rel="stylesheet" type="text/css" href="./src/css/main.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="black_block"> <!-- 黑色透明背景居中 -->
|
<div id="app-canvas">
|
||||||
|
|
||||||
|
<header>
|
||||||
|
<h1 style="margin: 40px 0 60px 0; color:aqua;">open-ww3-project</h1>
|
||||||
|
</header>
|
||||||
|
<!-- 导航栏 -->
|
||||||
<div id="navbar1">
|
<div id="navbar1">
|
||||||
<table border="0" style="background-color: rgba(147, 185, 255, 0.644);">
|
<table border="0" style="background-color: rgba(147, 185, 255, 0.644);">
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -15,7 +22,7 @@
|
|||||||
<td id="td_navbar_40px"><b><a href="https://ww3.tw/blog/about/" id="url_">关于</a></b></td>
|
<td id="td_navbar_40px"><b><a href="https://ww3.tw/blog/about/" id="url_">关于</a></b></td>
|
||||||
<td id="td_navbar_40px"><b><a href="https://ww3.tw/blog/post/" id="url_">文章</a></b></td>
|
<td id="td_navbar_40px"><b><a href="https://ww3.tw/blog/post/" id="url_">文章</a></b></td>
|
||||||
<td id="td_navbar_75px"><b><a href="https://ww3.tw/jumping-message/" id="url_">弹幕留言</a></b></td>
|
<td id="td_navbar_75px"><b><a href="https://ww3.tw/jumping-message/" id="url_">弹幕留言</a></b></td>
|
||||||
<td id="td_navbar_75px"><b><a href="https://ww3.tw/short-url/" id="url_">短链生成</a></b></td>
|
<td id="td_navbar_78px"><b><a href="https://ww3.tw/short-url/" id="url_">短链生成</a></b></td>
|
||||||
<td id="td_navbar_52px"><b><a href="https://gitea.ww3.tw/skimrme/" id="url_">gitea</a></b></td>
|
<td id="td_navbar_52px"><b><a href="https://gitea.ww3.tw/skimrme/" id="url_">gitea</a></b></td>
|
||||||
<td id="td_navbar_135px"><b><a href="https://ww3.tw/docker-registry/" id="url_">docker-registry</a></b></td>
|
<td id="td_navbar_135px"><b><a href="https://ww3.tw/docker-registry/" id="url_">docker-registry</a></b></td>
|
||||||
<td id="td_navbar_40px"><b><a href="https://api.ww3.tw/" id="url_">api</a></b></td>
|
<td id="td_navbar_40px"><b><a href="https://api.ww3.tw/" id="url_">api</a></b></td>
|
||||||
@@ -24,10 +31,15 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
|
||||||
|
<!-- 导航栏 -->
|
||||||
|
<div id="content-area">
|
||||||
|
<!--div>
|
||||||
|
<img id="open-ww3-project-img" width="10%" src="../src/img/open-ww3-project.png" alt="open-ww3-project-img">
|
||||||
|
</div-->
|
||||||
<!-- 屑站日志 -->
|
<!-- 屑站日志 -->
|
||||||
|
<h3 style="margin: 70px 0 30px -50px;">屑站日志:<br></h3>
|
||||||
<div id="logs">
|
<div id="logs">
|
||||||
<h3>屑站日志:<br></h3>
|
|
||||||
<font size="3.2">
|
<font size="3.2">
|
||||||
<table border="0">
|
<table border="0">
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -35,15 +47,12 @@
|
|||||||
// 引入数据库 sqlite
|
// 引入数据库 sqlite
|
||||||
include "./logs.php.text";
|
include "./logs.php.text";
|
||||||
?>
|
?>
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</font>
|
</font>
|
||||||
</div>
|
</div>
|
||||||
<!-- 屑站日志 -->
|
<!-- 屑站日志 -->
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<img id="open-ww3-project-img" width="10%" src="./src/img/open-ww3-project.png" alt="open-ww3-project-img">
|
|
||||||
<div id="post_content">
|
<div id="post_content">
|
||||||
<?php
|
<?php
|
||||||
//include "post/index.php";
|
//include "post/index.php";
|
||||||
@@ -91,61 +100,28 @@
|
|||||||
// 关闭数据库连接
|
// 关闭数据库连接
|
||||||
$db->close();
|
$db->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<!-- gitea 图标 -->
|
|
||||||
<a style="background-color: blueviolet; position: absolute;" href="https://gitea.ww3.tw/skimrme/open-ww3-project-ww3-tw">
|
</div>
|
||||||
<img id="gitea-img" src="https://gitea.ww3.tw/assets/img/logo.svg" width="7.5%" alt="gitea" >
|
|
||||||
</a>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- css 部分 -->
|
||||||
<style>
|
<style>
|
||||||
#gitea-img
|
#navbar1 {
|
||||||
{
|
margin: -160px 0 100px -30px;
|
||||||
overflow: auto;
|
|
||||||
/* up、right、down、left */
|
|
||||||
margin: -610px 0px 0px 1064px; /* 1064 */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#open-ww3-project-img
|
|
||||||
{
|
|
||||||
overflow: auto;
|
|
||||||
/* up、right、down、left */
|
|
||||||
margin: -320px 0px 0px -10px;
|
|
||||||
}
|
|
||||||
#post_content
|
|
||||||
{
|
|
||||||
/*text-align: center;*/
|
|
||||||
height: 500px;
|
|
||||||
width: 450px;
|
|
||||||
color: rgb(202, 202, 202);
|
|
||||||
overflow: auto;
|
|
||||||
/* up、right、down、left */
|
|
||||||
margin: -328px 0px 0px 700px;
|
|
||||||
}
|
|
||||||
body
|
|
||||||
{
|
|
||||||
background-color: rgba(147, 185, 255, 0.644);
|
|
||||||
}
|
|
||||||
|
|
||||||
#url_
|
#url_
|
||||||
{
|
{
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: rgb(0, 0, 0);
|
color: rgb(0, 0, 0);
|
||||||
|
font-size: 18.8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#logs
|
|
||||||
{
|
|
||||||
height: 220px;
|
|
||||||
width: 450px;
|
|
||||||
overflow: auto;
|
|
||||||
background: #ffffffbc;
|
|
||||||
/* up、right、down、left */
|
|
||||||
margin: 95px 0px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#td_navbar_40px
|
#td_navbar_40px
|
||||||
{
|
{
|
||||||
width: 40px;
|
width: 40px;
|
||||||
@@ -156,9 +132,9 @@
|
|||||||
width: 52px;;
|
width: 52px;;
|
||||||
}
|
}
|
||||||
|
|
||||||
#td_navbar_75px
|
#td_navbar_78px
|
||||||
{
|
{
|
||||||
width: 75px;
|
width: 78px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#td_navbar_135px
|
#td_navbar_135px
|
||||||
@@ -166,10 +142,20 @@
|
|||||||
width: 135px;
|
width: 135px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* 日志 */
|
||||||
|
#logs
|
||||||
|
{
|
||||||
|
height: 220px;
|
||||||
|
width: 450px;
|
||||||
|
overflow: auto;
|
||||||
|
background: #ffffffbc;
|
||||||
|
/* up、right、down、left */
|
||||||
|
margin: 115px 0px 0px -280px;
|
||||||
|
}
|
||||||
|
|
||||||
#td_logs
|
#td_logs
|
||||||
{
|
{
|
||||||
width: 75px;
|
width: 75px;
|
||||||
padding-bottom: 5px;
|
|
||||||
padding-top: 1.8px;
|
padding-top: 1.8px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
@@ -180,16 +166,33 @@
|
|||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
/* 日志 */
|
||||||
|
|
||||||
|
/* 文章 */
|
||||||
|
#post_content
|
||||||
|
{
|
||||||
|
/*text-align: center;*/
|
||||||
|
height: 500px;
|
||||||
|
width: 490px;
|
||||||
|
color: rgb(202, 202, 202);
|
||||||
|
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
|
||||||
|
background-color: rgba(27, 27, 27, 0.010);
|
||||||
|
overflow: auto;
|
||||||
|
font-size: 19px;
|
||||||
|
/* up、right、down、left */
|
||||||
|
margin: 40px 0 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 图标 */
|
||||||
|
#open-ww3-pro1ject-img
|
||||||
|
{
|
||||||
|
overflow: auto;
|
||||||
|
/* up、right、down、left */
|
||||||
|
margin: 0 0 0 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- 专属php代码部分 -->
|
|
||||||
<?php
|
|
||||||
include "../static/html/black-block.html";
|
|
||||||
?>
|
|
||||||
<!-- php部分 -->
|
|
||||||
|
|
||||||
|
<!-- js 部分-->
|
||||||
|
<script src="./src/js/main.js"> 引入js页面蓝图 </script>
|
||||||
|
|
||||||
<!-- javascript 部分 -->
|
|
||||||
<script>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
$alter_br = str_replace('&&', $br_nbsp, $row['content']);
|
$alter_br = str_replace('&&', $br_nbsp, $row['content']);
|
||||||
|
|
||||||
// 输出 date content
|
// 输出 date content
|
||||||
echo "<tr>" . "<td id='td_logs'>" . $row['date'] . "</td>" . "<td id='td_logs_content'>" . $alter_br . "<br>" . "</tr>";
|
echo "<tr>" . "<td id='td_logs'>" . "<a style='font-size: 18px;'>" . $row['date'] . "</a>" . "</td>" . "<td id='td_logs_content'>" . $alter_br . "<br>" . "</tr>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
58
public/blog/src/css/main.css
Normal file
58
public/blog/src/css/main.css
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/* css页面蓝图 */
|
||||||
|
|
||||||
|
/* 外部背景 */
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0; /*外边框*/
|
||||||
|
padding: 0; /*内边框*/
|
||||||
|
overflow: hidden; /* 防止滚动条 */
|
||||||
|
background-color: #333; /* 背景颜色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 内部容器 */
|
||||||
|
#app-canvas {
|
||||||
|
width: 1280px;
|
||||||
|
height: 800px;
|
||||||
|
|
||||||
|
background-color: rgba(147, 185, 255, 0.644);
|
||||||
|
border: 5px solid #0056b3; /* 定义边框 5px 实线 蓝色 */
|
||||||
|
/* transform-origin: 0 0; /* 定义缩放起点 左上角 */
|
||||||
|
|
||||||
|
position:fixed; /* 固定页面,不滚动 */
|
||||||
|
left: 50%; /* 调整左边缘位置到中央 */
|
||||||
|
top: 50%; /* 调整上边缘位置到中央 */
|
||||||
|
|
||||||
|
padding: 30px; /* 内部间距 30px */
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: 30px; /* 外部间距 30px */
|
||||||
|
text-align: center; /* 文字居中 */
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 48px;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
#content-area {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
gap: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 自带 */
|
||||||
|
.box {
|
||||||
|
width: 500px;
|
||||||
|
height: 600px;
|
||||||
|
background-color: #ffffffcc;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
text-align: left;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
29
public/blog/src/js/main.js
Normal file
29
public/blog/src/js/main.js
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// js目前不会,先靠ai
|
||||||
|
|
||||||
|
function resizeCanvas() {
|
||||||
|
// 定义设计基准尺寸
|
||||||
|
const designWidth = 1280;
|
||||||
|
const designHeight = 800;
|
||||||
|
|
||||||
|
// 获取当前浏览器视口尺寸
|
||||||
|
const currentWidth = window.innerWidth;
|
||||||
|
const currentHeight = window.innerHeight;
|
||||||
|
|
||||||
|
const canvas = document.getElementById('app-canvas');
|
||||||
|
|
||||||
|
// 计算缩放比例
|
||||||
|
const scaleX = currentWidth / designWidth;
|
||||||
|
const scaleY = currentHeight / designHeight;
|
||||||
|
const scaleFactor = Math.min(scaleX, scaleY);
|
||||||
|
|
||||||
|
// 确保元素中心与 left: 50%; top: 50%; 对齐
|
||||||
|
canvas.style.transform = `translate(-50%, -50%) scale(${scaleFactor})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 首次加载时执行
|
||||||
|
document.addEventListener('DOMContentLoaded', resizeCanvas);
|
||||||
|
// 监听窗口大小变化时执行,保持动态缩放
|
||||||
|
window.addEventListener('resize', resizeCanvas);
|
||||||
|
|
||||||
|
// 确保在某些情况下也能正确初始化
|
||||||
|
resizeCanvas();
|
||||||
Reference in New Issue
Block a user