better-staridc-MNBT
1<?php
2/**
3 * 首页接管示例 - /landing 活动落地页模板
4 *
5 * 此文件由 bootstrap.php 中注册的 mnbt_register_route 回调 include。
6 * 可用变量:
7 * $info — 路由上下文 ['path'=>'/landing', 'method'=>'GET', 'base'=>'', 'plugin'=>'home_demo', 'route'=>'/landing']
8 */
9if (!defined('IN_CRONLITE')) {
10 exit;
11}
12$base = isset($info['base']) ? $info['base'] : '';
13header('Content-Type: text/html; charset=UTF-8');
14?>
15<!doctype html>
16<html lang="zh-CN">
17<head>
18<meta charset="utf-8">
19<meta name="viewport" content="width=device-width, initial-scale=1">
20<title>活动落地页 - MNBT 首页接管示例</title>
21<link rel="icon" href="<?php echo htmlspecialchars(mnbt_asset_url('upload_logo/logo.head.png'), ENT_QUOTES, 'UTF-8'); ?>" type="image/x-icon">
22<style>
23 *{box-sizing:border-box;margin:0;padding:0}
24 body{
25 font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;
26 background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);
27 min-height:100vh;
28 display:flex;align-items:center;justify-content:center;
29 padding:24px;
30 color:#1f2937;
31 }
32 .card{
33 background:#fff;
34 border-radius:16px;
35 box-shadow:0 20px 40px rgba(0,0,0,.15);
36 max-width:560px;width:100%;
37 padding:48px 40px;
38 text-align:center;
39 }
40 .tag{
41 display:inline-block;
42 background:#fef3c7;color:#92400e;
43 font-size:12px;font-weight:600;
44 padding:4px 12px;border-radius:999px;
45 margin-bottom:20px;
46 letter-spacing:.5px;
47 }
48 h1{
49 font-size:32px;
50 font-weight:700;
51 color:#111827;
52 margin-bottom:12px;
53 line-height:1.25;
54 }
55 .subtitle{
56 font-size:16px;color:#6b7280;
57 margin-bottom:32px;
58 line-height:1.6;
59 }
60 .features{
61 display:grid;grid-template-columns:repeat(2,1fr);
62 gap:16px;margin-bottom:32px;text-align:left;
63 }
64 .feature{
65 display:flex;align-items:flex-start;gap:10px;
66 font-size:14px;color:#374151;
67 }
68 .feature .dot{
69 width:8px;height:8px;border-radius:50%;
70 background:#10b981;margin-top:6px;flex-shrink:0;
71 }
72 .cta{
73 display:inline-block;
74 background:#2563eb;color:#fff;
75 padding:14px 32px;border-radius:10px;
76 font-size:15px;font-weight:600;
77 text-decoration:none;
78 transition:background .15s;
79 }
80 .cta:hover{background:#1d4ed8}
81 .back{
82 display:block;margin-top:20px;
83 font-size:13px;color:#6b7280;text-decoration:none;
84 }
85 .back:hover{color:#374151}
86 @media (max-width:480px){
87 .card{padding:32px 24px}
88 h1{font-size:24px}
89 .features{grid-template-columns:1fr}
90 }
91</style>
92</head>
93<body>
94 <div class="card">
95 <span class="tag">活动落地页演示</span>
96 <h1>限时优惠,立即体验</h1>
97 <p class="subtitle">这是通过 <code>mnbt_register_route('GET', '/landing', ...)</code> 注册的活动落地页。插件可以完全自定义页面内容与样式。</p>
98
99 <div class="features">
100 <div class="feature"><span class="dot"></span><span>独立 URL,不依赖主题系统</span></div>
101 <div class="feature"><span class="dot"></span><span>支持命名参数路由</span></div>
102 <div class="feature"><span class="dot"></span><span>可自定义 HTTP 方法</span></div>
103 <div class="feature"><span class="dot"></span><span>子目录部署自动适配</span></div>
104 </div>
105
106 <a class="cta" href="<?php echo htmlspecialchars($base . '/user', ENT_QUOTES, 'UTF-8'); ?>">立即开通</a>
107 <a class="back" href="<?php echo htmlspecialchars($base . '/', ENT_QUOTES, 'UTF-8'); ?>">← 返回首页</a>
108 </div>
109</body>
110</html>