Files
Nexus/web/_layout_head.php
T
Your Name f9045a8404 refactor: 仓库结构扁平化 + PHP前端合并到Nexus仓库
- 将 Nexus/Nexus/* 移到仓库根目录(消除双层嵌套)
- 删除旧的多层空壳目录 (server/, web/, agent/, deploy/, docs/)
- 将PHP前端 (web/) 合并进Nexus仓库 — 统一管理
- 部署时 git clone Nexus 仓库即可,不再需要两个仓库

目录结构:
  server/     ← Python FastAPI后端
  web/        ← PHP前端 (install.php, config.php, etc)
  deploy/     ← Supervisor + Shell健康检查
  docs/       ← 部署文档
  tests/      ← 测试
  .env        ← 不在git中 (install.php生成)
  .gitignore  ← 排除 .env, SECRETS.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 17:24:21 +08:00

51 lines
3.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// AdminLTE 布局头部 — 所有页面引入
require_once __DIR__ . '/_banner.php';
$current_page = basename($_SERVER['SCRIPT_NAME']);
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?= $pageTitle ?? 'MultiSync' ?></title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@3.2/dist/css/adminlte.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<link rel="stylesheet" href="style.css">
<style>
.content-wrapper { background: #f4f6f9; }
.card { box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2); border: none; }
.table th { border-top: none; font-size: 13px; font-weight: 600; color: #6c757d; }
.table td { font-size: 13px; vertical-align: middle; }
.badge-success { background: #28a745; }
.btn-xs { padding: 1px 6px; font-size: 11px; }
</style>
<script>
// 全局推送横条
function escHtml(s){return(s||'').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');}
function renderPushBanner(data){
var total=data.total||0,success=data.success||0,failed=data.failed||0;
var h='<div id="pushBanner" style="background:'+(failed===0?'#d4edda':'#fff3cd')+';border-bottom:1px solid '+(failed===0?'#c3e6cb':'#ffeeba')+';padding:8px 20px;font-size:13px;display:flex;align-items:center;justify-content:center;gap:12px">';
h+='<b>'+(failed===0?'✅':'⚠')+' 推送完成:</b> '+total+' 台,成功 '+success+(failed>0?',失败 '+failed:'');
(data.results||[]).slice(0,3).forEach(function(r){
var icon=r.status==='success'?'✅':r.status==='skipped'?'⚠':'❌';
h+='<span style="font-size:11px;color:#555;">'+icon+' '+escHtml(r.server_name||'')+': '+escHtml(r.message||'')+'</span>';
});
h+='<button onclick="dismissBanner()" style="border:none;background:none;cursor:pointer;font-size:16px;color:#999;">×</button></div>';
var existing=document.getElementById('pushBanner');if(existing)existing.remove();
var wrapper=document.querySelector('.wrapper');if(wrapper)wrapper.insertAdjacentHTML('afterbegin',h);
// 3 秒后消失
clearTimeout(window._bannerTimer);
window._bannerTimer=setTimeout(function(){var b=document.getElementById('pushBanner');if(b)b.remove();sessionStorage.removeItem('pushResult');},3000);
}
function dismissBanner(){var b=document.getElementById('pushBanner');if(b)b.remove();sessionStorage.removeItem('pushResult');clearTimeout(window._bannerTimer);}
document.addEventListener('DOMContentLoaded',function(){
var raw=sessionStorage.getItem('pushResult');
if(raw){try{renderPushBanner(JSON.parse(raw))}catch(e){}}
});
</script>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">