Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89f363186b | ||
|
|
250a67af94 | ||
|
|
d5bedabaa1 | ||
|
|
04cac36b83 | ||
|
|
4ea5d2c133 | ||
|
|
df3722ae36 | ||
|
|
080f146fef | ||
|
|
acf59c9dfc | ||
|
|
2e1e43a3ce | ||
|
|
06bf1c8fc0 | ||
|
|
0a1e2c4a13 | ||
|
|
61ae1509d0 | ||
|
|
884ce10789 | ||
|
|
277610913a | ||
|
|
e2a0db9cd5 | ||
|
|
74355914d9 | ||
|
|
9d386dd39c | ||
|
|
636788b65c | ||
|
|
4e3964a6eb | ||
|
|
3e842aa35c | ||
|
|
bd1890c0dd | ||
|
|
584455c66d | ||
|
|
01ede89dcd | ||
|
|
1bb0554608 |
@@ -1,8 +1,16 @@
|
||||
# LaySite
|
||||
# 来笙 Laysense 官网 · LaySite 1.3
|
||||
|
||||
Copyright (C) 2026 Shanghai Laysense Information Technology Co. Ltd. [版权与授权声明](NOTICE)
|
||||
|
||||
基于 PHP Webman、SQLite、原生 CSS 和 jQuery 的通用站点编辑器。页面由服务端渲染,公开页复用站点组件和配色。新装提供空白首页、可编辑的文章页,以及九套十八个整页模板。
|
||||
来笙官网使用 LaySite 1.3,基于 PHP Webman、SQLite、原生 CSS 和 jQuery。页面由服务端渲染,公开页复用可编辑的页头、页脚和配色。后台提供九套十八个整页模板。
|
||||
|
||||
## 迁移快照
|
||||
|
||||
`laysite1.3` 的 `resources/laysense-site.sqlite` 来自 `1.0-product` 提交 `49975d3`。迁移读取了该提交的 SQLite 数据库和 WAL,把 9 个页面、40 个区块、12 篇文章、分类、删除记录和 CDN 设置升级至 LaySite schema v6。原有页头页脚可以从后台画布编辑,`/network` 也已成为可编辑的动态页面。
|
||||
|
||||
首次安装把快照导入 `LAYSITE_DB`(默认 `storage/laysite.sqlite`)。运行中的数据库和会话仍由部署环境管理。请使用新路径初始化此分支,旧数据库可留作回滚备份。迁移快照中的管理员表为空,首次部署使用 `php bin/admin.php` 设置账户。源快照没有媒体库上传文件,页面引用的静态素材随代码发布。
|
||||
|
||||
正式运行时,在 `.env` 配置 `LAYSITE_SITE_URL=https://laysense.cn`,启用 `LAYSITE_SECURE_COOKIES=1`。迁移保留了 `https://static.laysense.cn` CDN 设置,切换时同步或刷新其 `/assets/` 缓存。
|
||||
|
||||
## 安装
|
||||
|
||||
@@ -22,7 +30,7 @@ php start.php start
|
||||
|
||||
| 环境变量 | 用途 |
|
||||
| --- | --- |
|
||||
| `LAYSITE_SITE_URL` | 完整站点地址,默认 `http://127.0.0.1:8787`。用于 SEO URL、MCP 编辑链接和登录回调 |
|
||||
| `LAYSITE_SITE_URL` | 完整站点地址。未设置时默认 `https://laysense.cn`,本地 `.env.example` 使用 `http://127.0.0.1:8787`。用于 SEO URL、MCP 编辑链接和登录回调 |
|
||||
| `LAYSITE_LISTEN` | Webman 监听地址,默认 `http://127.0.0.1:8787` |
|
||||
| `LAYSITE_WORKERS` | Webman worker 数,默认 2 |
|
||||
| `LAYSITE_DB` | SQLite 文件,默认 `storage/laysite.sqlite` |
|
||||
@@ -34,11 +42,8 @@ php start.php start
|
||||
## 页面与站点设计
|
||||
|
||||
- 在「页面」新建空白草稿或从整页模板创建。画布支持编辑、媒体拖拽调整宽度、移动端预览、区块复制与删除。
|
||||
- 「图层」可展开到最内层的元素。可拖拽调整区块及内容元素的顺序,也可用箭头在同层移动或用定位图标选中画布中的元素。生成的区块外壳和动态文章列表保留其结构。移除的首屏可通过撤销或「页面设置 → 页面显示」恢复。
|
||||
- 选中最外层区块的「编辑 HTML」可修改正文、标题和简介源码。首屏还可以转为完整自定义 HTML,并随时恢复为模板首屏。应用前服务端会清理 HTML,应用后可撤销,保存页面后才会写入站点。
|
||||
- 点击面包屑或目录文案可就地编辑,双击或打开属性可修改链接。「页面设置 → 首屏与目录」可管理整组链接。模板内其他导航与常规内容一起编辑。
|
||||
- 发布的普通页面提供「查看公开页面」,显示访客实际看到的版本。草稿、页头、页脚和系统页面提供后台预览,显示已保存的内容。未保存的改动可在画布上查看。
|
||||
- 选中元素可编辑四边的内外边距。选中文字后可修改字号、颜色、粗体、斜体和删除线。选中图片可拖拽调整宽度,也可在工具栏选择块级、行内或行内块布局。Enter 或 Shift+Enter 在当前元素内换行。正文用 Ctrl+Enter(macOS 上为 ⌘+Enter)或工具栏「换段」新建段落,列表中则新增列表项。
|
||||
- 「图层」可定位或移除首屏,也可调整独立区块的顺序。保存页面后生效。移除的首屏可通过撤销或「页面设置 → 页面显示」恢复。
|
||||
- 选中元素可编辑四边的内外边距。选中文字后可修改字号、粗体、斜体和删除线。Enter 或 Shift+Enter 在当前元素内换行。正文用 Ctrl+Enter(macOS 上为 ⌘+Enter)或工具栏「换段」新建段落,列表中则新增列表项。
|
||||
- 画布支持 Ctrl/⌘+Z 撤销和 Ctrl/⌘+Shift+Z 重做。页面设置的输入框保留浏览器原生撤销。
|
||||
- 选中按钮后可复制。在「属性」中选择纯色填充、线框、下划线或无样式,并选择是否在新标签页打开。首屏支持最多八个按钮。
|
||||
- 在「网站页面 → 新建页面」选择普通页面、页头、页脚、维护页或 404 页。它们共用同一个画布。页头页脚版式在「组件 → 页头/页脚」,也可添加封面、视频、文章等常规区块,或在页面设置中显示首屏。页脚组件默认附带可编辑的 Powered by LaySite 链接。
|
||||
@@ -109,24 +114,15 @@ php bin/backup.php export /srv/backups/laysite-2026-11.tar
|
||||
php bin/backup.php import /srv/backups/laysite-2026-11.tar --replace
|
||||
```
|
||||
|
||||
可在「账户 → 关于系统」点击「检查更新」,比较本机版本和 LaySite 仓库的最新正式发布。检查结果缓存 5 分钟。维护者发版时,先更新 `VERSION`,再用该提交创建同版本标签与正式 Release。
|
||||
可在「账户 → 关于系统」点击「检查更新」,比较本机版本与 `git.laysense.com/laysense/laysite` 的 `main` 分支版本。
|
||||
|
||||
独立更新器 `bin/update.php` 可从已安装站点的根目录运行。它先读取官方主分支的 [更新器兼容表](updatescript_map.json),按内置的更新器版本选择起始和目标范围,再从 Gitea 的 Release 列表查找可用版本。范围包含两端,`v1.1.0-latest` 上限为当前最新正式发布。可通过兼容表收紧旧更新器的适用范围。
|
||||
使用 Git 标签选择部署版本。更新命令先备份,再检出所选版本、安装锁定依赖并运行 SQLite 初始化或迁移。更新时暂停 Webman,更新结束后重新启动。保持源代码工作区干净,并将备份放到部署路径之外。
|
||||
|
||||
```sh
|
||||
php bin/update.php
|
||||
php bin/update.php check
|
||||
php bin/update.php v1.4.2 /srv/backups/pre-update.tar
|
||||
# 从旧安装运行单独下载的更新器
|
||||
php /path/to/update.php v1.4.2
|
||||
bin/update.sh check
|
||||
bin/update.sh v1.1.0 /srv/backups/pre-update.tar
|
||||
```
|
||||
|
||||
无参数时会显示可选版本及发布说明,选择编号或标签后开始更新。指定版本会直接检查并执行。省略备份路径时会写入 `storage/backups/`。原 `bin/update.sh` 入口已停用。
|
||||
|
||||
更新前请暂停 Webman。脚本从 LaySite 上游下载所选标签的 ZIP,通过 PHP 的 Phar 和 zlib 读取。它先比较当前发布包、新发布包和本地文件,再备份站点、按需安装 Composer 依赖、替换程序文件并运行 SQLite 迁移。
|
||||
|
||||
站点设置、SQLite、媒体和站点新增的文件保留原位。对于本地与上游都改过的同一文件,脚本会在替换前列出冲突路径。处理这些定制后再更新。
|
||||
|
||||
从 v1.0.0 升级时,让执行迁移的进程能读到原先填写的 `LAYSITE_OAUTH_*` 值。升级会将这些密钥转存到 SQLite,成功后即可移除旧变量。若迁移时缺少某个旧值,在对应会员页头补填密钥即可启用登录。
|
||||
|
||||
从 v1.1.0 更新画布功能时,更新脚本会添加样式字段,并将已有页头和页脚迁到「网站页面」,保留页面引用和已有认证配置。手动更新源码后,运行 `php bin/install.php` 再启动 Webman。
|
||||
|
||||
@@ -9,6 +9,7 @@ use RuntimeException;
|
||||
final class Assets
|
||||
{
|
||||
public const DEFAULT_ICON = '/assets/system/laysite-mark.webp';
|
||||
public const SITE_ICON = '/assets/favicon.png';
|
||||
public const JQUERY = '/assets/jquery-4.0.0.min.js';
|
||||
public const TOAST_UI_EDITOR = '/assets/vendor/toastui/toastui-editor.min.js';
|
||||
|
||||
|
||||
@@ -8,9 +8,9 @@ final class BlockTemplates
|
||||
{
|
||||
public const ARTICLE_FEED = '{"categories":["announcement","news","product"],"mode":"merged","limit":6}';
|
||||
|
||||
public const NETWORK_FEED = '{"categories":["projects","partners"],"mode":"network","limit":30}';
|
||||
public const NETWORK_FEED = '{"categories":["supported-projects","partners"],"mode":"network","limit":30}';
|
||||
|
||||
public const CATALOG_FEED = '{"categories":["catalog"],"mode":"catalog","limit":30}';
|
||||
public const CATALOG_FEED = '{"categories":["services"],"mode":"catalog","limit":30}';
|
||||
|
||||
public const ELEMENT_GROUPS = [
|
||||
'text-elements' => ['文字与列表', [
|
||||
|
||||
@@ -8,8 +8,7 @@ use RuntimeException;
|
||||
|
||||
final class CanvasStyle
|
||||
{
|
||||
public const PAGE = ['hero', 'heading', 'accent', 'lead', 'eyebrow', 'image', 'actions', 'navigation', 'breadcrumbs'];
|
||||
public const MIN_MEDIA_SCALE = 1;
|
||||
public const PAGE = ['hero', 'heading', 'accent', 'lead', 'image', 'actions', 'navigation'];
|
||||
public const SECTION = ['section', 'title', 'lead', 'body'];
|
||||
|
||||
private const PROPERTIES = [
|
||||
@@ -41,34 +40,13 @@ final class CanvasStyle
|
||||
|
||||
public static function normalize(mixed $input, array $roles): array
|
||||
{
|
||||
if (!is_array($input) || count($input) > count($roles) + 50) {
|
||||
if (!is_array($input) || count($input) > count($roles) + 28) {
|
||||
throw new RuntimeException('画布样式无效。');
|
||||
}
|
||||
$styles = [];
|
||||
foreach ($input as $role => $style) {
|
||||
if ($roles === self::PAGE && $role === 'breadcrumbLinks') {
|
||||
if (!is_string($style)) {
|
||||
throw new RuntimeException('面包屑无效。');
|
||||
}
|
||||
$styles[$role] = SiteDesign::linkText(SiteDesign::parseLinks($style));
|
||||
continue;
|
||||
}
|
||||
if ($roles === self::PAGE && $role === 'heroEyebrow') {
|
||||
if (!is_string($style) || mb_strlen($style) > 100) {
|
||||
throw new RuntimeException('首屏眉题过长。');
|
||||
}
|
||||
$styles[$role] = $style;
|
||||
continue;
|
||||
}
|
||||
if ($roles === self::PAGE && $role === 'heroHtml') {
|
||||
if (!is_string($style) || strlen($style) > 300000) {
|
||||
throw new RuntimeException('首屏 HTML 无效或过长。');
|
||||
}
|
||||
$styles[$role] = Html::sanitize($style);
|
||||
continue;
|
||||
}
|
||||
if ((!in_array($role, $roles, true) && !($roles === self::PAGE && is_string($role)
|
||||
&& preg_match('/^(?:action-[0-7]|(?:nav|crumb)-(?:[0-9]|1[0-9]))$/D', $role))) || !is_array($style)) {
|
||||
&& preg_match('/^(?:action-[0-7]|nav-(?:[0-9]|1[0-9]))$/D', $role))) || !is_array($style)) {
|
||||
throw new RuntimeException('画布样式无效。');
|
||||
}
|
||||
$classes = self::classList($style['classes'] ?? '');
|
||||
@@ -83,7 +61,7 @@ final class CanvasStyle
|
||||
|| ($textLength += strlen($run[0])) > 2400 || !mb_check_encoding($run[0], 'UTF-8')) {
|
||||
throw new RuntimeException('文字格式无效。');
|
||||
}
|
||||
$cleanRuns[] = [self::lineBreaks($run[0]), self::classList($run[1], textOnly: true)];
|
||||
$cleanRuns[] = [$run[0], self::classList($run[1], textOnly: true)];
|
||||
}
|
||||
if ($classes !== '' || $cleanRuns !== []) {
|
||||
$styles[$role] = ['classes' => $classes, 'runs' => $cleanRuns];
|
||||
@@ -107,10 +85,6 @@ final class CanvasStyle
|
||||
[$property, $size] = array_pad(explode('-', $token, 2), 2, '');
|
||||
if (isset(self::TYPOGRAPHY[$token])) {
|
||||
$classes[$property] = $class;
|
||||
} elseif ($property === 'color' && ($size === 'theme' || preg_match('/^[a-f0-9]{6}$/D', $size))) {
|
||||
$classes[$property] = $class;
|
||||
} elseif (!$textOnly && $property === 'display' && in_array($size, ['block', 'inline', 'inline-block'], true)) {
|
||||
$classes[$property] = $class;
|
||||
} elseif ((!$textOnly || $property === 'size') && isset(self::PROPERTIES[$property])
|
||||
&& preg_match('/^(?:0|-?[1-9]\d{0,2})$/D', $size)) {
|
||||
[, $min, $max] = self::PROPERTIES[$property];
|
||||
@@ -142,38 +116,21 @@ final class CanvasStyle
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function lineBreaks(string $text): string
|
||||
{
|
||||
return str_replace(["\r\n", "\r"], "\n", $text);
|
||||
}
|
||||
|
||||
public static function text(array $styles, string $role, string $plain): string
|
||||
{
|
||||
$plain = self::lineBreaks($plain);
|
||||
$runs = $styles[$role]['runs'] ?? [];
|
||||
if ($runs === [] || self::lineBreaks(trim(implode('', array_column($runs, 0)))) !== $plain) {
|
||||
return str_replace("\n", '<br>', View::escape($plain));
|
||||
if ($runs === [] || trim(implode('', array_column($runs, 0))) !== $plain) {
|
||||
return str_replace(["\r\n", "\r", "\n"], '<br>', View::escape($plain));
|
||||
}
|
||||
$markup = '';
|
||||
foreach ($runs as [$text, $class]) {
|
||||
$escaped = str_replace("\n", '<br>', View::escape(self::lineBreaks($text)));
|
||||
$escaped = str_replace("\n", '<br>', View::escape($text));
|
||||
$markup .= $class === '' ? $escaped : '<span class="' . View::escape($class) . '">' . $escaped . '</span>';
|
||||
}
|
||||
|
||||
return $markup;
|
||||
}
|
||||
|
||||
public static function colorRules(string $markup): string
|
||||
{
|
||||
preg_match_all('/\bstudio-style-color-([a-f0-9]{6})(?![\w-])/', $markup, $matches);
|
||||
$css = '';
|
||||
foreach (array_unique($matches[1]) as $hex) {
|
||||
$css .= ".studio-style-color-{$hex}{color:#{$hex}!important}\n";
|
||||
}
|
||||
|
||||
return $css;
|
||||
}
|
||||
|
||||
public static function stylesheet(): string
|
||||
{
|
||||
$css = '';
|
||||
@@ -182,9 +139,6 @@ final class CanvasStyle
|
||||
$css .= '.' . self::PREFIX . "$key-$value{{$property}:{$value}px!important}\n";
|
||||
}
|
||||
}
|
||||
for ($width = self::MIN_MEDIA_SCALE; $width <= 100; $width++) {
|
||||
$css .= ".studio-media-{$width}{--studio-media-factor:calc({$width} / 100)}\n";
|
||||
}
|
||||
foreach (self::TYPOGRAPHY as $key => $value) {
|
||||
$css .= '.' . self::PREFIX . "$key{{$value}!important}\n";
|
||||
}
|
||||
|
||||
@@ -62,6 +62,21 @@ final class Database
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($version < 4) {
|
||||
$columns = array_column($pdo->query('PRAGMA table_info(pages)')->fetchAll(), 'name');
|
||||
foreach (['header_id', 'footer_id', 'palette_id', 'layout_id'] as $column) {
|
||||
if (!in_array($column, $columns, true)) {
|
||||
$pdo->exec("ALTER TABLE pages ADD COLUMN $column INTEGER REFERENCES design_presets(id)");
|
||||
}
|
||||
}
|
||||
$pdo->exec('CREATE UNIQUE INDEX IF NOT EXISTS pages_layout_id ON pages(layout_id)');
|
||||
}
|
||||
if ($version < 6 && !in_array('page_type', array_column($pdo->query('PRAGMA table_info(pages)')->fetchAll(), 'name'), true)) {
|
||||
$pdo->exec("ALTER TABLE pages ADD COLUMN page_type TEXT NOT NULL DEFAULT 'page' CHECK (page_type IN ('page', 'maintenance', 'not-found'))");
|
||||
}
|
||||
if ($version === 0 && $pdo->query('SELECT id FROM site_settings WHERE id = 1')->fetchColumn() === false) {
|
||||
SiteSnapshot::install($pdo);
|
||||
}
|
||||
$pdo->prepare('INSERT OR IGNORE INTO site_settings (id, payload) VALUES (1, ?)')->execute([self::json(['name' => '我的网站'])]);
|
||||
$pdo->prepare("INSERT OR IGNORE INTO pages
|
||||
(slug, name, title, description, heading, accent, lead, image, alt, actions, quicklinks)
|
||||
@@ -82,16 +97,6 @@ final class Database
|
||||
if ($version < 2) {
|
||||
OAuthCredentials::migrateLegacy($pdo);
|
||||
}
|
||||
if ($version < 4) {
|
||||
$columns = $pdo->query('PRAGMA table_info(pages)')->fetchAll();
|
||||
if (!in_array('layout_id', array_column($columns, 'name'), true)) {
|
||||
$pdo->exec('ALTER TABLE pages ADD COLUMN layout_id INTEGER REFERENCES design_presets(id)');
|
||||
}
|
||||
$pdo->exec('CREATE UNIQUE INDEX IF NOT EXISTS pages_layout_id ON pages(layout_id)');
|
||||
}
|
||||
if ($version < 6 && !in_array('page_type', array_column($pdo->query('PRAGMA table_info(pages)')->fetchAll(), 'name'), true)) {
|
||||
$pdo->exec("ALTER TABLE pages ADD COLUMN page_type TEXT NOT NULL DEFAULT 'page' CHECK (page_type IN ('page', 'maintenance', 'not-found'))");
|
||||
}
|
||||
if ($version < 5) {
|
||||
LayoutPage::migrate($pdo);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ final class Html
|
||||
public const ALIGNMENTS = ['left', 'center', 'right'];
|
||||
|
||||
private const TAGS = [
|
||||
'a' => ['href', 'target', 'rel', 'aria-label'], 'article' => [], 'audio' => ['src', 'controls', 'preload'], 'b' => [], 'blockquote' => [], 'br' => [],
|
||||
'a' => ['href', 'target', 'rel', 'aria-label'], 'address' => [], 'article' => [], 'audio' => ['src', 'controls', 'preload'], 'b' => [], 'blockquote' => [], 'br' => [],
|
||||
'button' => ['aria-expanded', 'aria-controls', 'hidden'], 'caption' => [], 'code' => [], 'dd' => [], 'details' => [], 'div' => ['role', 'aria-label', 'tabindex'],
|
||||
'dl' => [], 'dt' => [], 'em' => [], 'figure' => [], 'figcaption' => [], 'footer' => [],
|
||||
'h1' => [], 'h2' => [], 'h3' => [], 'h4' => [], 'h5' => [], 'h6' => [], 'header' => [], 'hr' => [], 'i' => [],
|
||||
|
||||
@@ -32,10 +32,6 @@ final class Licenses
|
||||
'url' => 'https://jquery.com/', 'file' => $root . '/public/assets/jquery-LICENSE.txt'],
|
||||
'toast-ui-editor' => ['name' => 'TOAST UI Editor', 'version' => self::declaredVersion($editor, '~@version\h+' . $version . '~'), 'license' => 'MIT',
|
||||
'url' => 'https://github.com/nhn/tui.editor', 'file' => $root . '/public/assets/vendor/toastui/LICENSE'],
|
||||
'codemirror' => ['name' => 'CodeMirror', 'version' => '5.65.21', 'license' => 'MIT',
|
||||
'url' => 'https://github.com/codemirror/codemirror5', 'file' => $root . '/public/assets/vendor/codemirror/LICENSE'],
|
||||
'js-beautify' => ['name' => 'JS Beautifier', 'version' => '1.15.4', 'license' => 'MIT',
|
||||
'url' => 'https://github.com/beautifier/js-beautify', 'file' => $root . '/public/assets/vendor/js-beautify/LICENSE'],
|
||||
'geist' => ['name' => 'Geist', 'license' => 'OFL-1.1',
|
||||
'url' => 'https://github.com/vercel/geist-font', 'file' => $root . '/public/assets/geist-OFL.txt'],
|
||||
'dompurify' => ['name' => 'DOMPurify', 'version' => self::declaredVersion($editor, '~@license DOMPurify\h+' . $version . '~'), 'license' => 'Apache-2.0 / MPL-2.0',
|
||||
|
||||
@@ -6,6 +6,15 @@ namespace App\Content;
|
||||
|
||||
final class PageTemplates
|
||||
{
|
||||
public static function photoCredit(string $image): ?array
|
||||
{
|
||||
return match ($image) {
|
||||
'/assets/page-templates/studio-letterpress.webp' => ['Adam Lusch', 'CC BY-SA 2.0', 'https://commons.wikimedia.org/wiki/File:Wood_Type_close-up.jpg', 'https://creativecommons.org/licenses/by-sa/2.0/'],
|
||||
'/assets/page-templates/dusk-dunes.webp' => ['Bob Wick / BLM Utah', '公有领域', 'https://commons.wikimedia.org/wiki/File:Utah_Dunes_Landscape_-_West_Desert_District.jpg', null],
|
||||
default => null,
|
||||
};
|
||||
}
|
||||
|
||||
public static function groups(): array
|
||||
{
|
||||
static $groups;
|
||||
|
||||
@@ -10,7 +10,7 @@ use RuntimeException;
|
||||
final class Repository
|
||||
{
|
||||
public const DIRECTORIES = [
|
||||
'catalog' => '目录', 'projects' => '项目', 'partners' => '合作伙伴',
|
||||
'services' => '产品与服务', 'supported-projects' => '来笙支持项目', 'partners' => '来笙合作伙伴',
|
||||
];
|
||||
public const CATEGORIES = ['announcement' => '公告', 'news' => '新闻', 'product' => '产品'] + self::DIRECTORIES;
|
||||
private const ARTICLE_FIELDS = 'articles.*, (SELECT json_group_object(c.slug, c.name)
|
||||
|
||||
@@ -233,7 +233,7 @@ final class SiteBackup
|
||||
$tables['site_settings'] = [['id' => 1, 'payload' => Database::json($site)]];
|
||||
foreach ($tables['sections'] as &$row) {
|
||||
PageDraft::slug($row['key'] ?? null, ['home', 'contact', 'main-content', 'primary-navigation', 'preview']);
|
||||
if (!in_array($row['style'] ?? '', ['plain', 'tinted', 'hero-links', 'layout'], true)) {
|
||||
if (!in_array($row['style'] ?? '', ['plain', 'tinted', 'hero-links', 'layout', 'about', 'projects', 'demos'], true)) {
|
||||
throw new RuntimeException('备份包含未知区块样式。');
|
||||
}
|
||||
$row['body'] = Html::sanitize($row['body'] ?? '');
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Content;
|
||||
|
||||
use PDO;
|
||||
use Pdo\Sqlite;
|
||||
|
||||
final class SiteSnapshot
|
||||
{
|
||||
private const TABLES = [
|
||||
'site_settings', 'design_presets', 'pages', 'sections',
|
||||
'article_categories', 'articles', 'article_category_links',
|
||||
'article_redirects', 'article_deletions', 'media',
|
||||
];
|
||||
|
||||
public static function install(PDO $target): void
|
||||
{
|
||||
$readOnly = class_exists(Sqlite::class)
|
||||
? [Sqlite::ATTR_OPEN_FLAGS => Sqlite::OPEN_READONLY]
|
||||
: [PDO::SQLITE_ATTR_OPEN_FLAGS => PDO::SQLITE_OPEN_READONLY];
|
||||
$source = new PDO('sqlite:' . dirname(__DIR__, 2) . '/resources/laysense-site.sqlite',
|
||||
options: $readOnly + [PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC]);
|
||||
foreach (self::TABLES as $table) {
|
||||
$insert = null;
|
||||
foreach ($source->query('SELECT * FROM ' . $table) as $row) {
|
||||
$insert ??= $target->prepare(sprintf(
|
||||
'INSERT INTO %s (%s) VALUES (%s)',
|
||||
$table,
|
||||
implode(', ', array_keys($row)),
|
||||
implode(', ', array_fill(0, count($row), '?')),
|
||||
));
|
||||
$insert->execute(array_values($row));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Content;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
final class UpdateCheckInProgress extends RuntimeException
|
||||
{
|
||||
}
|
||||
@@ -10,136 +10,26 @@ use RuntimeException;
|
||||
final class Updates
|
||||
{
|
||||
public const REPOSITORY = 'https://git.laysense.com/laysense/laysite';
|
||||
private const RELEASES = 'https://git.laysense.com/api/v1/repos/laysense/laysite/releases';
|
||||
|
||||
public static function current(): string
|
||||
{
|
||||
$version = trim((string) @file_get_contents(dirname(__DIR__, 2) . '/VERSION'));
|
||||
|
||||
return preg_match('/^\d+\.\d+\.\d+$/D', $version) ? $version : '0.0.0';
|
||||
return trim(file_get_contents(dirname(__DIR__, 2) . '/VERSION'));
|
||||
}
|
||||
|
||||
public static function check(): array
|
||||
{
|
||||
$directory = dirname(__DIR__, 2) . '/runtime';
|
||||
if (!is_dir($directory) && !@mkdir($directory, 0750, true) && !is_dir($directory)) {
|
||||
throw new RuntimeException('无法创建版本检查缓存。');
|
||||
}
|
||||
$path = $directory . '/laysite-update.json';
|
||||
$record = self::cached($path);
|
||||
if (($record['until'] ?? 0) <= time()) {
|
||||
$lock = @fopen($path . '.lock', 'c');
|
||||
if (!$lock) {
|
||||
throw new RuntimeException('无法打开版本检查缓存。');
|
||||
}
|
||||
try {
|
||||
if (!flock($lock, LOCK_EX | LOCK_NB, $wouldBlock)) {
|
||||
if (!$wouldBlock) {
|
||||
throw new RuntimeException('无法锁定版本检查缓存。');
|
||||
}
|
||||
if (!array_key_exists('latest', $record)) {
|
||||
throw new UpdateCheckInProgress('版本检查正在进行,请稍后重试。');
|
||||
}
|
||||
} else {
|
||||
$record = self::cached($path);
|
||||
if (($record['until'] ?? 0) <= time()) {
|
||||
try {
|
||||
$record = ['latest' => self::latestRelease(), 'until' => time() + 300];
|
||||
} catch (RuntimeException $exception) {
|
||||
$record = ['error' => $exception->getMessage(), 'until' => time() + 30];
|
||||
}
|
||||
self::writeCache($path, $record);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
fclose($lock);
|
||||
}
|
||||
}
|
||||
if (isset($record['error'])) {
|
||||
throw new RuntimeException($record['error']);
|
||||
}
|
||||
$current = self::current();
|
||||
$latest = $record['latest'];
|
||||
|
||||
return ['current' => $current, 'latest' => $latest, 'comparison' => $latest === null ? null : version_compare($latest, $current)];
|
||||
}
|
||||
|
||||
private static function cached(string $path): array
|
||||
{
|
||||
$record = json_decode((string) @file_get_contents($path), true);
|
||||
|
||||
if (!is_array($record) || !is_int($record['until'] ?? null)) {
|
||||
return [];
|
||||
}
|
||||
if (is_string($record['error'] ?? null)) {
|
||||
return $record;
|
||||
}
|
||||
$latest = $record['latest'] ?? null;
|
||||
|
||||
return array_key_exists('latest', $record) && ($latest === null || (is_string($latest)
|
||||
&& preg_match('/^\d+\.\d+\.\d+$/D', $latest))) ? $record : [];
|
||||
}
|
||||
|
||||
private static function writeCache(string $path, array $record): void
|
||||
{
|
||||
$temporary = @tempnam(dirname($path), 'laysite-update-');
|
||||
if ($temporary === false) {
|
||||
throw new RuntimeException('无法写入版本检查缓存。');
|
||||
}
|
||||
try {
|
||||
if (file_put_contents($temporary, Database::json($record)) === false || !rename($temporary, $path)) {
|
||||
throw new RuntimeException('无法写入版本检查缓存。');
|
||||
}
|
||||
} finally {
|
||||
if (is_file($temporary)) {
|
||||
unlink($temporary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static function latestRelease(): ?string
|
||||
{
|
||||
$latest = null;
|
||||
$deadline = hrtime(true) + 3_000_000_000;
|
||||
$page = 1;
|
||||
do {
|
||||
$remaining = (int) (($deadline - hrtime(true)) / 1_000_000);
|
||||
if ($remaining <= 0) {
|
||||
throw new RuntimeException('读取上游版本超时,请稍后重试。');
|
||||
}
|
||||
$releases = self::releases($page++, $remaining);
|
||||
foreach ($releases as $release) {
|
||||
$name = $release['tag_name'] ?? null;
|
||||
if (!is_string($name) || !is_bool($release['draft'] ?? null) || !is_bool($release['prerelease'] ?? null)) {
|
||||
throw new RuntimeException('上游仓库返回的版本列表无效。');
|
||||
}
|
||||
if (!$release['draft'] && !$release['prerelease'] && preg_match('/^v(\d+\.\d+\.\d+)$/D', $name, $match)
|
||||
&& ($latest === null || version_compare($match[1], $latest, '>'))) {
|
||||
$latest = $match[1];
|
||||
}
|
||||
}
|
||||
} while (count($releases) === 50);
|
||||
|
||||
return $latest;
|
||||
}
|
||||
|
||||
private static function releases(int $page, int $timeout): array
|
||||
{
|
||||
$curl = curl_init(self::RELEASES . '?limit=50&page=' . $page);
|
||||
$curl = curl_init(self::REPOSITORY . '/raw/branch/main/VERSION');
|
||||
if ($curl === false) {
|
||||
throw new RuntimeException('无法连接上游仓库,请稍后重试。');
|
||||
}
|
||||
$body = '';
|
||||
$overflow = false;
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_CONNECTTIMEOUT_MS => min(1500, $timeout),
|
||||
CURLOPT_TIMEOUT_MS => $timeout,
|
||||
CURLOPT_CONNECTTIMEOUT_MS => 2500,
|
||||
CURLOPT_TIMEOUT_MS => 6000,
|
||||
CURLOPT_FOLLOWLOCATION => false,
|
||||
CURLOPT_HTTPHEADER => ['Accept: application/json'],
|
||||
CURLOPT_USERAGENT => 'LaySite version check',
|
||||
CURLOPT_WRITEFUNCTION => static function (CurlHandle $handle, string $chunk) use (&$body, &$overflow): int {
|
||||
if (strlen($body) + strlen($chunk) > 1024 * 1024) {
|
||||
$overflow = true;
|
||||
CURLOPT_WRITEFUNCTION => static function (CurlHandle $handle, string $chunk) use (&$body): int {
|
||||
if (strlen($body) + strlen($chunk) > 128) {
|
||||
return 0;
|
||||
}
|
||||
$body .= $chunk;
|
||||
@@ -147,19 +37,15 @@ final class Updates
|
||||
return strlen($chunk);
|
||||
},
|
||||
]);
|
||||
if (curl_exec($curl) === false) {
|
||||
throw new RuntimeException($overflow ? '上游版本数据超出长度限制。'
|
||||
: (curl_errno($curl) === CURLE_OPERATION_TIMEDOUT ? '读取上游版本超时,请稍后重试。' : '无法连接上游仓库,请稍后重试。'));
|
||||
if (curl_exec($curl) === false || curl_getinfo($curl, CURLINFO_RESPONSE_CODE) !== 200) {
|
||||
throw new RuntimeException('无法读取上游版本,请稍后重试。');
|
||||
}
|
||||
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
|
||||
if ($status !== 200) {
|
||||
throw new RuntimeException('上游版本列表暂不可用(HTTP ' . $status . ')。');
|
||||
}
|
||||
$releases = json_decode($body);
|
||||
if (!is_array($releases) || !array_is_list($releases)) {
|
||||
throw new RuntimeException('上游仓库返回的版本列表无效。');
|
||||
if (!preg_match('/^v?(\d+\.\d+\.\d+)$/D', trim($body), $version)) {
|
||||
throw new RuntimeException('上游仓库返回的版本格式无效。');
|
||||
}
|
||||
$current = self::current();
|
||||
$latest = $version[1];
|
||||
|
||||
return array_map(static fn ($release): array => is_object($release) ? get_object_vars($release) : [], $releases);
|
||||
return ['current' => $current, 'latest' => $latest, 'comparison' => version_compare($latest, $current)];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,11 +49,8 @@ final class View
|
||||
}
|
||||
}
|
||||
$html = self::fragment($template, $data);
|
||||
$data['canvasColors'] = $admin ? '' : CanvasStyle::colorRules($html . ($data['headerMarkup'] ?? '') . ($data['footerMarkup'] ?? ''));
|
||||
$data['styleNonce'] = $data['canvasColors'] !== '' || !empty($data['canvas']) ? base64_encode(random_bytes(18)) : '';
|
||||
$page = Assets::rewrite(self::fragment($admin ? 'admin-layout' : 'layout', $data + ['content' => $html]), $cdn);
|
||||
$assetSources = $cdn === '' ? "'self'" : "'self' " . $cdn;
|
||||
$styleSources = $assetSources . ($data['styleNonce'] === '' ? '' : " 'nonce-{$data['styleNonce']}'");
|
||||
$articleEditor = $admin && !empty($data['articleEditor']);
|
||||
$editorImages = $articleEditor ? ' data:' : '';
|
||||
$editorStyles = $articleEditor ? "style-src-attr 'unsafe-inline'; " : '';
|
||||
@@ -63,7 +60,7 @@ final class View
|
||||
'Referrer-Policy' => 'strict-origin-when-cross-origin',
|
||||
'X-Frame-Options' => !empty($data['previewMode']) ? 'SAMEORIGIN' : 'DENY',
|
||||
'Content-Security-Policy' => "default-src 'self'; img-src 'self' https:$editorImages; media-src 'self' https:; "
|
||||
. "style-src $styleSources; {$editorStyles}script-src $assetSources; font-src $assetSources; frame-src 'self'; frame-ancestors "
|
||||
. "style-src $assetSources; {$editorStyles}script-src $assetSources; font-src $assetSources; frame-src 'self'; frame-ancestors "
|
||||
. (!empty($data['previewMode']) ? "'self'" : "'none'") . "; form-action 'self'; base-uri 'none'; object-src 'none'",
|
||||
];
|
||||
if ($admin || !empty($data['previewMode'])) {
|
||||
@@ -100,7 +97,7 @@ final class View
|
||||
|
||||
public static function absolute(string $path): string
|
||||
{
|
||||
return rtrim(Environment::get('LAYSITE_SITE_URL') ?: 'http://127.0.0.1:8787', '/') . $path;
|
||||
return rtrim(Environment::get('LAYSITE_SITE_URL') ?: 'https://laysense.cn', '/') . $path;
|
||||
}
|
||||
|
||||
public static function date(?string $value, string $format = 'Y年n月j日'): string
|
||||
|
||||
@@ -17,7 +17,6 @@ use App\Content\Passwords;
|
||||
use App\Content\Repository;
|
||||
use App\Content\SiteDesign;
|
||||
use App\Content\SystemInfo;
|
||||
use App\Content\UpdateCheckInProgress;
|
||||
use App\Content\Updates;
|
||||
use App\Content\View;
|
||||
use App\Http\Request;
|
||||
@@ -169,8 +168,6 @@ class AdminController
|
||||
}
|
||||
try {
|
||||
return $this->json(Updates::check());
|
||||
} catch (UpdateCheckInProgress $error) {
|
||||
return $this->json(['message' => $error->getMessage()], 409);
|
||||
} catch (RuntimeException $error) {
|
||||
return $this->json(['message' => $error->getMessage()], 502);
|
||||
}
|
||||
@@ -329,9 +326,6 @@ class AdminController
|
||||
foreach (['title', 'description', 'heading', 'accent', 'lead', 'image', 'alt'] as $field) {
|
||||
$data[$field] = $this->input($request, $field);
|
||||
}
|
||||
foreach (['heading', 'accent', 'lead'] as $field) {
|
||||
$data[$field] = CanvasStyle::lineBreaks($data[$field]);
|
||||
}
|
||||
$data['name'] = $request->post('name') === null ? $page['name'] : $this->input($request, 'name');
|
||||
if ($layout) {
|
||||
$data['title'] = $data['name'];
|
||||
@@ -393,9 +387,9 @@ class AdminController
|
||||
if ($data['name'] === '' || mb_strlen($data['name']) > 100 || !in_array($data['status'], ['draft', 'published'], true)
|
||||
|| $data['title'] === '' || mb_strlen($data['title']) > 160 ||
|
||||
(!$layout && $page['page_type'] === 'page' && $data['status'] === 'published' && $data['description'] === '') || mb_strlen($data['description']) > 300 ||
|
||||
(($data['visibility']['hero'] ?? true) && !array_key_exists('heroHtml', $data['presentation']) && $data['heading'] === '') || mb_strlen($data['heading'] . $data['accent']) > 110 ||
|
||||
(($data['visibility']['hero'] ?? true) && $data['heading'] === '') || mb_strlen($data['heading'] . $data['accent']) > 110 ||
|
||||
mb_strlen($data['lead']) > 600 || mb_strlen($data['alt']) > 200 ||
|
||||
($data['image_scale'] !== 0 && ($data['image_scale'] < CanvasStyle::MIN_MEDIA_SCALE || $data['image_scale'] > 100)) ||
|
||||
($data['image_scale'] !== 0 && ($data['image_scale'] < 10 || $data['image_scale'] > 100)) ||
|
||||
strlen($data['image']) > 1000 || ($data['image'] !== '' && !Html::url($data['image'], true))) {
|
||||
throw new RuntimeException('请检查页面标题、说明、图片地址和按钮链接。');
|
||||
}
|
||||
@@ -417,10 +411,10 @@ class AdminController
|
||||
}
|
||||
|
||||
return $this->render($request, 'admin-page', [
|
||||
'title' => '编辑 ' . $page['name'], 'page' => $page, 'categories' => $repo->categories(), 'wideAdmin' => true, 'canvasSourceEditor' => true, 'error' => $error, 'saved' => $request->get('saved') === '1',
|
||||
'title' => '编辑 ' . $page['name'], 'page' => $page, 'categories' => $repo->categories(), 'wideAdmin' => true, 'error' => $error, 'saved' => $request->get('saved') === '1',
|
||||
'pageTemplateDrawer' => !$layout, 'designs' => DesignLibrary::all(), 'layout' => $layout, 'layoutDefault' => $default,
|
||||
'layoutBase' => $layout && ($site['layout_defaults'][$layoutKind] ?? null) === $layout['id'],
|
||||
'siteName' => $site['name'], 'layoutHasMember' => $layoutKind === 'header' && LayoutPage::hasMember($page['sections']),
|
||||
'layoutHasMember' => $layoutKind === 'header' && LayoutPage::hasMember($page['sections']),
|
||||
'layoutDefaults' => array_intersect_key($site, ['header_id' => true, 'footer_id' => true]),
|
||||
], $error !== '' ? 422 : 200);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,29 @@ final class SiteController
|
||||
|
||||
public function favicon(Request $request): Response
|
||||
{
|
||||
return View::redirect(Assets::DEFAULT_ICON, 301);
|
||||
return View::redirect(Assets::SITE_ICON, 301);
|
||||
}
|
||||
|
||||
public function legacyArticle(Request $request, string $id): Response
|
||||
{
|
||||
$article = (new Repository())->legacyArticle('/news/id/' . $id . '.html');
|
||||
|
||||
return $article ? View::redirect('/articles/' . $article['slug'], 301) : $this->missing($request);
|
||||
}
|
||||
|
||||
public function legacyCategory(Request $request, string $id): Response
|
||||
{
|
||||
$target = [
|
||||
'1' => '/articles/category/product', '2' => '/articles/category/news', '3' => '/articles/category/announcement',
|
||||
'5' => '/#supported-projects', '6' => '/#partners',
|
||||
][$id] ?? null;
|
||||
|
||||
return $target ? View::redirect($target, 301) : $this->missing($request);
|
||||
}
|
||||
|
||||
public function legacyTag(Request $request, string $tag): Response
|
||||
{
|
||||
return View::redirect('/articles/tag/' . rawurlencode(rawurldecode($tag)), 301);
|
||||
}
|
||||
|
||||
public function canvasStyle(Request $request): Response
|
||||
|
||||
@@ -31,12 +31,6 @@ $active = match (true) {
|
||||
<link rel="stylesheet" href="/assets/page-template-drawer.css">
|
||||
<script src="/assets/page-template-drawer.js" defer></script>
|
||||
<?php endif ?>
|
||||
<?php if (!empty($canvasSourceEditor)): ?>
|
||||
<link rel="stylesheet" href="/assets/vendor/codemirror/codemirror.min.css">
|
||||
<script src="/assets/vendor/codemirror/codemirror.min.js" defer></script>
|
||||
<script src="/assets/vendor/codemirror/xml.min.js" defer></script>
|
||||
<script src="/assets/vendor/js-beautify/beautify-html.min.js" defer></script>
|
||||
<?php endif ?>
|
||||
<?php if (!empty($articleEditor)): ?>
|
||||
<link rel="stylesheet" href="/assets/vendor/toastui/toastui-editor.min.css">
|
||||
<script src="<?= $e(Assets::TOAST_UI_EDITOR) ?>" defer></script>
|
||||
@@ -84,21 +78,7 @@ $active = match (true) {
|
||||
<label>查找资源<input type="search" data-media-query placeholder="搜索文件名或资源路径"></label>
|
||||
<p data-picker-status role="status"></p>
|
||||
<div class="picker-grid" data-picker-items></div>
|
||||
<div class="actions picker-actions">
|
||||
<button class="button button-outline" type="button" data-refresh-picker><?= View::fragment('studio-icon', ['icon' => 'refresh']) ?>刷新资源</button>
|
||||
<a class="back-link" href="/admin/media" target="_blank" rel="noopener noreferrer">打开媒体库上传</a>
|
||||
</div>
|
||||
</dialog>
|
||||
<dialog class="media-picker admin-action-dialog" id="admin-action-dialog" aria-labelledby="admin-action-heading">
|
||||
<form class="admin-form" method="dialog">
|
||||
<h2 id="admin-action-heading" data-action-title></h2>
|
||||
<p data-action-message hidden></p>
|
||||
<label data-action-field hidden><span data-action-label></span><input data-action-value></label>
|
||||
<div class="actions">
|
||||
<button class="button button-primary" data-action-accept value="accept" type="submit">确定</button>
|
||||
<button class="button button-outline" data-action-cancel type="button">取消</button>
|
||||
</div>
|
||||
</form>
|
||||
<a class="back-link" href="/admin/media" target="_blank" rel="noopener noreferrer">打开媒体库上传</a>
|
||||
</dialog>
|
||||
<?php endif ?>
|
||||
</body>
|
||||
|
||||
@@ -31,9 +31,7 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
<?php if ($systemLabel): ?><a class="button button-outline" href="/admin/settings"><?= View::fragment('studio-icon', ['icon' => 'settings']) ?>站点设置</a>
|
||||
<?php elseif ($page['status'] === 'published'): ?><?= View::fragment('admin-view-link', ['href' => $path, 'icon' => 'external']) ?><?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php if ($layout || $systemLabel || $page['status'] !== 'published'): ?>
|
||||
<?= View::fragment('admin-view-link', ['href' => $previewUrl, 'icon' => 'preview', 'label' => '预览已保存内容']) ?>
|
||||
<?php endif ?>
|
||||
<?= View::fragment('admin-view-link', ['href' => $previewUrl, 'icon' => 'preview', 'label' => '打开预览', 'showLabel' => true]) ?>
|
||||
</div>
|
||||
</header>
|
||||
<?= View::fragment('admin-feedback', compact('error', 'saved')) ?>
|
||||
@@ -46,7 +44,7 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
]) ?>
|
||||
</aside>
|
||||
<div class="studio-workspace">
|
||||
<section class="admin-panel studio-preview" data-preview-studio aria-labelledby="studio-preview-title" tabindex="-1">
|
||||
<section class="admin-panel studio-preview" data-preview-studio aria-labelledby="studio-preview-title">
|
||||
<div class="admin-heading compact">
|
||||
<h2 id="studio-preview-title">页面画布</h2>
|
||||
<div class="preview-selector" aria-label="预览尺寸">
|
||||
@@ -64,15 +62,10 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
</div>
|
||||
<div class="canvas-format-tools" role="group" aria-label="文字格式">
|
||||
<label>字号 <input type="number" data-canvas-font-size min="8" max="144" step="1" placeholder="px" disabled></label>
|
||||
<label>文字颜色 <input type="color" aria-label="文字颜色" data-canvas-color disabled></label>
|
||||
<button type="button" data-clear-color title="恢复默认文字颜色" aria-label="恢复默认文字颜色" disabled><?= View::fragment('studio-icon', ['icon' => 'refresh']) ?></button>
|
||||
<button type="button" data-canvas-format="weight" aria-label="加粗" title="加粗" aria-pressed="false" disabled><strong>B</strong></button>
|
||||
<button type="button" data-canvas-format="slant" aria-label="斜体" title="斜体" aria-pressed="false" disabled><em>I</em></button>
|
||||
<button type="button" data-canvas-format="strike" aria-label="删除线" title="删除线" aria-pressed="false" disabled><s>S</s></button>
|
||||
</div>
|
||||
<label class="canvas-image-display">图片布局 <select data-canvas-image-display disabled>
|
||||
<option value="">随模板</option><option value="block">块级</option><option value="inline">行内</option><option value="inline-block">行内块</option>
|
||||
</select></label>
|
||||
<div role="group" aria-label="画布历史">
|
||||
<button type="button" data-canvas-history="undo" title="撤销(Ctrl/⌘ Z)" disabled>撤销</button>
|
||||
<button type="button" data-canvas-history="redo" title="重做(Ctrl/⌘ Shift Z)" disabled>重做</button>
|
||||
@@ -87,11 +80,11 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
<button type="button" data-align="<?= $value ?>" aria-pressed="false" aria-label="<?= $label ?>" title="<?= $label ?>"><?= View::fragment('studio-icon', ['icon' => $value]) ?></button>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<?php foreach (['module-settings' => ['settings', '模块设置'], 'properties' => ['edit', '属性'], 'parent' => ['parent', '选择父元素'], 'spacing' => ['spacing', '内外边距'], 'source' => ['code', '编辑 HTML'], 'copy' => ['copy', '复制'], 'delete' => ['delete', '删除']] as $action => [$icon, $label]): ?>
|
||||
<?php foreach (['module-settings' => ['settings', '模块设置'], 'properties' => ['edit', '属性'], 'parent' => ['parent', '选择父元素'], 'spacing' => ['spacing', '内外边距'], 'copy' => ['copy', '复制'], 'delete' => ['delete', '删除']] as $action => [$icon, $label]): ?>
|
||||
<button type="button" data-element-<?= $action ?> aria-label="<?= $label ?>" title="<?= $label ?>"><?= View::fragment('studio-icon', compact('icon')) ?></button>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<button class="studio-media-handle" type="button" role="slider" aria-label="媒体宽度" aria-valuemin="<?= CanvasStyle::MIN_MEDIA_SCALE ?>" aria-valuemax="100" aria-valuenow="100" data-media-handle hidden></button>
|
||||
<button class="studio-media-handle" type="button" role="slider" aria-label="媒体宽度" aria-valuemin="10" aria-valuemax="100" aria-valuenow="100" data-media-handle hidden></button>
|
||||
<div class="studio-media-sizing" data-media-sizing hidden>
|
||||
<output data-media-size aria-hidden="true"></output>
|
||||
<button class="button button-outline" type="button" data-reset-media>原始尺寸</button>
|
||||
@@ -99,39 +92,11 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
</div>
|
||||
</div>
|
||||
<p class="field-note studio-canvas-status" data-canvas-status role="status"></p>
|
||||
<dialog class="media-picker canvas-source" data-canvas-source aria-labelledby="canvas-source-heading">
|
||||
<div class="admin-heading compact"><h2 id="canvas-source-heading">编辑区块 HTML</h2></div>
|
||||
<form class="admin-form" method="dialog">
|
||||
<label>源代码区域<select data-source-part></select></label>
|
||||
<div>
|
||||
<label for="canvas-source-code">HTML 源码</label>
|
||||
<textarea id="canvas-source-code" data-source-code rows="15" spellcheck="false" autocapitalize="off" maxlength="300000" wrap="off"></textarea>
|
||||
</div>
|
||||
<p class="field-note" data-source-hint></p>
|
||||
<p class="feedback error" data-source-error role="alert" hidden></p>
|
||||
<div class="actions">
|
||||
<button class="button button-primary" type="submit">应用 HTML</button>
|
||||
<button class="button button-outline" type="button" data-source-reset hidden>恢复模板首屏</button>
|
||||
<button class="button button-outline" type="button" data-source-close>取消</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
<dialog class="media-picker" data-canvas-spacing aria-labelledby="canvas-spacing-title">
|
||||
<div class="admin-heading compact"><h2 id="canvas-spacing-title">元素间距</h2></div>
|
||||
<form class="admin-form" method="dialog">
|
||||
<?php foreach (['p' => ['内边距', 0], 'm' => ['外边距', -128]] as $prefix => [$label, $min]): ?>
|
||||
<fieldset class="admin-options canvas-spacing-fields"><legend><?= $label ?>(px)</legend>
|
||||
<label class="canvas-spacing-preset">四边预设
|
||||
<select data-spacing-preset>
|
||||
<option value="">自定义</option>
|
||||
<option value="template">恢复默认</option>
|
||||
<option value="0">无间距 · 0 px</option>
|
||||
<option value="8">紧凑 · 8 px</option>
|
||||
<option value="16">常规 · 16 px</option>
|
||||
<option value="24">宽松 · 24 px</option>
|
||||
<option value="32">大间距 · 32 px</option>
|
||||
</select>
|
||||
</label>
|
||||
<?php foreach (['t' => '上', 'r' => '右', 'b' => '下', 'l' => '左'] as $side => $direction): ?>
|
||||
<label><?= $direction ?><input name="<?= $prefix . $side ?>" type="number" min="<?= $min ?>" max="128" step="1" placeholder="默认"></label>
|
||||
<?php endforeach ?>
|
||||
@@ -154,7 +119,6 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
</select></label>
|
||||
<label data-property-row="newTab">打开方式<select name="newTab"><option value="0">当前标签页</option><option value="1">新标签页</option></select></label>
|
||||
<label data-property-row="alt">图片替代文本<input name="alt" maxlength="200"></label>
|
||||
<label data-property-row="breadcrumbs">面包屑路径<textarea name="breadcrumbs" rows="5" placeholder="首页 | /"></textarea><small>每行填写「文案 | 链接」。清空后隐藏面包屑。</small></label>
|
||||
<label data-property-row="quicklinks">目录链接<textarea name="quicklinks" rows="5" placeholder="概览 | #overview"></textarea><small>每行填写「文案 | 链接」。</small></label>
|
||||
<label data-property-row="value">当前值<input name="value" inputmode="numeric"></label>
|
||||
<label data-property-row="max">最大值<input name="max" inputmode="numeric"></label>
|
||||
@@ -173,7 +137,7 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
<dialog class="media-picker canvas-module-settings" data-module-dialog aria-labelledby="module-settings-title">
|
||||
<div class="admin-heading compact"><h2 id="module-settings-title">模块设置</h2></div>
|
||||
<form class="admin-form" method="dialog">
|
||||
<label>模块标题<textarea name="module_title" rows="2" maxlength="100" required></textarea></label>
|
||||
<label>模块标题<input name="module_title" maxlength="100" required></label>
|
||||
<label>模块简介<textarea name="module_lead" rows="2" maxlength="500"></textarea></label>
|
||||
<?= View::fragment('studio-feed-fields', ['categories' => $categories, 'feed' => [], 'allowOff' => false]) ?>
|
||||
<p class="feedback error" role="alert" data-module-error hidden></p>
|
||||
@@ -192,11 +156,6 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
<input type="hidden" name="canvas_sections" value="">
|
||||
<input type="hidden" name="canvas_order" value="">
|
||||
<input type="hidden" name="canvas_presentation" value="<?= $e(CanvasStyle::encode($page['presentation'])) ?>">
|
||||
<input type="hidden" name="canvas_breadcrumbs" value="<?= $e($page['presentation']['breadcrumbLinks'] ?? SiteDesign::linkText([['/', '首页'], [$path, $page['name']]])) ?>">
|
||||
<input type="hidden" name="canvas_breadcrumbs_custom" value="<?= array_key_exists('breadcrumbLinks', $page['presentation']) ? '1' : '0' ?>">
|
||||
<input type="hidden" name="canvas_hero_custom" value="<?= array_key_exists('heroHtml', $page['presentation']) ? '1' : '0' ?>">
|
||||
<input type="hidden" name="eyebrow" value="<?= $e($page['presentation']['heroEyebrow'] ?? $siteName) ?>">
|
||||
<input type="hidden" name="canvas_eyebrow_custom" value="<?= array_key_exists('heroEyebrow', $page['presentation']) ? '1' : '0' ?>">
|
||||
<input type="hidden" name="alignments" value="<?= $e(Database::json($page['alignments'])) ?>">
|
||||
<details class="studio-hero-settings">
|
||||
<summary>首屏与目录</summary>
|
||||
@@ -204,7 +163,6 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
<button class="button button-outline" type="button" disabled data-hero-control="image">首屏图片</button>
|
||||
<button class="button button-outline" type="button" disabled data-hero-control="add-action">添加首屏按钮</button>
|
||||
<button class="button button-outline" type="button" disabled data-hero-control="navigation">本页目录</button>
|
||||
<?php if (!$layout && !$systemLabel && $slug !== 'home'): ?><button class="button button-outline" type="button" disabled data-hero-control="breadcrumbs">面包屑路径</button><?php endif ?>
|
||||
</div>
|
||||
</details>
|
||||
<label>页面名称<input name="name" value="<?= $e($page['name']) ?>" required maxlength="100"></label>
|
||||
@@ -260,8 +218,8 @@ $systemLabel = SystemPage::TYPES[$page['page_type']] ?? null;
|
||||
];
|
||||
?>
|
||||
<?php foreach ($contentFields as $field => $value): ?>
|
||||
<?php if (in_array($field, ['heading', 'accent', 'lead', 'quicklinks'], true)): ?>
|
||||
<textarea name="<?= $e($field) ?>" hidden><?= $e($value) ?></textarea>
|
||||
<?php if ($field === 'quicklinks'): ?>
|
||||
<textarea name="quicklinks" hidden><?= $e($value) ?></textarea>
|
||||
<?php else: ?>
|
||||
<input type="hidden" name="<?= $e($field) ?>" value="<?= $e($value) ?>">
|
||||
<?php endif ?>
|
||||
|
||||
@@ -6,7 +6,7 @@ use App\Content\DesignLibrary;
|
||||
|
||||
$e = View::escape(...);
|
||||
$canonical = $path !== null && empty($previewMode) ? View::absolute($path) : null;
|
||||
$imageUrl = !empty($socialImage) ? Assets::url($socialImage, $cdn) : '';
|
||||
$imageUrl = Assets::url(($socialImage ?? '') ?: '/assets/original/home-hero.webp', $cdn);
|
||||
if (str_starts_with($imageUrl, '/')) {
|
||||
$imageUrl = View::absolute($imageUrl);
|
||||
}
|
||||
@@ -14,7 +14,6 @@ $theme = $page['theme'] ?? '';
|
||||
$palette = DesignLibrary::find((int) ($page['palette_id'] ?? 0), 'palette');
|
||||
$showHeader = $page['visibility']['header'] ?? true;
|
||||
$showFooter = $page['visibility']['footer'] ?? true;
|
||||
$canvasStyles = $content . ($headerMarkup ?? '') . ($footerMarkup ?? '');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
@@ -22,7 +21,7 @@ $canvasStyles = $content . ($headerMarkup ?? '') . ($footerMarkup ?? '');
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title><?= $e($title) ?></title>
|
||||
<link rel="icon" href="<?= $e(Assets::DEFAULT_ICON) ?>" type="image/webp">
|
||||
<link rel="icon" href="<?= $e(Assets::SITE_ICON) ?>" type="image/png">
|
||||
<meta name="description" content="<?= $e($description) ?>">
|
||||
<meta name="theme-color" content="#f5f7fb">
|
||||
<?php if ($canonical): ?>
|
||||
@@ -37,7 +36,7 @@ $canvasStyles = $content . ($headerMarkup ?? '') . ($footerMarkup ?? '');
|
||||
<meta property="og:description" content="<?= $e($description) ?>">
|
||||
<?php if ($imageUrl !== ''): ?>
|
||||
<meta property="og:image" content="<?= $e($imageUrl) ?>">
|
||||
<meta property="og:image:alt" content="<?= $e($socialAlt ?? '') ?>">
|
||||
<meta property="og:image:alt" content="<?= $e(($socialAlt ?? '') ?: '来笙 Laysense') ?>">
|
||||
<?php endif ?>
|
||||
<?php if (isset($article)): ?>
|
||||
<meta property="article:published_time" content="<?= $e(View::date($article['published_at'], DATE_ATOM)) ?>">
|
||||
@@ -45,14 +44,14 @@ $canvasStyles = $content . ($headerMarkup ?? '') . ($footerMarkup ?? '');
|
||||
<?php endif ?>
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<link rel="stylesheet" href="/assets/site.css">
|
||||
<?php if (!empty($canvas) || str_contains($canvasStyles, 'studio-style-') || str_contains($canvasStyles, 'studio-media-')): ?><link rel="stylesheet" href="<?= $e(CanvasStyle::stylesheetUrl()) ?>"><?php endif ?>
|
||||
<?php if (!empty($styleNonce)): ?><style nonce="<?= $e($styleNonce) ?>" data-canvas-colors><?= $canvasColors ?></style><?php endif ?>
|
||||
<link rel="stylesheet" href="/assets/laysense.css">
|
||||
<?php if (!empty($canvas) || str_contains($content . ($headerMarkup ?? '') . ($footerMarkup ?? ''), 'studio-style-')): ?><link rel="stylesheet" href="<?= $e(CanvasStyle::stylesheetUrl()) ?>"><?php endif ?>
|
||||
<?php if ($theme !== ''): ?><link rel="stylesheet" href="/assets/page-themes.css"><?php endif ?>
|
||||
<?php if ($palette): ?><link rel="stylesheet" data-page-palette href="/palette/<?= $e($palette['id']) ?>.css?v=<?= $e($palette['version']) ?>"><?php endif ?>
|
||||
<script src="<?= $e(Assets::JQUERY) ?>" defer></script>
|
||||
<script src="/assets/site.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<body<?= in_array($page['slug'] ?? '', ['sc', 'shnu-sc'], true) ? ' class="copyright-service"' : '' ?>>
|
||||
<a class="skip-link" href="#main-content">跳到内容</a>
|
||||
<?php if (empty($page['layout_kind']) && ($showHeader || !empty($canvas))): ?>
|
||||
<?php if (isset($headerMarkup)): ?><div role="banner" data-site-area="header"<?= $showHeader ? '' : ' hidden' ?>><?= $headerMarkup ?></div>
|
||||
|
||||
|
Before Width: | Height: | Size: 1004 B After Width: | Height: | Size: 1004 B |
@@ -1,23 +1,18 @@
|
||||
<?php
|
||||
use App\Content\Buttons;
|
||||
use App\Content\CanvasStyle;
|
||||
use App\Content\SiteDesign;
|
||||
use App\Content\PageTemplates;
|
||||
use App\Content\View;
|
||||
|
||||
$e = View::escape(...);
|
||||
$home = $page['slug'] === 'home';
|
||||
$service = in_array($page['slug'], ['sc', 'shnu-sc'], true);
|
||||
$shared = !empty($page['layout_kind']);
|
||||
$system = ($page['page_type'] ?? 'page') !== 'page';
|
||||
$showHero = $page['visibility']['hero'] ?? true;
|
||||
$heroLinks = array_filter($page['sections'], static fn (array $section): bool => $section['style'] === 'hero-links');
|
||||
$alignments = $page['alignments'];
|
||||
$presentation = $page['presentation'] ?? [];
|
||||
$showBreadcrumbs = !$home && !$shared && !$system;
|
||||
$customCrumbs = array_key_exists('breadcrumbLinks', $presentation);
|
||||
$crumbs = !$showBreadcrumbs ? [] : ($customCrumbs
|
||||
? SiteDesign::parseLinks($presentation['breadcrumbLinks']) : [['/', '首页'], ['/' . $page['slug'], $page['name']]]);
|
||||
$customHero = array_key_exists('heroHtml', $presentation);
|
||||
$renderManagedHero = !$customHero || $canvas;
|
||||
$style = static fn (string $role): string => CanvasStyle::classes($presentation, $role);
|
||||
$text = static fn (string $role, string $value): string => CanvasStyle::text($presentation, $role, $value);
|
||||
$styleField = static fn (string $role): string => $canvas ? ' data-studio-style-field="' . $role . '"' : '';
|
||||
@@ -28,27 +23,24 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
|
||||
<?php if ($showHero || $canvas || $heroLinks): ?>
|
||||
<section class="hero hero-<?= $e($page['slug']) ?><?= $style('hero') ?>" id="home" data-enter<?= $canvas ? ' data-studio-hero' : '' ?><?= $styleField('hero') ?>>
|
||||
<?php if ($showHero || $canvas): ?>
|
||||
<?php if ($customHero || $canvas): ?>
|
||||
<div class="studio-hero-html rich"<?= $canvas ? ' data-studio-hero-source data-studio-part="body"' : '' ?><?= !$customHero || !$showHero ? ' hidden' : '' ?>><?= $presentation['heroHtml'] ?? '' ?></div>
|
||||
<?php endif ?>
|
||||
<?php if ($renderManagedHero): ?>
|
||||
<div class="wrap hero-inner<?= $page['image'] === '' ? ' hero-text-only' : '' ?>"<?= $canvas ? ' data-studio-hero-content' : '' ?><?= $showHero && !$customHero ? '' : ' hidden' ?>>
|
||||
<div class="wrap hero-inner<?= $page['image'] === '' ? ' hero-text-only' : '' ?>"<?= $canvas ? ' data-studio-hero-content' : '' ?><?= $showHero ? '' : ' hidden' ?>>
|
||||
<div class="hero-copy">
|
||||
<?php if ($showBreadcrumbs && ($crumbs || $canvas)): ?>
|
||||
<nav class="breadcrumbs<?= $style('breadcrumbs') ?>" aria-label="面包屑" itemscope itemtype="https://schema.org/BreadcrumbList"<?= $canvas ? ' data-studio-breadcrumbs' : '' ?><?= $styleField('breadcrumbs') ?><?= $crumbs ? '' : ' hidden' ?>>
|
||||
<?php foreach ($crumbs as $index => [$url, $label]): ?>
|
||||
<?php $role = 'crumb-' . $index; ?>
|
||||
<?php if ($index > 0): ?><span class="crumb-divider" aria-hidden="true">/</span><?php endif ?>
|
||||
<span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a itemprop="item" href="<?= $e($url) ?>"<?= $index === count($crumbs) - 1 ? ' aria-current="page"' : '' ?><?= $styleField($role) ?> class="<?= trim($style($role)) ?>"><span itemprop="name"><?= $text($role, $label) ?></span></a>
|
||||
<meta itemprop="position" content="<?= $index + 1 ?>">
|
||||
</span>
|
||||
<?php endforeach ?>
|
||||
<?php if (!$home && !$shared && !$system): ?>
|
||||
<nav class="breadcrumbs" aria-label="面包屑" itemscope itemtype="https://schema.org/BreadcrumbList">
|
||||
<span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a itemprop="item" href="/"><span itemprop="name">首页</span></a>
|
||||
<meta itemprop="position" content="1">
|
||||
</span>
|
||||
<span class="crumb-divider" aria-hidden="true">/</span>
|
||||
<span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
||||
<a itemprop="item" href="/<?= $e($page['slug']) ?>" aria-current="page"><span itemprop="name"<?= $field('name') ?>><?= $e($page['name']) ?></span></a>
|
||||
<meta itemprop="position" content="2">
|
||||
</span>
|
||||
</nav>
|
||||
<?php elseif (!$showBreadcrumbs): ?>
|
||||
<p class="overline hero-label"<?= $field('eyebrow') ?><?= $styleField('eyebrow') ?>><?= $text('eyebrow', $presentation['heroEyebrow'] ?? $site['name']) ?></p>
|
||||
<?php else: ?>
|
||||
<p class="overline hero-label"><?= $e($site['name']) ?></p>
|
||||
<?php endif ?>
|
||||
<h1<?= isset($alignments['heading']) ? ' class="' . trim(View::alignmentClass($alignments['heading'])) . '"' : '' ?><?= $alignField('heading') ?>><span class="hero-heading-primary<?= $style('heading') ?>"<?= $field('heading') ?><?= $styleField('heading') ?>><?= $text('heading', $page['heading']) ?></span><?php if ($canvas || $page['accent'] !== ''): ?><span class="hero-accent<?= $style('accent') ?>"<?= $field('accent') ?><?= $styleField('accent') ?>><?= $text('accent', $page['accent']) ?></span><?php endif ?></h1>
|
||||
<h1<?= isset($alignments['heading']) ? ' class="' . trim(View::alignmentClass($alignments['heading'])) . '"' : '' ?><?= $alignField('heading') ?>><span class="hero-heading-primary<?= $style('heading') ?>"<?= $field('heading') ?><?= $styleField('heading') ?>><?= $text('heading', $page['heading']) ?></span><?php if ($canvas): ?><span class="studio-accent<?= $style('accent') ?>"<?= $field('accent') ?><?= $styleField('accent') ?>><?= $text('accent', $page['accent']) ?></span><?php elseif ($page['accent'] !== ''): ?><br><span class="<?= trim($style('accent')) ?>"><?= $text('accent', $page['accent']) ?></span><?php endif ?><?php if ($home && !$canvas): ?><span class="home-cursor" aria-hidden="true">_</span><?php endif ?></h1>
|
||||
<p class="hero-lead<?= View::alignmentClass($alignments['lead'] ?? null) ?><?= $style('lead') ?>"<?= $field('lead') ?><?= $alignField('lead') ?><?= $styleField('lead') ?>><?= $text('lead', $page['lead']) ?></p>
|
||||
<div class="actions hero-actions<?= View::alignmentClass($alignments['actions'] ?? null) ?><?= $style('actions') ?>"<?= $alignField('actions') ?><?= $styleField('actions') ?>>
|
||||
<?php foreach (Buttons::validate($page['actions']) as $index => [$url, $label, $buttonStyle, $blank]): ?>
|
||||
@@ -58,13 +50,13 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
|
||||
</div>
|
||||
</div>
|
||||
<?php if ($canvas || $page['image'] !== ''): ?>
|
||||
<div class="hero-visual app-frame<?= $page['image_scale'] ? ' studio-media-' . $e($page['image_scale']) : '' ?><?= View::alignmentClass($alignments['image'] ?? null) ?><?= $style('image') ?>" data-visual<?= $alignField('image') ?><?= $styleField('image') ?><?= $page['image'] === '' ? ' hidden' : '' ?>>
|
||||
<div class="hero-visual <?= $home ? 'hero-illustration' : ($service ? 'app-frame hero-service-art' : 'app-frame') ?><?= $page['image_scale'] ? ' studio-media-' . $e($page['image_scale']) : '' ?><?= View::alignmentClass($alignments['image'] ?? null) ?><?= $style('image') ?>" data-visual<?= $alignField('image') ?><?= $styleField('image') ?><?= $page['image'] === '' ? ' hidden' : '' ?>>
|
||||
<img<?= $page['image'] === '' ? '' : ' src="' . $e($page['image']) . '"' ?> alt="<?= $e($page['alt']) ?>" width="1448" height="1086" fetchpriority="high"<?= $canvas ? ' data-studio-hero-image' : '' ?>>
|
||||
<?php if ($home && !$canvas && $page['image'] === '/assets/original/home-hero.webp'): ?><?= View::fragment('laysense-home-motion') ?><?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
<?php foreach ($heroLinks as $section): ?>
|
||||
<?= View::fragment('section', ['section' => $section, 'moment' => false, 'canvas' => $canvas, 'pageSlug' => $page['slug']]) ?>
|
||||
<?php endforeach ?>
|
||||
@@ -82,9 +74,14 @@ $field = static fn (string $name): string => $canvas ? ' data-studio-field="' .
|
||||
<?php endif ?>
|
||||
<?php foreach ($page['sections'] as $section): ?>
|
||||
<?php if ($section['style'] !== 'hero-links'): ?>
|
||||
<?= View::fragment('section', ['section' => $section, 'moment' => false, 'canvas' => $canvas, 'pageSlug' => $page['slug']]) ?>
|
||||
<?= View::fragment('section', ['section' => $section, 'moment' => $home && $section['key'] === 'about', 'canvas' => $canvas, 'pageSlug' => $page['slug']]) ?>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
<?php if ($showHero && ($credit = PageTemplates::photoCredit($page['image']))): ?>
|
||||
<p class="wrap page-photo-credit">摄影 <a href="<?= $e($credit[2]) ?>"><?= $e($credit[0]) ?></a> ·
|
||||
<?php if ($credit[3]): ?><a href="<?= $e($credit[3]) ?>"><?= $e($credit[1]) ?></a><?php else: ?><?= $e($credit[1]) ?><?php endif ?>
|
||||
</p>
|
||||
<?php endif ?>
|
||||
<?php if ($canvas): ?>
|
||||
<?php if ($shared): ?>
|
||||
<p class="wrap studio-layout-empty" data-studio-empty-layout hidden>从「组件」添加版式,或在页面设置中显示首屏。</p>
|
||||
|
||||
@@ -5,7 +5,7 @@ use App\Content\View;
|
||||
$e = View::escape(...);
|
||||
$canvas ??= false;
|
||||
$body = $section['body'];
|
||||
$dynamic = !empty($section['feed']);
|
||||
$dynamic = isset($section['feed']);
|
||||
$presentation = json_decode($section['presentation'] ?? '{}', true, flags: JSON_THROW_ON_ERROR);
|
||||
$style = static fn (string $role): string => CanvasStyle::classes($presentation, $role);
|
||||
$text = static fn (string $role): string => CanvasStyle::text($presentation, $role, $section[$role]);
|
||||
@@ -48,10 +48,10 @@ $catalog = $section['catalogFeed'] ?? false;
|
||||
</div>
|
||||
<?php if ($network): ?>
|
||||
<?php foreach ($section['articleFeed'] as $group): ?>
|
||||
<?php $slug = $group['categories'][0]; $anchor = ($pageSlug ?? '') === 'home' && $section['key'] === 'network' ? $slug : $section['key'] . '-group-' . $slug; ?>
|
||||
<?php $slug = $group['categories'][0]; $anchor = in_array($pageSlug ?? '', ['home', 'network'], true) && $section['key'] === 'network' ? $slug : $section['key'] . '-group-' . $slug; ?>
|
||||
<div class="network-group" id="<?= $e($anchor) ?>">
|
||||
<h3><?= $e($group['label']) ?></h3>
|
||||
<?= View::fragment('network-items', ['articles' => $group['articles'], 'standalone' => false]) ?>
|
||||
<?= View::fragment('network-items', ['articles' => $group['articles'], 'standalone' => ($pageSlug ?? '') === 'network']) ?>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
<?php if ($section['archivePath'] !== null): ?><p class="article-feed-archive"><a class="back-link" href="<?= $e($section['archivePath']) ?>">查看全部</a></p><?php endif ?>
|
||||
|
||||
@@ -26,10 +26,6 @@ $paths = [
|
||||
'desktop' => '<rect x="3" y="4.5" width="18" height="12" rx="2"/><path d="M12 16.5v4m-4 0h8"/>',
|
||||
'phone' => '<rect x="7" y="3" width="10" height="18" rx="2"/><path d="M11 17.5h2"/>',
|
||||
'archive' => '<rect x="4" y="4" width="16" height="4" rx="1"/><path d="M5 8v12h14V8m-9 4h4"/>',
|
||||
'code' => '<path d="m8 6-6 6 6 6m8-12 6 6-6 6m-3-15-2 18"/>',
|
||||
'target' => '<circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/><path d="M12 2v4m0 12v4M2 12h4m12 0h4"/>',
|
||||
'up' => '<path d="M12 20V4m-5 5 5-5 5 5"/>',
|
||||
'down' => '<path d="M12 4v16m-5-5 5 5 5-5"/>',
|
||||
'refresh' => '<path d="M20 7v5h-5M4 17v-5h5"/><path d="M5.6 8a7.5 7.5 0 0 1 12.3-2.1L20 8.5M4 15.5l2.1 2.6A7.5 7.5 0 0 0 18.4 16"/>',
|
||||
];
|
||||
?>
|
||||
|
||||
@@ -5,32 +5,29 @@ use App\Content\View;
|
||||
$e = View::escape(...);
|
||||
?>
|
||||
<details class="studio-layers" id="blocks" open>
|
||||
<summary>页面图层</summary>
|
||||
<?php foreach (['target', 'up', 'down', 'delete', 'code', 'settings'] as $icon): ?>
|
||||
<template data-layer-icon="<?= $icon ?>"><?= View::fragment('studio-icon', compact('icon')) ?></template>
|
||||
<?php endforeach ?>
|
||||
<p class="field-note" data-layers-empty<?= $page['sections'] ? ' hidden' : '' ?>>添加组件后,可展开子图层,拖拽或用箭头调整顺序。</p>
|
||||
<ul class="studio-layer-tree" data-canvas-layers>
|
||||
<summary>区块顺序</summary>
|
||||
<p class="field-note" data-layers-empty<?= $page['sections'] ? ' hidden' : '' ?>>添加的独立区块会显示在这里。</p>
|
||||
<ul class="admin-list studio-blocks" data-canvas-layers>
|
||||
<?php foreach ($page['sections'] as $index => $item): ?>
|
||||
<?php $fixedSlot = $item['style'] === 'hero-links'; ?>
|
||||
<li>
|
||||
<div>
|
||||
<div class="studio-component-label">
|
||||
<strong><?= $e($item['title']) ?></strong>
|
||||
<?php if (!empty($item['feed'])): ?><span class="studio-dynamic-badge">动态</span><?php endif ?>
|
||||
<?php if (isset($item['feed'])): ?><span class="studio-dynamic-badge">动态</span><?php endif ?>
|
||||
</div>
|
||||
<small>#<?= $e($item['key']) ?></small>
|
||||
</div>
|
||||
<div class="studio-layer-actions">
|
||||
<a class="button button-outline" href="/admin/pages/<?= $e($slug) ?>/<?= $e($item['key']) ?>" title="区块设置" aria-label="区块设置"><?= View::fragment('studio-icon', ['icon' => 'settings']) ?></a>
|
||||
<div class="actions studio-block-actions">
|
||||
<a class="button button-outline" href="/admin/pages/<?= $e($slug) ?>/<?= $e($item['key']) ?>">区块设置</a>
|
||||
<form method="post" action="/admin/page-blocks/<?= $e($slug) ?>">
|
||||
<input type="hidden" name="csrf" value="<?= $e($token) ?>">
|
||||
<input type="hidden" name="key" value="<?= $e($item['key']) ?>">
|
||||
<input type="hidden" name="page_version" value="<?= $e($page['version']) ?>">
|
||||
<input type="hidden" name="version" value="<?= $e($item['version']) ?>">
|
||||
<button class="button button-outline" aria-label="上移" title="上移" name="operation" value="up" type="submit" <?= $fixedSlot || $index === 0 || $page['sections'][$index - 1]['style'] === 'hero-links' ? 'disabled' : '' ?>><?= View::fragment('studio-icon', ['icon' => 'up']) ?></button>
|
||||
<button class="button button-outline" aria-label="下移" title="下移" name="operation" value="down" type="submit" <?= $fixedSlot || $index === count($page['sections']) - 1 ? 'disabled' : '' ?>><?= View::fragment('studio-icon', ['icon' => 'down']) ?></button>
|
||||
<button class="button button-outline" aria-label="删除" title="删除" name="operation" value="delete" type="submit" data-confirm="删除这个区块?"><?= View::fragment('studio-icon', ['icon' => 'delete']) ?></button>
|
||||
<button class="button button-outline" name="operation" value="up" type="submit" <?= $fixedSlot || $index === 0 || $page['sections'][$index - 1]['style'] === 'hero-links' ? 'disabled' : '' ?>>上移</button>
|
||||
<button class="button button-outline" name="operation" value="down" type="submit" <?= $fixedSlot || $index === count($page['sections']) - 1 ? 'disabled' : '' ?>>下移</button>
|
||||
<button class="button button-outline" name="operation" value="delete" type="submit" data-confirm="删除这个区块?">删除</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
@@ -27,9 +27,9 @@ $modules = $kind === 'modules';
|
||||
<?php foreach ($groups as $group => [$category, $items]): ?>
|
||||
<div class="<?= $modules ? 'studio-template-cards' : 'studio-element-items' ?>" data-template-group="<?= $e($group) ?>" hidden>
|
||||
<?php foreach ($items as $key => $item): ?>
|
||||
<?php [$label, $markup, $option, $feed] = array_pad($item, 4, null); $dynamic = is_string($feed) && $feed !== ''; ?>
|
||||
<?php [$label, $markup, $option, $feed] = array_pad($item, 4, null); ?>
|
||||
<?php if ($modules): ?>
|
||||
<article class="studio-template-card" data-template-card data-library-item data-template-search-text="<?= $e($label . ' ' . $key . ($dynamic ? ' 动态' : '')) ?>">
|
||||
<article class="studio-template-card" data-template-card data-library-item data-template-search-text="<?= $e($label . ' ' . $key . ($feed !== null ? ' 动态' : '')) ?>">
|
||||
<?php if (($item[4] ?? '') === 'layout'): ?>
|
||||
<?php [$previewKind, $previewPreset] = explode('-', $key, 2); ?>
|
||||
<div class="studio-layout-card-preview">
|
||||
@@ -45,11 +45,11 @@ $modules = $kind === 'modules';
|
||||
<div class="studio-template-meta">
|
||||
<div class="studio-component-label">
|
||||
<span><?= $e($label) ?></span>
|
||||
<?php if ($dynamic): ?><span class="studio-dynamic-badge">动态</span><?php endif ?>
|
||||
<?php if ($feed !== null): ?><span class="studio-dynamic-badge">动态</span><?php endif ?>
|
||||
</div>
|
||||
<button type="button" class="button button-outline" disabled data-canvas-template="<?= $e($key) ?>"
|
||||
data-template-title="<?= $e($label) ?>" data-template-lead="<?= $e($option) ?>" data-template-style="<?= $e($item[4] ?? 'plain') ?>"
|
||||
<?= $dynamic ? 'data-template-feed="' . $e($feed) . '"' : '' ?> aria-label="添加<?= $e($label) ?>组件">添加</button>
|
||||
<?= $feed !== null ? 'data-template-feed="' . $e($feed) . '"' : '' ?> aria-label="添加<?= $e($label) ?>组件">添加</button>
|
||||
</div>
|
||||
<template data-preset="<?= $e($key) ?>"><?= $markup ?></template>
|
||||
</article>
|
||||
|
||||
@@ -7,7 +7,7 @@ $e = View::escape(...);
|
||||
<?= View::fragment('admin-feedback', compact('error', 'saved')) ?>
|
||||
<form class="admin-form admin-panel" method="post" action="/admin/media" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf" value="<?= $e($token) ?>">
|
||||
<div class="form-grid media-upload-fields">
|
||||
<div class="form-grid">
|
||||
<label>文件<input type="file" name="file" accept="image/*,video/*,audio/*,.pdf,.woff,.woff2" required>
|
||||
<small>支持常见图片、SVG 图标、音视频、PDF、WOFF/WOFF2,单文件最大 64 MB。</small>
|
||||
</label>
|
||||
@@ -17,7 +17,7 @@ $e = View::escape(...);
|
||||
</form>
|
||||
<section class="admin-panel media-library" data-media-library aria-labelledby="library-heading">
|
||||
<h2 id="library-heading">资源列表</h2>
|
||||
<div class="form-grid admin-form media-filters">
|
||||
<div class="form-grid">
|
||||
<label>搜索<input type="search" data-library-query placeholder="搜索名称或路径"></label>
|
||||
<label>类型<select data-library-type><option value="">全部资源</option><option value="image/">图片与图标</option><option value="video/">视频</option><option value="audio/">音频</option><option value="other">其他文件</option></select></label>
|
||||
</div>
|
||||
|
||||
@@ -1,575 +0,0 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
final class LaySiteUpdater
|
||||
{
|
||||
private const UPDATESCRIPT_VERSION = '1.0.0';
|
||||
private const HOST = 'https://git.laysense.com';
|
||||
private const PROJECT = '/laysense/laysite';
|
||||
private const MAP_PATH = self::PROJECT . '/raw/branch/main/updatescript_map.json';
|
||||
private const RELEASES_PATH = '/api/v1/repos' . self::PROJECT . '/releases';
|
||||
private const TAG = '/^v(\d+\.\d+\.\d+)$/D';
|
||||
|
||||
// These two releases shipped with 1.4.0 in VERSION. Identify their original files when updating old installations.
|
||||
private const LEGACY_VERSIONS = [
|
||||
'1.4.2' => [
|
||||
'bin/update.sh' => 'a1cc96a5ecc3db3074563877dec07f0ebf8689e90e0e9aece838071df4793e26',
|
||||
'bin/update.php' => 'b13d3e925b59589f4d599d6deebb1fb27fa81ad0b98e5d0c67199279c3de9635',
|
||||
],
|
||||
'1.4.1' => [
|
||||
'public/assets/vendor/codemirror/xml.min.js' => 'c0c38a5cf20549c4e20d90428edd830cbbf6a631245a1ac2fb8e88676d4c0b7a',
|
||||
],
|
||||
];
|
||||
private const LEGACY_BASES = ['1.3.0' => 'd5bedabaa1d0187e29060c41fb030e9587a8692f'];
|
||||
private const MANAGED = '/^(?:(?:app|bin|config|public|resources|support|\.agents\/skills\/laysite-mcp)\/.+|\.env\.example|\.gitattributes|\.gitignore|LICENSE|NOTICE|README\.md|VERSION|updatescript_map\.json|composer\.(?:json|lock)|start\.php)$/D';
|
||||
private const MAX_ARCHIVE_BYTES = 64 * 1024 * 1024;
|
||||
private const MAX_EXPANDED_BYTES = 256 * 1024 * 1024;
|
||||
|
||||
public function __construct(private readonly string $root)
|
||||
{
|
||||
}
|
||||
|
||||
public function execute(?string $target, ?string $backup): void
|
||||
{
|
||||
$current = $this->version();
|
||||
$map = self::remoteJson(self::MAP_PATH, 65536, 10000);
|
||||
$rule = is_object($map) ? ($map->{self::UPDATESCRIPT_VERSION} ?? null) : null;
|
||||
if (!is_object($rule)) {
|
||||
throw new RuntimeException('当前更新器未列入兼容表,请下载新版 update.php。');
|
||||
}
|
||||
$from = self::parseRange($rule->from ?? null);
|
||||
$to = self::parseRange($rule->to ?? null);
|
||||
$releases = self::releases();
|
||||
$latest = array_key_first($releases);
|
||||
$latestVersion = $latest === null ? null : substr($latest, 1);
|
||||
if (!self::inRange($current, $from, $latestVersion)) {
|
||||
throw new RuntimeException("当前站点 v$current 超出此更新器的起始版本范围 {$rule->from}。");
|
||||
}
|
||||
$eligible = array_filter($releases, static function (string $tag) use ($current, $to, $latestVersion): bool {
|
||||
$version = substr($tag, 1);
|
||||
|
||||
return version_compare($version, $current, '>') && self::inRange($version, $to, $latestVersion);
|
||||
}, ARRAY_FILTER_USE_KEY);
|
||||
printf("更新器 v%s,当前站点 v%s\n兼容起始版本 %s,目标范围 %s\n",
|
||||
self::UPDATESCRIPT_VERSION, $current, $rule->from, $rule->to);
|
||||
|
||||
if ($target === 'check') {
|
||||
if ($latest !== null) {
|
||||
printf("上游最新正式发布 %s\n", $latest);
|
||||
}
|
||||
echo $eligible === [] ? "暂无可升级的正式发布版本。\n"
|
||||
: '可升级至 ' . implode('、', array_keys($eligible)) . PHP_EOL;
|
||||
return;
|
||||
}
|
||||
if ($target === null) {
|
||||
$target = self::chooseRelease($eligible);
|
||||
if ($target === null) {
|
||||
return;
|
||||
}
|
||||
} elseif ($target === 'v' . $current) {
|
||||
printf("当前已安装 %s。\n", $target);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isset($eligible[$target])) {
|
||||
throw new RuntimeException("无法从 v$current 升级到 {$target}。可选版本为 "
|
||||
. ($eligible === [] ? '无。' : implode('、', array_keys($eligible)) . '。'));
|
||||
}
|
||||
$this->update($current, $target, $backup);
|
||||
}
|
||||
|
||||
private static function parseRange(mixed $value): array
|
||||
{
|
||||
if (!is_string($value) || !preg_match('/^v(\d+\.\d+\.\d+)-(?:v(\d+\.\d+\.\d+)|latest)$/D', $value, $parts)
|
||||
|| (isset($parts[2]) && version_compare($parts[1], $parts[2], '>'))) {
|
||||
throw new RuntimeException('更新器兼容表中的版本范围无效。');
|
||||
}
|
||||
|
||||
return [$parts[1], $parts[2] ?? null];
|
||||
}
|
||||
|
||||
private static function inRange(string $version, array $range, ?string $latest): bool
|
||||
{
|
||||
[$minimum, $maximum] = $range;
|
||||
$maximum ??= $latest;
|
||||
|
||||
return version_compare($version, $minimum, '>=') && ($maximum === null || version_compare($version, $maximum, '<='));
|
||||
}
|
||||
|
||||
private static function releases(): array
|
||||
{
|
||||
$result = [];
|
||||
$deadline = hrtime(true) + 10_000_000_000;
|
||||
for ($page = 1; ; $page++) {
|
||||
$timeout = (int) (($deadline - hrtime(true)) / 1_000_000);
|
||||
if ($timeout <= 0) {
|
||||
throw new RuntimeException('查询 LaySite 发布列表超时。');
|
||||
}
|
||||
$entries = self::remoteJson(self::RELEASES_PATH . "?limit=50&page=$page", 1024 * 1024, $timeout);
|
||||
if (!is_array($entries)) {
|
||||
throw new RuntimeException('LaySite 发布列表格式无效。');
|
||||
}
|
||||
foreach ($entries as $entry) {
|
||||
if (!is_string($entry->tag_name ?? null) || !is_bool($entry->draft ?? null) || !is_bool($entry->prerelease ?? null)) {
|
||||
throw new RuntimeException('LaySite 发布列表格式无效。');
|
||||
}
|
||||
if (!$entry->draft && !$entry->prerelease && preg_match(self::TAG, $entry->tag_name)) {
|
||||
$result[$entry->tag_name] = $entry;
|
||||
}
|
||||
}
|
||||
if (count($entries) < 50) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
uksort($result, static fn (string $a, string $b): int => version_compare(substr($b, 1), substr($a, 1)));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private static function remoteJson(string $path, int $limit, int $timeout): mixed
|
||||
{
|
||||
$stream = fopen('php://temp', 'w+b');
|
||||
if ($stream === false) {
|
||||
throw new RuntimeException('无法创建更新查询缓冲区。');
|
||||
}
|
||||
try {
|
||||
self::download($path, $stream, $limit, $timeout);
|
||||
rewind($stream);
|
||||
|
||||
return json_decode((string) stream_get_contents($stream), flags: JSON_THROW_ON_ERROR);
|
||||
} finally {
|
||||
fclose($stream);
|
||||
}
|
||||
}
|
||||
|
||||
private static function chooseRelease(array $releases): ?string
|
||||
{
|
||||
if ($releases === []) {
|
||||
echo "暂无可升级的正式发布版本。\n";
|
||||
return null;
|
||||
}
|
||||
$tags = array_keys($releases);
|
||||
foreach ($tags as $index => $tag) {
|
||||
$release = $releases[$tag];
|
||||
$title = self::terminalText($release->name ?? '');
|
||||
$details = self::terminalText($release->body ?? '');
|
||||
printf("\n%d. %s%s\n", $index + 1, $tag, $title === '' || $title === $tag ? '' : ' · ' . str_replace("\n", ' ', $title));
|
||||
echo ' ' . str_replace("\n", "\n ", $details === '' ? '暂无发布说明。' : $details) . PHP_EOL;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
echo "\n请选择版本编号或输入标签,回车取消\n> ";
|
||||
$selection = trim((string) fgets(STDIN));
|
||||
if ($selection === '' || strtolower($selection) === 'q') {
|
||||
return null;
|
||||
}
|
||||
if (isset($releases[$selection])) {
|
||||
return $selection;
|
||||
}
|
||||
if (ctype_digit($selection) && isset($tags[(int) $selection - 1])) {
|
||||
return $tags[(int) $selection - 1];
|
||||
}
|
||||
echo "请输入列表中的编号或版本。\n";
|
||||
}
|
||||
}
|
||||
|
||||
private static function terminalText(mixed $value): string
|
||||
{
|
||||
if (!is_string($value)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return trim(preg_replace('/[^\P{C}\n\t]/u', '', str_replace(["\r\n", "\r"], "\n", $value)) ?? '');
|
||||
}
|
||||
|
||||
private function update(string $current, string $target, ?string $backup): void
|
||||
{
|
||||
$runtime = $this->root . '/runtime';
|
||||
self::makeDirectory($runtime);
|
||||
$lock = fopen($runtime . '/release-update.lock', 'c');
|
||||
if ($lock === false || !flock($lock, LOCK_EX | LOCK_NB)) {
|
||||
throw new RuntimeException('无法取得 LaySite 更新锁。');
|
||||
}
|
||||
$pending = $runtime . '/release-update-pending';
|
||||
$work = $this->root . '/.laysite-update-' . bin2hex(random_bytes(8));
|
||||
try {
|
||||
if (file_exists($pending) || is_link($pending)) {
|
||||
throw new RuntimeException('上次更新尚未完成。请保留该次更新的备份,并检查 ' . trim((string) file_get_contents($pending)));
|
||||
}
|
||||
if ($this->version() !== $current) {
|
||||
throw new RuntimeException('站点版本已经变更,请重新选择更新目标。');
|
||||
}
|
||||
$backup = $this->backupPath($backup, $current, $target);
|
||||
|
||||
if (!mkdir($work, 0700)) {
|
||||
throw new RuntimeException('无法建立更新暂存目录。');
|
||||
}
|
||||
$base = $this->archive(self::LEGACY_BASES[$current] ?? ('v' . $current), $current, $work . '/base.zip');
|
||||
// Accept the VERSION file already identified above, including the old release numbering.
|
||||
$base['VERSION']['hash'] = hash_file('sha256', $this->root . '/VERSION');
|
||||
$release = $this->archive($target, substr($target, 1), $work . '/release.zip');
|
||||
$plan = $this->plan($base, $release, $backup);
|
||||
$php = getenv('LAYSITE_PHP') ?: PHP_BINARY;
|
||||
self::run([$php, 'bin/backup.php', 'export', $backup], $this->root);
|
||||
$vendor = $this->stageDependencies($work, $plan, $release);
|
||||
if ($plan !== $this->plan($base, $release, $backup)) {
|
||||
throw new RuntimeException('准备更新期间,站点文件发生了变化。');
|
||||
}
|
||||
$this->apply($work, $pending, $plan, $release, $vendor, $php);
|
||||
printf("已更新至 %s,可使用原站点配置启动 Webman。\n", $target);
|
||||
} finally {
|
||||
if (is_dir($work) && !is_file($pending)) {
|
||||
self::removeDirectory($work);
|
||||
}
|
||||
fclose($lock);
|
||||
}
|
||||
}
|
||||
|
||||
private function backupPath(?string $path, string $current, string $target): string
|
||||
{
|
||||
if ($path === null) {
|
||||
$directory = $this->root . '/storage/backups';
|
||||
self::makeDirectory($directory);
|
||||
$path = sprintf('%s/laysite-v%s-%s-%s-%s.tar', $directory, $current, $target, gmdate('Ymd-His'), bin2hex(random_bytes(4)));
|
||||
} elseif (!str_starts_with($path, '/')) {
|
||||
$path = $this->root . '/' . $path;
|
||||
}
|
||||
$directory = realpath(dirname($path));
|
||||
if ($directory === false || !str_ends_with($path, '.tar') || file_exists($path) || is_link($path)) {
|
||||
throw new RuntimeException('请指定已存在的目录和一个尚未使用的 .tar 备份文件名。');
|
||||
}
|
||||
$path = $directory . '/' . basename($path);
|
||||
printf("站点备份将写入 %s\n", $path);
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
private function version(): string
|
||||
{
|
||||
$version = trim((string) @file_get_contents($this->root . '/VERSION'));
|
||||
if (!preg_match('/^\d+\.\d+\.\d+$/D', $version)) {
|
||||
throw new RuntimeException('请从已安装 LaySite 的目录运行更新器。');
|
||||
}
|
||||
|
||||
if ($version === '1.4.0') {
|
||||
foreach (self::LEGACY_VERSIONS as $tag => $files) {
|
||||
foreach ($files as $path => $hash) {
|
||||
if (@hash_file('sha256', $this->root . '/' . $path) === $hash) {
|
||||
return $tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $version;
|
||||
}
|
||||
|
||||
private static function download(string $path, $stream, int $limit, int $timeout): void
|
||||
{
|
||||
$curl = curl_init(self::HOST . $path);
|
||||
$bytes = 0;
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_USERAGENT => 'LaySite release updater',
|
||||
CURLOPT_CONNECTTIMEOUT_MS => min(3500, $timeout),
|
||||
CURLOPT_TIMEOUT_MS => $timeout,
|
||||
CURLOPT_FOLLOWLOCATION => false,
|
||||
CURLOPT_WRITEFUNCTION => static function (CurlHandle $curl, string $chunk) use ($stream, $limit, &$bytes): int {
|
||||
$bytes += strlen($chunk);
|
||||
|
||||
return $bytes > $limit ? 0 : (int) fwrite($stream, $chunk);
|
||||
},
|
||||
]);
|
||||
if (curl_exec($curl) === false) {
|
||||
throw new RuntimeException('下载 LaySite 发布文件失败。' . ($bytes > $limit ? '文件超过大小限制。' : curl_error($curl)));
|
||||
}
|
||||
$status = curl_getinfo($curl, CURLINFO_RESPONSE_CODE);
|
||||
if ($status !== 200) {
|
||||
throw new RuntimeException("无法读取 LaySite 发布文件 {$path}(HTTP $status)。");
|
||||
}
|
||||
}
|
||||
|
||||
private function archive(string $ref, string $version, string $path): array
|
||||
{
|
||||
$stream = fopen($path, 'xb');
|
||||
if ($stream === false) {
|
||||
throw new RuntimeException('无法写入发布 ZIP。');
|
||||
}
|
||||
try {
|
||||
self::download(self::PROJECT . "/archive/$ref.zip", $stream, self::MAX_ARCHIVE_BYTES, 60_000);
|
||||
} finally {
|
||||
fclose($stream);
|
||||
}
|
||||
$archive = new PharData($path);
|
||||
$files = [];
|
||||
$size = 0;
|
||||
$prefix = 'phar://' . $path . '/laysite/';
|
||||
foreach (new RecursiveIteratorIterator($archive) as $entry) {
|
||||
$uri = $entry->getPathname();
|
||||
if (!str_starts_with($uri, $prefix)) {
|
||||
throw new RuntimeException('发布 ZIP 的目录结构无效。');
|
||||
}
|
||||
$name = substr($uri, strlen($prefix));
|
||||
if ($entry->isLink() || !$entry->isFile() || str_contains($name, '\\')
|
||||
|| preg_match('~(?:^|/)\.{0,2}(?:/|$)|[\x00-\x1f\x7f]~', $name)) {
|
||||
throw new RuntimeException('发布 ZIP 包含无效的文件路径。');
|
||||
}
|
||||
$size += $entry->getSize();
|
||||
if ($size > self::MAX_EXPANDED_BYTES) {
|
||||
throw new RuntimeException('发布 ZIP 解压后的大小超过限制。');
|
||||
}
|
||||
if (!preg_match(self::MANAGED, $name)) {
|
||||
continue;
|
||||
}
|
||||
$hash = hash_file('sha256', $uri);
|
||||
if ($hash === false || isset($files[$name])) {
|
||||
throw new RuntimeException('发布 ZIP 文件损坏。');
|
||||
}
|
||||
$files[$name] = ['uri' => $uri, 'hash' => $hash, 'mode' => $entry->getPerms() & 0777];
|
||||
}
|
||||
foreach (['VERSION', 'start.php', 'bin/install.php', 'composer.json', 'composer.lock', 'resources/schema.sql'] as $required) {
|
||||
if (!isset($files[$required])) {
|
||||
throw new RuntimeException('发布 ZIP 缺少 ' . $required);
|
||||
}
|
||||
}
|
||||
$embedded = trim((string) file_get_contents($files['VERSION']['uri']));
|
||||
if ($embedded !== $version) {
|
||||
if ($embedded !== '1.4.0' || !isset(self::LEGACY_VERSIONS[$version])) {
|
||||
throw new RuntimeException('发布 ZIP 的 VERSION 与所选版本不一致。');
|
||||
}
|
||||
$canonical = $path . '.version';
|
||||
$contents = $version . "\n";
|
||||
if (file_put_contents($canonical, $contents) !== strlen($contents)) {
|
||||
throw new RuntimeException('无法暂存发布版本号。');
|
||||
}
|
||||
$files['VERSION'] = ['uri' => $canonical, 'hash' => hash('sha256', $contents), 'mode' => 0644];
|
||||
}
|
||||
|
||||
return $files;
|
||||
}
|
||||
|
||||
private function plan(array $base, array $release, string $backup): array
|
||||
{
|
||||
clearstatcache();
|
||||
require_once $this->root . '/vendor/autoload.php';
|
||||
$database = App\Content\Database::path();
|
||||
$media = App\Content\Media::directory();
|
||||
$protected = array_unique([
|
||||
$database, realpath($database) ?: $database, $media, realpath($media) ?: $media, $backup,
|
||||
]);
|
||||
$plan = [];
|
||||
$conflicts = [];
|
||||
foreach (array_keys($base + $release) as $name) {
|
||||
$old = $base[$name]['hash'] ?? null;
|
||||
$next = $release[$name]['hash'] ?? null;
|
||||
if ($old === $next) {
|
||||
continue;
|
||||
}
|
||||
try {
|
||||
$path = $this->managedPath($name);
|
||||
foreach ($protected as $reserved) {
|
||||
if ($path === $reserved || str_starts_with($path, rtrim($reserved, '/') . '/')
|
||||
|| str_starts_with($reserved, $path . '/') || in_array($path, [$database . '.key', $database . '-wal', $database . '-shm'], true)) {
|
||||
throw new RuntimeException('更新路径与站点数据重叠。');
|
||||
}
|
||||
}
|
||||
$local = is_file($path) ? hash_file('sha256', $path) : null;
|
||||
if ($local === $next) {
|
||||
continue;
|
||||
}
|
||||
if ($local !== $old) {
|
||||
$conflicts[] = $name;
|
||||
continue;
|
||||
}
|
||||
$plan[] = $name;
|
||||
} catch (RuntimeException) {
|
||||
$conflicts[] = $name;
|
||||
}
|
||||
}
|
||||
if ($conflicts !== []) {
|
||||
sort($conflicts);
|
||||
throw new RuntimeException("以下路径与站点定制或数据冲突,尚未替换任何文件:\n" . implode("\n", $conflicts));
|
||||
}
|
||||
if (array_intersect(['composer.json', 'composer.lock'], $plan)) {
|
||||
$vendor = $this->root . '/vendor';
|
||||
foreach ($protected as $reserved) {
|
||||
if ($reserved === $vendor || str_starts_with($reserved, $vendor . '/')) {
|
||||
throw new RuntimeException('站点数据或备份路径位于 vendor 目录,请先调整该路径。');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $plan;
|
||||
}
|
||||
|
||||
private function managedPath(string $name): string
|
||||
{
|
||||
$path = $this->root;
|
||||
$parts = explode('/', $name);
|
||||
$leaf = array_pop($parts);
|
||||
foreach ($parts as $part) {
|
||||
$path .= '/' . $part;
|
||||
if (is_link($path) || (file_exists($path) && !is_dir($path))) {
|
||||
throw new RuntimeException('更新路径不可写:' . $name);
|
||||
}
|
||||
}
|
||||
$path .= '/' . $leaf;
|
||||
if (is_link($path) || (file_exists($path) && !is_file($path))) {
|
||||
throw new RuntimeException('更新路径不可写:' . $name);
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
private function stageDependencies(string $work, array $plan, array $release): ?string
|
||||
{
|
||||
if (!array_intersect(['composer.json', 'composer.lock'], $plan)) {
|
||||
return null;
|
||||
}
|
||||
$dependencies = $work . '/dependencies';
|
||||
self::makeDirectory($dependencies);
|
||||
foreach (['composer.json', 'composer.lock'] as $name) {
|
||||
$source = in_array($name, $plan, true) ? $release[$name]['uri'] : $this->root . '/' . $name;
|
||||
if (!copy($source, $dependencies . '/' . $name)) {
|
||||
throw new RuntimeException('无法准备 Composer 依赖。');
|
||||
}
|
||||
}
|
||||
$vendor = $dependencies . '/vendor';
|
||||
self::run([
|
||||
getenv('LAYSITE_COMPOSER') ?: 'composer', 'install', '--no-dev', '--prefer-dist',
|
||||
'--no-interaction', '--no-scripts', '--no-plugins',
|
||||
], $dependencies, array_replace(getenv(), ['COMPOSER' => 'composer.json', 'COMPOSER_VENDOR_DIR' => $vendor]));
|
||||
if (!is_file($vendor . '/autoload.php')) {
|
||||
throw new RuntimeException('Composer 没有在暂存目录生成依赖。');
|
||||
}
|
||||
|
||||
return $vendor;
|
||||
}
|
||||
|
||||
private function apply(string $work, string $pending, array $plan, array $release, ?string $vendor, string $php): void
|
||||
{
|
||||
$staged = [];
|
||||
foreach ($plan as $name) {
|
||||
$staged[$name] = null;
|
||||
if (isset($release[$name])) {
|
||||
$file = $work . '/files/' . $name;
|
||||
self::makeDirectory(dirname($file));
|
||||
$mode = $release[$name]['mode'] & 0755;
|
||||
if ($name === 'bin/update.sh') {
|
||||
$mode |= 0100;
|
||||
}
|
||||
if (!copy($release[$name]['uri'], $file) || !chmod($file, $mode ?: 0644)) {
|
||||
throw new RuntimeException('无法暂存文件 ' . $name);
|
||||
}
|
||||
$staged[$name] = $file;
|
||||
}
|
||||
}
|
||||
if ($vendor !== null) {
|
||||
if (is_link($this->root . '/vendor') || !is_dir($this->root . '/vendor')) {
|
||||
throw new RuntimeException('站点的 vendor 目录需要手动更新。');
|
||||
}
|
||||
$staged['vendor'] = $vendor;
|
||||
}
|
||||
$marker = fopen($pending, 'x');
|
||||
if ($marker === false) {
|
||||
throw new RuntimeException('无法写入更新记录。');
|
||||
}
|
||||
$record = $work . PHP_EOL;
|
||||
$written = fwrite($marker, $record);
|
||||
fclose($marker);
|
||||
if ($written !== strlen($record)) {
|
||||
unlink($pending);
|
||||
throw new RuntimeException('无法写入完整的更新记录。');
|
||||
}
|
||||
$applied = [];
|
||||
try {
|
||||
foreach ($staged as $name => $source) {
|
||||
$destination = $this->root . '/' . $name;
|
||||
$previous = $work . '/previous/' . $name;
|
||||
if (file_exists($destination)) {
|
||||
self::makeDirectory(dirname($previous));
|
||||
self::move($destination, $previous);
|
||||
}
|
||||
$applied[] = $name;
|
||||
if ($source !== null) {
|
||||
self::makeDirectory(dirname($destination));
|
||||
self::move($source, $destination);
|
||||
}
|
||||
}
|
||||
self::run([$php, 'bin/install.php'], $this->root);
|
||||
} catch (Throwable $error) {
|
||||
try {
|
||||
foreach (array_reverse($applied) as $name) {
|
||||
$path = $this->root . '/' . $name;
|
||||
if (file_exists($path)) {
|
||||
$discard = $work . '/discard/' . $name;
|
||||
self::makeDirectory(dirname($discard));
|
||||
self::move($path, $discard);
|
||||
}
|
||||
$previous = $work . '/previous/' . $name;
|
||||
if (file_exists($previous)) {
|
||||
self::move($previous, $path);
|
||||
}
|
||||
}
|
||||
unlink($pending);
|
||||
} catch (Throwable $rollback) {
|
||||
throw new RuntimeException('更新回退未完成。原文件保存在 ' . $work . '。' . $rollback->getMessage(), previous: $error);
|
||||
}
|
||||
throw new RuntimeException('更新失败,原程序文件已恢复。' . $error->getMessage(), previous: $error);
|
||||
}
|
||||
unlink($pending);
|
||||
}
|
||||
|
||||
private static function move(string $from, string $to): void
|
||||
{
|
||||
if (!rename($from, $to)) {
|
||||
throw new RuntimeException('无法移动 ' . $from . ' 到 ' . $to);
|
||||
}
|
||||
}
|
||||
|
||||
private static function run(array $command, string $directory, ?array $environment = null): void
|
||||
{
|
||||
$process = proc_open($command, [STDIN, STDOUT, STDERR], $pipes, $directory, $environment);
|
||||
if (!is_resource($process) || proc_close($process) !== 0) {
|
||||
throw new RuntimeException('命令执行失败:' . implode(' ', array_slice($command, 0, 2)));
|
||||
}
|
||||
}
|
||||
|
||||
private static function makeDirectory(string $path): void
|
||||
{
|
||||
if (!is_dir($path) && !mkdir($path, 0755, true) && !is_dir($path)) {
|
||||
throw new RuntimeException('无法建立目录 ' . $path);
|
||||
}
|
||||
}
|
||||
|
||||
private static function removeDirectory(string $path): void
|
||||
{
|
||||
$entries = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS),
|
||||
RecursiveIteratorIterator::CHILD_FIRST);
|
||||
foreach ($entries as $entry) {
|
||||
if ($entry->isDir() && !$entry->isLink()) {
|
||||
rmdir($entry->getPathname());
|
||||
} else {
|
||||
unlink($entry->getPathname());
|
||||
}
|
||||
}
|
||||
rmdir($path);
|
||||
}
|
||||
}
|
||||
|
||||
$target = $argv[1] ?? null;
|
||||
$backup = $argv[2] ?? null;
|
||||
if ($argc > 3 || ($target === 'check' && $backup !== null)
|
||||
|| ($target !== null && $target !== 'check' && !preg_match('/^v\d+\.\d+\.\d+$/D', $target))) {
|
||||
fwrite(STDERR, "用法:php bin/update.php [check | vX.Y.Z [备份路径.tar]]\n");
|
||||
exit(2);
|
||||
}
|
||||
|
||||
umask(0027);
|
||||
try {
|
||||
(new LaySiteUpdater(getcwd()))->execute($target, $backup);
|
||||
} catch (Throwable $error) {
|
||||
fwrite(STDERR, $error->getMessage() . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
php_bin=${LAYSITE_PHP:-php}
|
||||
composer_bin=${LAYSITE_COMPOSER:-composer}
|
||||
target=${1:-check}
|
||||
|
||||
if [ "$target" = check ]; then
|
||||
git fetch origin --tags
|
||||
git describe --tags --always
|
||||
git tag --list 'v[0-9]*' --sort=-version:refname
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! printf '%s\n' "$target" | grep -Eq '^v[0-9]+\.[0-9]+\.[0-9]+$' || [ "$#" -ne 2 ]; then
|
||||
printf '%s\n' 'Usage: bin/update.sh check | vX.Y.Z /path/snapshot.tar' >&2
|
||||
exit 2
|
||||
fi
|
||||
if [ -n "$(git status --porcelain)" ]; then
|
||||
printf '%s\n' 'Commit or set aside local source changes before updating.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git fetch origin --tags
|
||||
current=$(git rev-parse HEAD)
|
||||
next=$(git rev-parse --verify "refs/tags/$target^{commit}")
|
||||
git merge-base --is-ancestor "$current" "$next"
|
||||
"$php_bin" bin/backup.php export "$2"
|
||||
|
||||
if git switch --detach "$next" &&
|
||||
"$composer_bin" install --no-dev --prefer-dist --no-interaction --no-scripts &&
|
||||
"$php_bin" bin/install.php
|
||||
then
|
||||
printf 'Updated to %s. Start Webman with the original site environment.\n' "$target"
|
||||
else
|
||||
git switch --detach "$current"
|
||||
"$composer_bin" install --no-dev --prefer-dist --no-interaction --no-scripts
|
||||
printf 'Update failed. The prior source version is checked out and the backup is at %s.\n' "$2" >&2
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Content\Licenses;
|
||||
use App\Content\View;
|
||||
use App\Controller\AccountController;
|
||||
use App\Controller\AdminController;
|
||||
use App\Controller\DesignController;
|
||||
@@ -26,6 +27,10 @@ Route::get('/articles/category/{category:[a-z0-9-]+}', [SiteController::class, '
|
||||
Route::get('/articles/tag/{tag:[^/]+}', [SiteController::class, 'tagged']);
|
||||
Route::get('/articles/feed/{slug:[a-z0-9-]+}/{key:[a-z0-9-]+}', [SiteController::class, 'feedArchive']);
|
||||
Route::get('/articles/{slug:[a-z0-9-]+}', [SiteController::class, 'article']);
|
||||
Route::get('/main', static fn () => View::redirect('/articles', 301));
|
||||
Route::get('/main/category/{id:[0-9]+}.html', [SiteController::class, 'legacyCategory']);
|
||||
Route::get('/main/tag/{tag:[^/]+}', [SiteController::class, 'legacyTag']);
|
||||
Route::get('/news/id/{id:[0-9]+}.html', [SiteController::class, 'legacyArticle']);
|
||||
Route::get('/robots.txt', [SiteController::class, 'robots']);
|
||||
Route::get('/sitemap.xml', [SiteController::class, 'sitemap']);
|
||||
Route::get('/favicon.ico', [SiteController::class, 'favicon']);
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace LaysenseSite;
|
||||
|
||||
use App\Config\Environment;
|
||||
use App\Content\Assets;
|
||||
use App\Content\Repository;
|
||||
use App\Content\View;
|
||||
use Webman\Http\Request;
|
||||
use Webman\Http\Response;
|
||||
use Webman\MiddlewareInterface;
|
||||
|
||||
final class Site implements MiddlewareInterface
|
||||
{
|
||||
private const FAVICON = '/assets/favicon.png';
|
||||
private const SOCIAL_IMAGE = '/assets/original/home-hero.webp';
|
||||
private const MIME = [
|
||||
'css' => 'text/css; charset=utf-8', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg',
|
||||
'png' => 'image/png', 'webp' => 'image/webp', 'svg' => 'image/svg+xml', 'mp4' => 'video/mp4',
|
||||
];
|
||||
private const PAGE_REDIRECTS = [
|
||||
'/main' => '/articles',
|
||||
'/articles/category/services' => '/articles/category/catalog',
|
||||
'/articles/category/supported-projects' => '/articles/category/projects',
|
||||
];
|
||||
private const SECTION_STYLES = ['home' => ['product' => 'projects', 'about' => 'about'], 'pagepan' => ['demo' => 'demos']];
|
||||
private const PHOTO_CREDITS = [
|
||||
'/assets/page-templates/studio-letterpress.webp' => ['Adam Lusch', 'CC BY-SA 2.0', 'https://commons.wikimedia.org/wiki/File:Wood_Type_close-up.jpg', 'https://creativecommons.org/licenses/by-sa/2.0/'],
|
||||
'/assets/page-templates/dusk-dunes.webp' => ['Bob Wick / BLM Utah', '公有领域', 'https://commons.wikimedia.org/wiki/File:Utah_Dunes_Landscape_-_West_Desert_District.jpg', ''],
|
||||
];
|
||||
|
||||
public static function assets(): array
|
||||
{
|
||||
static $assets;
|
||||
|
||||
return $assets ??= ['assets/laysense-site-compat.css', ...json_decode(file_get_contents(__DIR__ . '/assets.json'), true, flags: JSON_THROW_ON_ERROR)];
|
||||
}
|
||||
|
||||
public function process(Request $request, callable $handler): Response
|
||||
{
|
||||
$path = $request->path();
|
||||
$asset = ltrim($path, '/');
|
||||
$read = in_array($request->method(), ['GET', 'HEAD'], true);
|
||||
if ($read && in_array($asset, self::assets(), true)) {
|
||||
return $this->legacyAsset($request, $asset);
|
||||
}
|
||||
$response = $handler($request);
|
||||
if ($read && isset(self::PAGE_REDIRECTS[$path]) && $response->getStatusCode() === 404) {
|
||||
return View::redirect(self::PAGE_REDIRECTS[$path], 301);
|
||||
}
|
||||
if ($read && $path === '/favicon.ico' && $response->getStatusCode() === 301) {
|
||||
return $response->withHeader('Location', self::FAVICON);
|
||||
}
|
||||
$preview = preg_match('~^/admin/pages/([a-z0-9-]+)/preview$~D', $path, $match) === 1;
|
||||
if (!$read || (str_starts_with($path, '/admin') && !$preview)
|
||||
|| !str_starts_with((string) $response->getHeader('Content-Type'), 'text/html')
|
||||
|| !str_contains($body = $response->rawBody(), '</head>')) {
|
||||
return $response;
|
||||
}
|
||||
$slug = $preview ? $match[1] : ($path === '/' ? 'home' : trim($path, '/'));
|
||||
$body = $this->brand($body, $preview);
|
||||
$body = $this->theme($body, $slug, $preview && $request->get('canvas') === '1');
|
||||
|
||||
return $response->withBody($body);
|
||||
}
|
||||
|
||||
private function legacyAsset(Request $request, string $asset): Response
|
||||
{
|
||||
if ($asset === 'assets/laysense-site-compat.css') {
|
||||
return (new Response(200, ['Content-Type' => self::MIME['css'], 'X-Content-Type-Options' => 'nosniff']))
|
||||
->withFile(__DIR__ . '/compat.css');
|
||||
}
|
||||
$directory = realpath(Environment::path('LAYSENSE_SITE_DIR', 'storage/laysense-site') . '/assets');
|
||||
$path = $directory === false ? false : realpath($directory . '/' . substr($asset, strlen('assets/')));
|
||||
if ($path === false || !str_starts_with($path, $directory . '/') || !is_file($path)) {
|
||||
return new Response(404);
|
||||
}
|
||||
$size = filesize($path);
|
||||
$headers = [
|
||||
'Content-Type' => self::MIME[pathinfo($asset, PATHINFO_EXTENSION)] ?? 'application/octet-stream',
|
||||
'X-Content-Type-Options' => 'nosniff',
|
||||
'Content-Security-Policy' => "default-src 'none'; sandbox",
|
||||
'Cache-Control' => 'public, max-age=3600',
|
||||
'Access-Control-Allow-Origin' => '*',
|
||||
'Accept-Ranges' => 'bytes',
|
||||
];
|
||||
$range = $request->header('range');
|
||||
if ($range === null) {
|
||||
return (new Response(200, $headers))->withFile($path);
|
||||
}
|
||||
$invalid = new Response(416, $headers + ['Content-Range' => "bytes */$size"]);
|
||||
if (!preg_match('/^bytes=(\d*)-(\d*)$/D', $range, $parts) || ($parts[1] === '' && $parts[2] === '')) {
|
||||
return $invalid;
|
||||
}
|
||||
$start = $parts[1] === '' ? max(0, $size - (int) $parts[2]) : (int) $parts[1];
|
||||
$stop = $parts[1] === '' || $parts[2] === '' ? $size - 1 : min($size - 1, (int) $parts[2]);
|
||||
if ($start > $stop) {
|
||||
return $invalid;
|
||||
}
|
||||
|
||||
return (new Response(206, $headers + ['Content-Range' => "bytes $start-$stop/$size"]))
|
||||
->withFile($path, $start, $stop - $start + 1);
|
||||
}
|
||||
|
||||
private function brand(string $html, bool $preview): string
|
||||
{
|
||||
$cdn = $preview ? '' : ((new Repository())->site()['cdn']['origin'] ?? '');
|
||||
$favicon = View::escape(Assets::url(self::FAVICON, $cdn));
|
||||
$html = preg_replace('~<link rel="icon"[^>]+>~', '<link rel="icon" href="' . $favicon . '" type="image/png">', $html, 1) ?? $html;
|
||||
$style = '<link rel="stylesheet" href="/assets/laysense.css"><link rel="stylesheet" href="/assets/laysense-site-compat.css">';
|
||||
if (!str_contains(substr($html, 0, strpos($html, '</head>')), 'property="og:image"')) {
|
||||
$url = $cdn === '' ? View::absolute(self::SOCIAL_IMAGE) : Assets::url(self::SOCIAL_IMAGE, $cdn);
|
||||
$style .= '<meta property="og:image" content="' . View::escape($url) . '">'
|
||||
. '<meta property="og:image:alt" content="来笙 Laysense">';
|
||||
}
|
||||
|
||||
return preg_replace('~</head>~', $style . '</head>', $html, 1) ?? $html;
|
||||
}
|
||||
|
||||
private function theme(string $html, string $slug, bool $canvas): string
|
||||
{
|
||||
if (in_array($slug, ['sc', 'shnu-sc'], true)) {
|
||||
$html = str_replace(['<body>', 'class="hero-visual app-frame'], ['<body class="copyright-service">', 'class="hero-visual app-frame hero-service-art'], $html);
|
||||
}
|
||||
if ($slug === 'home') {
|
||||
$html = preg_replace('~class="hero-visual app-frame~', 'class="hero-visual hero-illustration', $html, 1) ?? $html;
|
||||
if (!$canvas) {
|
||||
$html = preg_replace('~(<div class="hero-copy">.*)</h1>~sU', '$1<span class="home-cursor" aria-hidden="true">_</span></h1>', $html, 1) ?? $html;
|
||||
$html = preg_replace_callback('~<div class="hero-visual hero-illustration[^>]*>\s*<img\b[^>]+src="[^"]*/assets/original/home-hero\.webp"[^>]*>~',
|
||||
static fn (array $match): string => $match[0] . file_get_contents(__DIR__ . '/home-motion.svg'), $html, 1) ?? $html;
|
||||
}
|
||||
}
|
||||
foreach (self::SECTION_STYLES[$slug] ?? [] as $id => $style) {
|
||||
$html = preg_replace('~<section class="(section [^"]*)" id="' . $id . '"~',
|
||||
'<section class="$1 section-' . $style . '" id="' . $id . '"' . ($style === 'about' ? ' data-moment="iris-opens"' : ''),
|
||||
$html, 1) ?? $html;
|
||||
}
|
||||
if ($slug === 'home' || $slug === 'network') {
|
||||
$html = str_replace(['class="network-group" id="projects"', 'class="network-group" id="network-group-projects"', 'class="network-group" id="network-group-partners"'],
|
||||
['class="network-group" id="supported-projects"', 'class="network-group" id="supported-projects"', 'class="network-group" id="partners"'], $html);
|
||||
}
|
||||
foreach (self::PHOTO_CREDITS as $image => [$author, $license, $source, $terms]) {
|
||||
if (preg_match('~class="hero-visual [^"]*"[^>]*>\s*<img[^>]*src="[^"]*' . preg_quote($image, '~') . '"~', $html)) {
|
||||
$credit = '<p class="wrap page-photo-credit">摄影 <a href="' . View::escape($source) . '">' . View::escape($author) . '</a> · '
|
||||
. ($terms === '' ? View::escape($license) : '<a href="' . View::escape($terms) . '">' . View::escape($license) . '</a>') . '</p>';
|
||||
$html = str_replace('</main>', $credit . '</main>', $html);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
[
|
||||
"assets/favicon.png",
|
||||
"assets/laysense.css",
|
||||
"assets/original/10-1.png",
|
||||
"assets/original/10-2.png",
|
||||
"assets/original/10-3.png",
|
||||
"assets/original/1s.png",
|
||||
"assets/original/DNSPod.svg",
|
||||
"assets/original/IP.png",
|
||||
"assets/original/IdealShark_B.png",
|
||||
"assets/original/RAM.png",
|
||||
"assets/original/Redis.png",
|
||||
"assets/original/backup.png",
|
||||
"assets/original/chinadomain.png",
|
||||
"assets/original/component-element.mp4",
|
||||
"assets/original/copyright-wechat.png",
|
||||
"assets/original/copyright.webp",
|
||||
"assets/original/download.png",
|
||||
"assets/original/drag-in-components.mp4",
|
||||
"assets/original/edit-components.mp4",
|
||||
"assets/original/fast.png",
|
||||
"assets/original/footer-wordmark.webp",
|
||||
"assets/original/fw-banner.svg",
|
||||
"assets/original/highspeaker-logo-optimized.webp",
|
||||
"assets/original/highspeaker-ui-optimized.webp",
|
||||
"assets/original/highspeakerrz-optimized.webp",
|
||||
"assets/original/home-hero.webp",
|
||||
"assets/original/icon_rewrite.png",
|
||||
"assets/original/jeo-optimized.webp",
|
||||
"assets/original/locate.png",
|
||||
"assets/original/logo_img.png",
|
||||
"assets/original/mimirlib.png",
|
||||
"assets/original/nonat-optimized.webp",
|
||||
"assets/original/oneprovider_invert.svg",
|
||||
"assets/original/orange-optimized.webp",
|
||||
"assets/original/pagepan-editor-optimized.webp",
|
||||
"assets/original/pagepan-example.webp",
|
||||
"assets/original/pagepan-wechat.png",
|
||||
"assets/original/pagepan/cdn.svg",
|
||||
"assets/original/pagepan/cms.svg",
|
||||
"assets/original/pagepan/code.svg",
|
||||
"assets/original/pagepan/files.svg",
|
||||
"assets/original/pagepan/fonts.svg",
|
||||
"assets/original/pagepan/gradient.svg",
|
||||
"assets/original/pagepan/languages.svg",
|
||||
"assets/original/pagepan/seo.svg",
|
||||
"assets/original/pagepan/sitemap.svg",
|
||||
"assets/original/papepan-logo.svg",
|
||||
"assets/original/payment-alipay.png",
|
||||
"assets/original/payment-taobao.png",
|
||||
"assets/original/payment-wechat.png",
|
||||
"assets/original/qywx.png",
|
||||
"assets/original/shnu-hero.webp",
|
||||
"assets/original/smartroute.png",
|
||||
"assets/original/sorting-components.mp4",
|
||||
"assets/original/teo-optimized.webp",
|
||||
"assets/original/traffic.png",
|
||||
"assets/original/waf.png",
|
||||
"assets/page-templates/dusk-dunes.webp",
|
||||
"assets/page-templates/studio-letterpress.webp",
|
||||
"assets/service/code.svg",
|
||||
"assets/service/project.svg",
|
||||
"assets/service/support.svg",
|
||||
"assets/wordmark.webp"
|
||||
]
|
||||
@@ -1 +0,0 @@
|
||||
.footer-company .site-address { margin: .25rem 0 0; color: var(--muted); max-width: 26rem; font-style: italic; }
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
|
||||
return ['enable' => true];
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
|
||||
return ['files' => [dirname(__DIR__) . '/Site.php']];
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
|
||||
return ['@' => [LaysenseSite\Site::class]];
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
use App\Content\Repository;
|
||||
use App\Content\View;
|
||||
use App\Controller\SiteController;
|
||||
use LaysenseSite\Site;
|
||||
use support\Request;
|
||||
use Webman\Route;
|
||||
|
||||
foreach (Site::assets() as $asset) {
|
||||
// The global site middleware serves these entries before the maintenance-page middleware.
|
||||
Route::add(['GET', 'HEAD'], '/' . $asset, static fn () => response('', 404));
|
||||
}
|
||||
|
||||
foreach ([
|
||||
'/main/category/1.html' => '/articles/category/product',
|
||||
'/main/category/2.html' => '/articles/category/news',
|
||||
'/main/category/3.html' => '/articles/category/announcement',
|
||||
'/main/category/5.html' => '/#supported-projects',
|
||||
'/main/category/6.html' => '/#partners',
|
||||
] as $old => $new) {
|
||||
Route::add(['GET', 'HEAD'], $old, static fn () => View::redirect($new, 301));
|
||||
}
|
||||
|
||||
Route::add(['GET', 'HEAD'], '/main/tag/{tag:[^/]+}', static function (Request $request, string $tag) {
|
||||
return View::redirect('/articles/tag/' . rawurlencode(rawurldecode($tag)), 301);
|
||||
});
|
||||
Route::add(['GET', 'HEAD'], '/news/id/{id:[0-9]+}.html', static function (Request $request, string $id) {
|
||||
$article = (new Repository())->legacyArticle('/news/id/' . $id . '.html');
|
||||
|
||||
return $article ? View::redirect('/articles/' . $article['slug'], 301) : (new SiteController())->missing($request);
|
||||
});
|
||||
@@ -9,14 +9,12 @@ jQuery(function ($) {
|
||||
$updateStatus.text('正在查询上游仓库…');
|
||||
$.ajax({url: '/admin/about/update', dataType: 'json', timeout: 7500})
|
||||
.done(({current, latest, comparison}) => {
|
||||
if (latest === null) {
|
||||
$updateStatus.text('上游仓库暂无已发布版本。');
|
||||
} else if (comparison > 0) {
|
||||
$updateStatus.text('发现已发布的新版本 ' + latest + ',当前版本为 ' + current + '。');
|
||||
if (comparison > 0) {
|
||||
$updateStatus.text('发现新版本 ' + latest + ',当前版本为 ' + current + '。');
|
||||
} else if (comparison < 0) {
|
||||
$updateStatus.text('当前版本 ' + current + ' 高于上游最新已发布版本 ' + latest + '。');
|
||||
$updateStatus.text('当前版本 ' + current + ' 高于上游版本 ' + latest + '。');
|
||||
} else {
|
||||
$updateStatus.text('当前版本 ' + current + ' 已是上游最新发布版本。');
|
||||
$updateStatus.text('当前版本 ' + current + ' 已与上游仓库一致。');
|
||||
}
|
||||
})
|
||||
.fail(({status, responseJSON}) => {
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
.canvas-format-tools [aria-pressed=true] { background: var(--accent-light); color: var(--accent-deep); }
|
||||
.canvas-spacing-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
|
||||
.canvas-spacing-fields input { padding-inline: .4rem; }
|
||||
.canvas-spacing-preset { grid-column: 1 / -1; grid-template-columns: max-content minmax(0, 15rem); align-items: center; }
|
||||
.studio-canvas-toolbar button:disabled { opacity: .5; cursor: default; }
|
||||
.preview-selector { display: flex; gap: .35rem; flex-wrap: wrap; }
|
||||
.preview-selector [aria-pressed="true"] { background: var(--accent-light); color: var(--accent-deep); }
|
||||
@@ -163,7 +162,7 @@
|
||||
.studio-workspace .studio-frame-window { height: max(34rem, calc(100dvh - 16rem)); }
|
||||
.studio-workspace .studio-preview h2 { font-size: 1.2rem; }
|
||||
.studio-presets { display: grid; gap: .4rem; }
|
||||
.studio-pending button {
|
||||
.studio-library .studio-layers button:not(.button), .studio-pending button {
|
||||
width: 100%;
|
||||
min-height: 2.75rem;
|
||||
padding: .55rem .75rem;
|
||||
@@ -182,6 +181,9 @@
|
||||
.studio-layers { border-top: 1px solid var(--line); margin-top: .85rem; padding-top: .55rem; }
|
||||
.studio-layers summary { cursor: pointer; font-weight: 620; }
|
||||
.studio-layers[open] > summary { margin-bottom: .55rem; }
|
||||
.studio-library .studio-layers > button + button { margin-top: .3rem; }
|
||||
.studio-layers .studio-blocks li { display: grid; gap: .4rem; }
|
||||
.studio-layers .studio-block-actions .button { min-height: 2.25rem; padding: .25rem .5rem; font-size: .8rem; }
|
||||
.studio-media-sizing { position: absolute; z-index: 1; inset: auto .6rem .6rem auto; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; padding: .45rem .6rem; max-width: calc(100% - 1.2rem); background: var(--accent-light); border: 1px solid var(--line); border-radius: .45rem; }
|
||||
.studio-element-tools {
|
||||
position: absolute; z-index: 3; display: flex; align-items: center; gap: .12rem; padding: .18rem;
|
||||
@@ -403,53 +405,3 @@
|
||||
border: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Studio source, media controls and layer tree */
|
||||
.media-upload-fields, .media-filters { align-items: start; }
|
||||
.media-upload-fields input[type=file] { padding: .4rem; min-width: 0; font-size: .9rem; }
|
||||
.media-upload-fields input::file-selector-button {
|
||||
margin-inline-end: .6rem; border: 0; border-radius: .35rem; padding: .55rem .75rem;
|
||||
color: var(--accent-deep); background: var(--accent-light); font: inherit; cursor: pointer;
|
||||
}
|
||||
.media-filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
|
||||
.media-library [data-library-count] { margin: .65rem 0 1rem; }
|
||||
@media (max-width: 42rem) { .media-filters { grid-template-columns: minmax(0, 1fr); } }
|
||||
|
||||
.canvas-source { width: min(56rem, calc(100% - 2rem)); }
|
||||
.canvas-source textarea { font: .9rem / 1.55 var(--mono); tab-size: 4; }
|
||||
.canvas-source .CodeMirror {
|
||||
height: clamp(12rem, 50vh, 32rem);
|
||||
margin-top: .4rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: .5rem;
|
||||
font: .9rem / 1.55 var(--mono);
|
||||
}
|
||||
.canvas-source .CodeMirror-focused { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
.picker-actions { justify-content: flex-start; margin-top: .85rem; }
|
||||
.admin-action-dialog { max-width: min(30rem, calc(100% - 2rem)); }
|
||||
.admin-action-dialog h2, #media-picker h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.018em; }
|
||||
.canvas-image-display { display: flex; align-items: center; gap: .35rem; font-size: .85rem; }
|
||||
.canvas-image-display select, .canvas-format-tools input[type=color] {
|
||||
background: var(--white); border: 1px solid var(--line); border-radius: .35rem;
|
||||
color: var(--ink); min-height: 2rem; font: inherit; padding: .22rem .35rem;
|
||||
}
|
||||
.canvas-format-tools input[type=color] { width: 2.2rem; }
|
||||
.canvas-format-tools [data-clear-color] svg { width: 1rem; height: 1rem; }
|
||||
.admin-system-info dl, .admin-license-project, .admin-license-list { max-width: 52rem; }
|
||||
|
||||
.studio-layers .studio-layer-tree {
|
||||
display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none;
|
||||
}
|
||||
.studio-layers .studio-layer-tree .studio-layer-tree { margin-inline-start: .55rem; padding-inline-start: .35rem; border-inline-start: 1px solid var(--line); }
|
||||
.studio-layer-row { min-width: 0; border: 1px solid transparent; border-radius: .35rem; }
|
||||
.studio-layer-row[data-drop=before] { border-block-start-color: var(--accent); }
|
||||
.studio-layer-row[data-drop=after] { border-block-end-color: var(--accent); }
|
||||
.studio-layer-row[data-drop=inside], .studio-layer-row[aria-current=true] { background: var(--accent-light); }
|
||||
.studio-layer-label { min-width: 0; overflow-wrap: anywhere; }
|
||||
.studio-layer-caption { font-weight: 620; display: flex; align-items: baseline; gap: .3rem; }
|
||||
.studio-layer-caption small { font: .7rem var(--mono); color: var(--muted); }
|
||||
.studio-layer-row[draggable=true] { cursor: grab; }
|
||||
.studio-layers .studio-layer-actions { display: flex; flex-wrap: wrap; gap: .16rem; margin-block-end: .25rem; }
|
||||
.studio-layers .studio-layer-actions .button { min-height: 1.7rem; padding: .18rem .26rem; }
|
||||
.studio-layer-actions .button svg { width: 1rem; height: 1rem; }
|
||||
.studio-layer-details > summary { font-weight: 500; font-size: .8rem; color: var(--muted); }
|
||||
|
||||
@@ -1,32 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
jQuery(function ($) {
|
||||
const $actionDialog = $('#admin-action-dialog');
|
||||
const $actionField = $actionDialog.find('[data-action-field]');
|
||||
const $actionValue = $actionField.find('[data-action-value]');
|
||||
|
||||
window.laySiteAction = function ({title, message = '', label, value = '', readOnly = false, accept = '确定'}) {
|
||||
const dialog = $actionDialog.get(0);
|
||||
if (!dialog || dialog.open) return Promise.resolve(null);
|
||||
const hasInput = Boolean(label);
|
||||
$actionDialog.find('[data-action-title]').text(title);
|
||||
$actionDialog.find('[data-action-message]').text(message).prop('hidden', !message);
|
||||
$actionDialog.find('[data-action-label]').text(label || '');
|
||||
$actionField.prop('hidden', !hasInput);
|
||||
$actionValue.val(value).prop({disabled: !hasInput, readOnly});
|
||||
$actionDialog.find('[data-action-accept]').text(accept);
|
||||
return new Promise((resolve) => {
|
||||
dialog.returnValue = '';
|
||||
$actionDialog.one('close', () => {
|
||||
resolve(dialog.returnValue === 'accept' ? (hasInput ? $actionValue.val() : true) : null);
|
||||
});
|
||||
dialog.showModal();
|
||||
if (hasInput) $actionValue.trigger('focus').trigger('select');
|
||||
else $actionDialog.find('[data-action-cancel]').trigger('focus');
|
||||
});
|
||||
};
|
||||
$actionDialog.on('click', '[data-action-cancel]', () => $actionDialog.get(0).close());
|
||||
|
||||
$('[data-page-layout-editor]').each(function () {
|
||||
const {pageLayoutEditor: kind, defaultId} = this.dataset;
|
||||
const $link = $(this);
|
||||
@@ -140,15 +114,12 @@ jQuery(function ($) {
|
||||
if (event.target.form?.method.toLowerCase() === 'post') clearSavedStatus();
|
||||
}, true);
|
||||
|
||||
$('form[method="post"]').on('submit', async function (event) {
|
||||
$('form[method="post"]').on('submit', function (event) {
|
||||
event.preventDefault();
|
||||
const $form = $(this);
|
||||
if ($form.attr('aria-busy') === 'true') return;
|
||||
const submitter = event.originalEvent?.submitter;
|
||||
if (submitter?.dataset.confirm && !await window.laySiteAction({
|
||||
title: '确认操作', message: submitter.dataset.confirm,
|
||||
accept: submitter.getAttribute('aria-label') || submitter.textContent.trim() || '确定',
|
||||
})) return;
|
||||
if (submitter?.dataset.confirm && !window.confirm(submitter.dataset.confirm)) return;
|
||||
clearSavedStatus();
|
||||
const action = $form.attr('action');
|
||||
const isLogin = action === '/admin/login';
|
||||
|
||||
@@ -38,9 +38,8 @@ jQuery(function ($) {
|
||||
$source.prop('hidden', true);
|
||||
$field.find('[data-article-editor-label]').removeAttr('for');
|
||||
$field.find('[data-insert-article-image]').prop('hidden', false).on('click', () => {
|
||||
const $picker = $('#media-picker');
|
||||
$picker.triggerHandler('studio:pick', ['image/', async (file) => {
|
||||
const alt = await $picker.triggerHandler('studio:image-alt', [file]);
|
||||
$('#media-picker').triggerHandler('studio:pick', ['image/', (file) => {
|
||||
const alt = window.prompt('图片替代文本(装饰图可留空)', file.label);
|
||||
if (alt === null) return;
|
||||
$status.empty();
|
||||
editor.focus();
|
||||
|
||||
|
After Width: | Height: | Size: 6.4 KiB |
@@ -0,0 +1,135 @@
|
||||
.hero-pagepan .app-frame img, .hero-highspeaker .app-frame img { aspect-ratio: 16/9; object-fit: contain; height: auto; }
|
||||
.hero-shnu-sc .hero-service-art img { aspect-ratio: 1916/821; object-fit: contain; height: auto; }
|
||||
.hero-sc .hero-service-art img { aspect-ratio: 1586/992; object-fit: contain; height: auto; }
|
||||
.hero-pagepan h1 { font-size: clamp(2.8rem, 6vw, 6.1rem); }
|
||||
.hero-highspeaker h1 { font-size: clamp(2.7rem, 5.1vw, 5.05rem); }
|
||||
.hero-sc, .hero-shnu-sc { background: #f7f8fb; }
|
||||
|
||||
@media (max-width: 44rem) {
|
||||
.hero-highspeaker h1 { font-size: clamp(2.4rem, 12vw, 2.7rem); }
|
||||
}
|
||||
|
||||
.hero-shnu-sc ~ #benefits { background: #f7f9fe; padding-block: clamp(3.25rem, 6vw, 6rem); }
|
||||
.hero-shnu-sc ~ #benefits .section-heading { margin-bottom: 1.25rem; }
|
||||
.hero-shnu-sc ~ #benefits h2 { font-size: clamp(1.85rem, 3.35vw, 3rem); }
|
||||
.hero-shnu-sc ~ #benefits .rich > p { margin-bottom: .85rem; }
|
||||
.hero-shnu-sc ~ #benefits .rich > ul { padding-left: 1.35rem; }
|
||||
.hero-shnu-sc ~ #benefits .rich > ul li + li { margin-top: .35rem; }
|
||||
.hero-shnu-sc ~ #benefits .rich > ul li::marker { color: var(--accent); }
|
||||
.hero-shnu-sc ~ #benefits .rich > img {
|
||||
width: var(--studio-media-width, 100%);
|
||||
max-width: 100%;
|
||||
border-radius: var(--radius);
|
||||
box-shadow: 0 .75rem 2.25rem #101c341a;
|
||||
}
|
||||
@media (min-width: 52rem) {
|
||||
.hero-shnu-sc ~ #benefits > .wrap:has(> .rich > p:first-child + ul + img:last-child) {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
|
||||
gap: .8rem clamp(2rem, 5vw, 5.5rem);
|
||||
align-content: center;
|
||||
}
|
||||
.hero-shnu-sc ~ #benefits > .wrap:has(> .rich > p:first-child + ul + img:last-child) > .rich { display: contents; }
|
||||
.hero-shnu-sc ~ #benefits > .wrap:has(> .rich > p:first-child + ul + img:last-child) :is(.section-heading, .rich > p, .rich > ul) {
|
||||
grid-column: 1;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.hero-shnu-sc ~ #benefits > .wrap:has(> .rich > p:first-child + ul + img:last-child) .rich > img {
|
||||
grid-column: 2;
|
||||
grid-row: 1 / span 3;
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
|
||||
.copyright-service #materials .feature-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
||||
.copyright-service #why .choice-card { background: #e9f0ff; border-color: #7599ec; box-shadow: inset 0 3px var(--accent); }
|
||||
.copyright-service #why .choice-card h3 { color: var(--accent-deep); }
|
||||
.copyright-service #options .feature-card { display: flex; flex-direction: column; align-items: flex-start; }
|
||||
.copyright-service #options .feature-card > img { width: 3.6rem; height: 3.6rem; margin-bottom: .95rem; }
|
||||
.copyright-service #options .feature-card > a { margin-top: auto; }
|
||||
.copyright-service #faq .faq { max-width: none; }
|
||||
.copyright-service #faq summary { font-size: clamp(1.05rem, 1.35vw, 1.2rem); min-height: 3.75rem; }
|
||||
.copyright-service #faq details > div { max-width: 75ch; }
|
||||
.copyright-service #go { padding-block: clamp(2rem, 5vw, 4rem); background: var(--white); }
|
||||
.copyright-service #go > .wrap {
|
||||
position: relative;
|
||||
padding: clamp(1.5rem, 5vw, 4.5rem);
|
||||
padding-right: clamp(11rem, 29vw, 23rem);
|
||||
border-radius: var(--radius);
|
||||
background: radial-gradient(ellipse at 88% 110%, #264b9a 0, transparent 59%), #132443;
|
||||
color: var(--white);
|
||||
min-height: 16rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
.copyright-service #go .section-heading { margin-bottom: .8rem; }
|
||||
.copyright-service #go h2 { font-size: clamp(1.8rem, 4vw, 3.5rem); }
|
||||
.copyright-service #go .contact-panel { display: block; }
|
||||
.copyright-service #go .contact-panel p { color: #d9e8ff; max-width: 40ch; }
|
||||
.copyright-service #go .contact-panel img {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: clamp(1.5rem, 6vw, 6rem);
|
||||
transform: translateY(-50%);
|
||||
width: clamp(8rem, 13vw, 12rem);
|
||||
padding: .5rem;
|
||||
border: 0;
|
||||
border-radius: .85rem;
|
||||
background: white;
|
||||
}
|
||||
.copyright-service #go .button { color: #142956; background: #eef4ff; border-color: #eef4ff; }
|
||||
.copyright-service #terms { padding-block: 1.4rem 2.5rem; border-top: 0; }
|
||||
.copyright-service #terms .section-heading { margin-bottom: .35rem; }
|
||||
.copyright-service #terms h2 { font-size: .95rem; letter-spacing: 0; }
|
||||
.copyright-service #terms .rich { font-size: .875rem; color: var(--muted); }
|
||||
|
||||
@media (max-width: 62rem) {
|
||||
.copyright-service #materials .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
}
|
||||
@media (max-width: 44rem) {
|
||||
.catalog-grid, .copyright-service #materials .feature-grid { grid-template-columns: 1fr; }
|
||||
.copyright-service #go > .wrap { padding: 1.55rem; min-height: 0; }
|
||||
.copyright-service #go .contact-panel { display: flex; gap: 1rem; }
|
||||
.copyright-service #go .contact-panel img { position: static; transform: none; width: 7rem; }
|
||||
}
|
||||
|
||||
.home-cursor {
|
||||
display: inline-block;
|
||||
width: .52em;
|
||||
margin-inline-start: .08em;
|
||||
font-family: var(--mono);
|
||||
font-size: .7em;
|
||||
animation: home-cursor-blink 1.1s steps(1, end) 5;
|
||||
}
|
||||
@keyframes home-cursor-blink { 50% { opacity: 0; } }
|
||||
|
||||
.home-pipe-flow {
|
||||
position: absolute;
|
||||
inset: clamp(.45rem, 1.8vw, 1.7rem);
|
||||
width: calc(100% - 2 * clamp(.45rem, 1.8vw, 1.7rem));
|
||||
height: calc(100% - 2 * clamp(.45rem, 1.8vw, 1.7rem));
|
||||
pointer-events: none;
|
||||
}
|
||||
.home-pipe-route { opacity: 0; animation: pipe-visibility 7s linear 2 both; }
|
||||
.home-pipe-route use {
|
||||
fill: none;
|
||||
stroke: #2985fa;
|
||||
stroke-width: 3;
|
||||
stroke-linecap: round;
|
||||
stroke-dasharray: 17 110;
|
||||
stroke-dashoffset: 19;
|
||||
opacity: .48;
|
||||
animation: pipe-travel 7s linear 2 both;
|
||||
}
|
||||
.home-pipe-route use + use { stroke: #ecffff; stroke-width: 1.3; stroke-dasharray: 11 116; opacity: .95; }
|
||||
.home-pipe-route:nth-of-type(2) { --pipe-delay: .85s; }
|
||||
.home-pipe-route:nth-of-type(3) { --pipe-delay: 2.35s; }
|
||||
.home-pipe-route:nth-of-type(4) { --pipe-delay: 3.2s; }
|
||||
.home-pipe-route, .home-pipe-route use { animation-delay: var(--pipe-delay, 0s); }
|
||||
@keyframes pipe-travel { 0%, 6% { stroke-dashoffset: 19; } 45%, 100% { stroke-dashoffset: -104; } }
|
||||
@keyframes pipe-visibility { 0%, 6%, 45%, 100% { opacity: 0; } 13%, 37% { opacity: 1; } }
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.home-cursor { animation: none; }
|
||||
.home-pipe-flow { display: none; }
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1712308870808" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1501" width="500" height="500" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M193.36704 165.97504l52.9664 100.22912-97.78688 337.36192c-52.9664 185.79456-96.9728 341.43744-96.9728 345.50784 0 5.70368 99.41504 6.51776 291.72736 3.26144 327.58272-4.8896 334.10048-6.51776 412.32896-67.6352 89.63584-70.89664 146.67776-186.60864 196.38784-398.47936 27.70432-116.52608 27.70432-163.79392 0-220.83072-36.66944-74.96704-88.82176-100.22912-265.6512-129.56672C560.87552 115.45088 187.65824 66.56 156.69248 66.56c-13.8496 0-9.77408 12.22144 36.67456 99.41504z m517.44768 182.53312c21.18656 17.92512 25.26208 26.89024 25.26208 57.856 0 41.55904-14.6688 98.60096-50.52416 193.94048-49.70496 132.01408-79.85664 149.94432-240.38912 150.7584-68.44928 0-108.38016-3.26144-108.38016-8.15104 0-7.33184 105.9328-369.14176 118.15936-405.8112 2.44224-7.33184 33.408-9.7792 117.34528-9.7792 110.00832 0 114.07872 0.81408 138.52672 21.18656z" fill="#2E8CFF" p-id="1502"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 705 B |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 86 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,191 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 28.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 3840 1280" enable-background="new 0 0 3840 1280" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<rect x="160" y="96" fill="#FFFFFF" width="1088" height="1088"/>
|
||||
<path fill="#333333" d="M1216,128v1024H192V128H1216 M1280,64H128v1152h1152V64L1280,64z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#333333" d="M482.46,526h152l-12.92,76h-152l-53.96,304h-76l53.96-304h-76l12.92-76h76l13.68-76h76L482.46,526z
|
||||
M509.06,374h152l-12.92,76h-152L509.06,374z"/>
|
||||
<path fill="#333333" d="M710.46,526h76l-53.2,304h-76L710.46,526z M1023.58,906h-304l13.68-76h76l26.6-152h76l-26.6,152h76
|
||||
l53.2-304h76L1023.58,906z"/>
|
||||
</g>
|
||||
</g>
|
||||
<g>
|
||||
<g>
|
||||
<path fill="#333333" d="M1702.8,1054.4v-28h26.4c5.06,0,10.06-0.87,15-2.6c4.93-1.74,9.33-4.47,13.2-8.2c3.86-3.74,6.86-8.07,9-13
|
||||
c2.13-4.94,3.6-9.8,4.4-14.6l29.6-180.8H1746v-28h59.2l7.2-42.8c0.8-5.6,2.13-11.13,4-16.6c1.86-5.46,4.4-10.73,7.6-15.8
|
||||
c3.2-5.06,7.13-9.6,11.8-13.6c4.66-4,9.66-7.2,15-9.6c5.33-2.4,10.86-4.06,16.6-5c5.73-0.93,11.26-1.4,16.6-1.4h26.4l0.4,28h-26.4
|
||||
c-5.07,0-10.07,0.87-15,2.6c-4.94,1.74-9.4,4.47-13.4,8.2c-4,3.74-7,8.07-9,13c-2,4.94-3.4,9.8-4.2,14.6l-6.4,38.8h54.4v27.6
|
||||
h-59.2l-30.4,185.2c-1.07,5.6-2.47,11.13-4.2,16.6c-1.74,5.46-4.27,10.73-7.6,15.8c-3.34,5.06-7.34,9.6-12,13.6
|
||||
c-4.67,4-9.67,7.2-15,9.6c-5.34,2.4-10.87,4.06-16.6,5c-5.74,0.93-11.27,1.4-16.6,1.4H1702.8z"/>
|
||||
<path fill="#333333" d="M1999.2,971.6c-8,0-15.8-0.74-23.4-2.2c-7.6-1.46-14.54-4.13-20.8-8c-6.27-3.86-11.6-8.8-16-14.8
|
||||
c-4.4-6-7.67-12.6-9.8-19.8c-2.14-7.2-3.14-14.73-3-22.6c0.13-7.86,0.86-15.66,2.2-23.4l8-48c1.06-6.66,2.66-13.26,4.8-19.8
|
||||
c2.13-6.53,5.06-12.8,8.8-18.8c3.73-6,8.26-11.46,13.6-16.4c5.33-4.93,11.2-9,17.6-12.2s12.93-5.4,19.6-6.6
|
||||
c6.66-1.2,13.33-1.8,20-1.8c6.66,0,13.2,0.54,19.6,1.6c6.4,1.07,12.33,2.94,17.8,5.6c5.46,2.67,10.46,6.14,15,10.4
|
||||
c4.53,4.27,8.06,9.2,10.6,14.8c2.53,5.6,4.26,11.6,5.2,18c0.93,6.4,0.86,12.94-0.2,19.6c-0.8,5.34-2.54,10.67-5.2,16
|
||||
c-2.67,5.34-6,10.2-10,14.6c-4,4.4-8.6,8.14-13.8,11.2c-5.2,3.07-10.54,5.54-16,7.4c-5.47,1.87-11,3.07-16.6,3.6
|
||||
c-5.6,0.54-11.2,0.8-16.8,0.8h-14.8c-5.87-0.26-11.74-0.6-17.6-1c-5.87-0.4-11.87-1.13-18-2.2l-1.2,7.6
|
||||
c-0.8,4.8-1.27,9.6-1.4,14.4c-0.14,4.8,0.33,9.47,1.4,14c1.06,4.54,2.8,8.8,5.2,12.8c2.4,4,5.33,7.34,8.8,10
|
||||
c3.46,2.67,7.53,4.54,12.2,5.6c4.66,1.07,9.4,1.6,14.2,1.6c5.06,0,10.13-0.6,15.2-1.8c5.06-1.2,9.93-3.2,14.6-6
|
||||
c4.66-2.8,8.86-6.2,12.6-10.2c3.73-4,6.8-8.4,9.2-13.2l26,12.8c-4,6.94-8.74,13.47-14.2,19.6c-5.47,6.14-11.67,11.27-18.6,15.4
|
||||
c-6.94,4.14-14.27,7.07-22,8.8C2014.26,970.73,2006.66,971.6,1999.2,971.6z M2015.6,854c4.53,0,9.13-0.53,13.8-1.6
|
||||
c4.66-1.06,9.06-3,13.2-5.8c4.13-2.8,7.53-6.33,10.2-10.6c2.66-4.26,4.4-8.66,5.2-13.2c0.8-5.33,0.53-10.53-0.8-15.6
|
||||
c-1.34-5.06-3.8-9.26-7.4-12.6c-3.6-3.33-7.94-5.73-13-7.2c-5.07-1.46-10.27-2.2-15.6-2.2c-4.27,0-8.74,0.47-13.4,1.4
|
||||
c-4.67,0.94-9,2.54-13,4.8c-4,2.27-7.67,5.2-11,8.8c-3.34,3.6-6.14,7.4-8.4,11.4c-2.27,4-4.07,8.2-5.4,12.6
|
||||
c-1.34,4.4-2.4,8.74-3.2,13l-2,12.4c4,0.8,8.13,1.4,12.4,1.8c4.26,0.4,8.6,0.67,13,0.8c4.4,0.14,8.66,0.47,12.8,1
|
||||
C2007.13,853.74,2011.33,854,2015.6,854z"/>
|
||||
<path fill="#333333" d="M2175.2,971.6c-6.94,0-13.54-1.14-19.8-3.4c-6.27-2.26-11.47-5.8-15.6-10.6c-4.14-4.8-7.27-10.33-9.4-16.6
|
||||
c-2.14-6.26-3.54-12.73-4.2-19.4c-0.67-6.66-0.74-13.4-0.2-20.2c0.53-6.8,1.33-13.66,2.4-20.6l8-48c1.06-6.13,2.4-12.26,4-18.4
|
||||
c1.6-6.13,3.93-12.06,7-17.8c3.06-5.73,6.8-11.13,11.2-16.2c4.4-5.06,9.26-9.4,14.6-13c5.33-3.6,11.13-6.2,17.4-7.8
|
||||
c6.26-1.6,12.46-2.4,18.6-2.4c6.4,0,12.6,0.94,18.6,2.8c6,1.87,11.13,4.87,15.4,9c4.26,4.14,7.6,8.94,10,14.4
|
||||
c2.4,5.47,4.13,11.27,5.2,17.4l16.4-98.4h-16.4l-0.4-28h52.4L2268,931.2c-0.27,1.6-0.27,3.2,0,4.8c0.26,1.6,0.93,3,2,4.2
|
||||
c1.06,1.2,2.33,2.07,3.8,2.6c1.46,0.54,3,0.8,4.6,0.8h6v28h-10.8c-5.34,0-10.47-0.67-15.4-2c-4.94-1.33-9.27-3.6-13-6.8
|
||||
c-3.74-3.2-6.34-7.26-7.8-12.2c-1.47-4.93-1.94-10.06-1.4-15.4c-2.94,5.34-6.67,10.4-11.2,15.2c-4.54,4.8-9.47,8.8-14.8,12
|
||||
c-5.34,3.2-11,5.54-17,7S2181.06,971.6,2175.2,971.6z M2192,943.6c6.13,0,12.33-1.13,18.6-3.4c6.26-2.26,11.73-5.8,16.4-10.6
|
||||
c4.66-4.8,8.2-10.2,10.6-16.2c2.4-6,4.13-12.06,5.2-18.2l8-48c0.8-4.8,1.33-9.6,1.6-14.4c0.26-4.8,0.06-9.46-0.6-14
|
||||
c-0.67-4.53-1.74-8.93-3.2-13.2c-1.47-4.26-3.67-8-6.6-11.2c-2.94-3.2-6.6-5.53-11-7c-4.4-1.46-9-2.2-13.8-2.2
|
||||
c-6.14,0-12.4,1.4-18.8,4.2c-6.4,2.8-11.8,6.8-16.2,12s-7.8,10.87-10.2,17c-2.4,6.14-4.14,12.4-5.2,18.8l-8,48
|
||||
c-0.8,4.54-1.27,9.07-1.4,13.6c-0.14,4.54,0.06,9,0.6,13.4c0.53,4.4,1.6,8.6,3.2,12.6s3.93,7.47,7,10.4
|
||||
c3.06,2.94,6.66,5.07,10.8,6.4C2183.13,942.94,2187.46,943.6,2192,943.6z"/>
|
||||
<path fill="#333333" d="M2399.2,971.6c-8,0-15.8-0.74-23.4-2.2c-7.6-1.46-14.54-4.13-20.8-8c-6.27-3.86-11.6-8.8-16-14.8
|
||||
c-4.4-6-7.67-12.6-9.8-19.8c-2.14-7.2-3.14-14.73-3-22.6c0.13-7.86,0.86-15.66,2.2-23.4l8-48c1.06-6.66,2.66-13.26,4.8-19.8
|
||||
c2.13-6.53,5.06-12.8,8.8-18.8c3.73-6,8.26-11.46,13.6-16.4c5.33-4.93,11.2-9,17.6-12.2s12.93-5.4,19.6-6.6
|
||||
c6.66-1.2,13.33-1.8,20-1.8c6.66,0,13.2,0.54,19.6,1.6c6.4,1.07,12.33,2.94,17.8,5.6c5.46,2.67,10.46,6.14,15,10.4
|
||||
c4.53,4.27,8.06,9.2,10.6,14.8c2.53,5.6,4.26,11.6,5.2,18c0.93,6.4,0.86,12.94-0.2,19.6c-0.8,5.34-2.54,10.67-5.2,16
|
||||
c-2.67,5.34-6,10.2-10,14.6c-4,4.4-8.6,8.14-13.8,11.2c-5.2,3.07-10.54,5.54-16,7.4c-5.47,1.87-11,3.07-16.6,3.6
|
||||
c-5.6,0.54-11.2,0.8-16.8,0.8h-14.8c-5.87-0.26-11.74-0.6-17.6-1c-5.87-0.4-11.87-1.13-18-2.2l-1.2,7.6
|
||||
c-0.8,4.8-1.27,9.6-1.4,14.4c-0.14,4.8,0.33,9.47,1.4,14c1.06,4.54,2.8,8.8,5.2,12.8c2.4,4,5.33,7.34,8.8,10
|
||||
c3.46,2.67,7.53,4.54,12.2,5.6c4.66,1.07,9.4,1.6,14.2,1.6c5.06,0,10.13-0.6,15.2-1.8c5.06-1.2,9.93-3.2,14.6-6
|
||||
c4.66-2.8,8.86-6.2,12.6-10.2c3.73-4,6.8-8.4,9.2-13.2l26,12.8c-4,6.94-8.74,13.47-14.2,19.6c-5.47,6.14-11.67,11.27-18.6,15.4
|
||||
c-6.94,4.14-14.27,7.07-22,8.8C2414.26,970.73,2406.66,971.6,2399.2,971.6z M2415.6,854c4.53,0,9.13-0.53,13.8-1.6
|
||||
c4.66-1.06,9.06-3,13.2-5.8c4.13-2.8,7.53-6.33,10.2-10.6c2.66-4.26,4.4-8.66,5.2-13.2c0.8-5.33,0.53-10.53-0.8-15.6
|
||||
c-1.34-5.06-3.8-9.26-7.4-12.6c-3.6-3.33-7.94-5.73-13-7.2c-5.07-1.46-10.27-2.2-15.6-2.2c-4.27,0-8.74,0.47-13.4,1.4
|
||||
c-4.67,0.94-9,2.54-13,4.8c-4,2.27-7.67,5.2-11,8.8c-3.34,3.6-6.14,7.4-8.4,11.4c-2.27,4-4.07,8.2-5.4,12.6
|
||||
c-1.34,4.4-2.4,8.74-3.2,13l-2,12.4c4,0.8,8.13,1.4,12.4,1.8c4.26,0.4,8.6,0.67,13,0.8c4.4,0.14,8.66,0.47,12.8,1
|
||||
C2407.13,853.74,2411.33,854,2415.6,854z"/>
|
||||
<path fill="#333333" d="M2541.2,968.4l29.6-180h-23.6v-28h59.6L2600,800c2.93-5.6,6.33-11.06,10.2-16.4c3.86-5.33,8.2-10,13-14
|
||||
s10.26-7.06,16.4-9.2c6.13-2.13,12.13-3.2,18-3.2c4.8,0,9.4,0.67,13.8,2c4.4,1.34,8.26,3.54,11.6,6.6
|
||||
c3.33,3.07,5.93,6.67,7.8,10.8c1.86,4.14,3.06,8.54,3.6,13.2c0.53,4.67,0.6,9.4,0.2,14.2c-0.4,4.8-1,9.6-1.8,14.4h-31.2
|
||||
c0.53-3.73,0.86-7.4,1-11c0.13-3.6-0.27-7.13-1.2-10.6c-0.94-3.46-2.74-6.26-5.4-8.4c-2.67-2.13-5.87-3.2-9.6-3.2
|
||||
c-5.07,0-10.14,0.87-15.2,2.6c-5.07,1.74-9.6,4.34-13.6,7.8c-4,3.47-7.4,7.4-10.2,11.8s-5.2,9-7.2,13.8s-3.67,9.67-5,14.6
|
||||
c-1.34,4.94-2.4,9.8-3.2,14.6l-19.6,118H2541.2z"/>
|
||||
<path fill="#333333" d="M2775.2,971.6c-6.94,0-13.54-1.14-19.8-3.4c-6.27-2.26-11.47-5.8-15.6-10.6c-4.14-4.8-7.27-10.33-9.4-16.6
|
||||
c-2.14-6.26-3.54-12.73-4.2-19.4c-0.67-6.66-0.74-13.4-0.2-20.2c0.53-6.8,1.33-13.66,2.4-20.6l8-48c1.06-6.13,2.4-12.26,4-18.4
|
||||
c1.6-6.13,3.93-12.06,7-17.8c3.06-5.73,6.8-11.13,11.2-16.2c4.4-5.06,9.26-9.4,14.6-13c5.33-3.6,11.13-6.2,17.4-7.8
|
||||
c6.26-1.6,12.46-2.4,18.6-2.4c6.4,0,12.6,0.94,18.6,2.8c6,1.87,11.13,4.87,15.4,9c4.26,4.14,7.6,8.94,10,14.4
|
||||
c2.4,5.47,4.13,11.27,5.2,17.4l6.8-40.4h31.2L2868,931.2c-0.27,1.6-0.27,3.2,0,4.8c0.26,1.6,0.93,3,2,4.2
|
||||
c1.06,1.2,2.33,2.07,3.8,2.6c1.46,0.54,3,0.8,4.6,0.8h6v28h-10.8c-5.34,0-10.47-0.67-15.4-2c-4.94-1.33-9.27-3.6-13-6.8
|
||||
c-3.74-3.2-6.34-7.26-7.8-12.2c-1.47-4.93-1.94-10.06-1.4-15.4c-2.94,5.34-6.67,10.4-11.2,15.2c-4.54,4.8-9.47,8.8-14.8,12
|
||||
c-5.34,3.2-11,5.54-17,7S2781.06,971.6,2775.2,971.6z M2792,943.6c6.13,0,12.33-1.13,18.6-3.4c6.26-2.26,11.73-5.8,16.4-10.6
|
||||
c4.66-4.8,8.2-10.2,10.6-16.2c2.4-6,4.13-12.06,5.2-18.2l8-48c0.8-4.8,1.33-9.6,1.6-14.4c0.26-4.8,0.06-9.46-0.6-14
|
||||
c-0.67-4.53-1.74-8.93-3.2-13.2c-1.47-4.26-3.67-8-6.6-11.2c-2.94-3.2-6.6-5.53-11-7c-4.4-1.46-9-2.2-13.8-2.2
|
||||
c-6.14,0-12.4,1.4-18.8,4.2c-6.4,2.8-11.8,6.8-16.2,12s-7.8,10.87-10.2,17c-2.4,6.14-4.14,12.4-5.2,18.8l-8,48
|
||||
c-0.8,4.54-1.27,9.07-1.4,13.6c-0.14,4.54,0.06,9,0.6,13.4c0.53,4.4,1.6,8.6,3.2,12.6s3.93,7.47,7,10.4
|
||||
c3.06,2.94,6.66,5.07,10.8,6.4C2783.13,942.94,2787.46,943.6,2792,943.6z"/>
|
||||
<path fill="#333333" d="M3022,971.6c-6.4,0-12.74-0.74-19-2.2c-6.27-1.46-11.74-4-16.4-7.6c-4.67-3.6-8.6-8.06-11.8-13.4
|
||||
c-3.2-5.33-5.47-11-6.8-17c-1.34-6-1.87-12.26-1.6-18.8c0.26-6.53,0.93-13,2-19.4l17.2-104.8h-36v-28h40.8l14-86h31.2l-14,86h68
|
||||
v28h-72.8l-18,109.2c-0.54,3.47-0.87,6.94-1,10.4c-0.14,3.47-0.14,6.87,0,10.2c0.13,3.34,0.73,6.6,1.8,9.8
|
||||
c1.06,3.2,2.66,6,4.8,8.4c2.13,2.4,4.73,4.2,7.8,5.4c3.06,1.2,6.33,1.8,9.8,1.8c4.8,0,9.53-1.2,14.2-3.6
|
||||
c4.66-2.4,8.6-5.6,11.8-9.6s5.8-8.33,7.8-13c2-4.66,3.66-9.4,5-14.2l28.4,8c-1.34,5.07-3.07,10.07-5.2,15
|
||||
c-2.14,4.94-4.74,9.74-7.8,14.4c-3.07,4.67-6.54,9-10.4,13c-3.87,4-8.2,7.4-13,10.2c-4.8,2.8-9.87,4.8-15.2,6
|
||||
C3032.26,971,3027.06,971.6,3022,971.6z"/>
|
||||
<path fill="#333333" d="M3228.8,971.6c-6.14,0-12.07-0.67-17.8-2c-5.74-1.33-10.94-3.66-15.6-7c-4.67-3.33-8.54-7.46-11.6-12.4
|
||||
c-3.07-4.93-5.34-10.2-6.8-15.8c-1.47-5.6-2.07-11.46-1.8-17.6c0.26-6.13,0.93-12.26,2-18.4l18-110h-52.4v-28h88.8L3208,902.8
|
||||
c-0.8,4.54-1.27,9.14-1.4,13.8c-0.14,4.67,0.6,9.07,2.2,13.2c1.6,4.14,4.2,7.47,7.8,10c3.6,2.54,7.8,3.8,12.6,3.8
|
||||
c4.26,0,8.53-1.06,12.8-3.2c4.26-2.13,7.8-5,10.6-8.6c2.8-3.6,5.13-7.46,7-11.6c1.86-4.13,3.33-8.33,4.4-12.6l28.8,7.6
|
||||
c-2.14,7.2-5,14.27-8.6,21.2c-3.6,6.94-8.2,13.14-13.8,18.6c-5.6,5.47-12.07,9.6-19.4,12.4
|
||||
C3243.66,970.2,3236.26,971.6,3228.8,971.6z M3228.8,725.2c-4,0-7.8-0.66-11.4-2c-3.6-1.33-6.47-3.53-8.6-6.6
|
||||
c-2.14-3.06-3.54-6.53-4.2-10.4c-0.67-3.86-0.74-7.8-0.2-11.8c0.53-2.66,1.53-5.33,3-8c1.46-2.66,3.33-4.86,5.6-6.6
|
||||
c2.26-1.73,4.8-2.93,7.6-3.6c2.8-0.66,5.66-1,8.6-1c4,0,7.8,0.74,11.4,2.2c3.6,1.47,6.46,3.74,8.6,6.8
|
||||
c2.13,3.07,3.6,6.54,4.4,10.4c0.8,3.87,0.8,7.8,0,11.8c-0.54,2.67-1.54,5.34-3,8c-1.47,2.67-3.34,4.87-5.6,6.6
|
||||
c-2.27,1.74-4.8,2.87-7.6,3.4C3234.6,724.94,3231.73,725.2,3228.8,725.2z"/>
|
||||
<path fill="#333333" d="M3393.2,971.6c-7.74,0-15.2-0.8-22.4-2.4c-7.2-1.6-13.67-4.46-19.4-8.6c-5.74-4.13-10.54-9.2-14.4-15.2
|
||||
c-3.87-6-6.67-12.6-8.4-19.8c-1.74-7.2-2.54-14.6-2.4-22.2c0.13-7.6,0.86-15.13,2.2-22.6l8-48c1.06-6.66,2.66-13.26,4.8-19.8
|
||||
c2.13-6.53,5.06-12.8,8.8-18.8c3.73-6,8.2-11.46,13.4-16.4c5.2-4.93,10.93-9,17.2-12.2c6.26-3.2,12.73-5.4,19.4-6.6
|
||||
c6.66-1.2,13.33-1.8,20-1.8c7.73,0,15.2,0.8,22.4,2.4c7.2,1.6,13.73,4.47,19.6,8.6c5.86,4.14,10.73,9.2,14.6,15.2
|
||||
c3.86,6,6.66,12.6,8.4,19.8c1.73,7.2,2.46,14.6,2.2,22.2c-0.27,7.6-0.94,15.14-2,22.6l-8,48c-1.07,6.67-2.74,13.27-5,19.8
|
||||
c-2.27,6.54-5.2,12.8-8.8,18.8c-3.6,6-8,11.47-13.2,16.4c-5.2,4.94-10.94,9-17.2,12.2c-6.27,3.2-12.8,5.4-19.6,6.6
|
||||
C3406.6,971,3399.86,971.6,3393.2,971.6z M3393.6,943.6c4.53,0,8.93-0.53,13.2-1.6c4.26-1.06,8.4-2.8,12.4-5.2
|
||||
c4-2.4,7.66-5.33,11-8.8c3.33-3.46,6.06-7.2,8.2-11.2c2.13-4,3.86-8.13,5.2-12.4c1.33-4.26,2.26-8.53,2.8-12.8l8-48
|
||||
c0.8-4.53,1.33-9.13,1.6-13.8c0.26-4.66,0-9.2-0.8-13.6c-0.8-4.4-2.07-8.6-3.8-12.6c-1.74-4-4.14-7.46-7.2-10.4
|
||||
c-3.07-2.93-6.74-5-11-6.2c-4.27-1.2-8.67-1.8-13.2-1.8c-4.54,0-9,0.54-13.4,1.6c-4.4,1.07-8.6,2.8-12.6,5.2
|
||||
c-4,2.4-7.6,5.34-10.8,8.8c-3.2,3.47-5.87,7.2-8,11.2c-2.14,4-3.87,8.14-5.2,12.4c-1.34,4.27-2.4,8.54-3.2,12.8l-8,48
|
||||
c-0.8,4.54-1.27,9.14-1.4,13.8c-0.14,4.67,0.13,9.2,0.8,13.6c0.66,4.4,1.86,8.6,3.6,12.6c1.73,4,4.13,7.47,7.2,10.4
|
||||
c3.06,2.94,6.8,5,11.2,6.2C3384.6,943,3389.06,943.6,3393.6,943.6z"/>
|
||||
<path fill="#333333" d="M3517.2,968.4l29.6-180h-16.4v-28h52.4l-5.6,32.4c3.2-5.33,6.86-10.26,11-14.8c4.13-4.53,8.8-8.4,14-11.6
|
||||
s10.73-5.53,16.6-7c5.86-1.46,11.6-2.2,17.2-2.2c6.93,0,13.46,1.2,19.6,3.6c6.13,2.4,11.2,6,15.2,10.8s7,10.34,9,16.6
|
||||
c2,6.27,3.4,12.67,4.2,19.2c0.8,6.54,0.93,13.27,0.4,20.2c-0.54,6.94-1.34,13.74-2.4,20.4l-15.6,92.4h16.4l0.4,28h-52.4
|
||||
l20.4-124.8c0.8-4.53,1.33-9.06,1.6-13.6c0.26-4.53,0.13-8.93-0.4-13.2c-0.54-4.26-1.54-8.4-3-12.4c-1.47-4-3.6-7.53-6.4-10.6
|
||||
c-2.8-3.06-6.27-5.26-10.4-6.6c-4.14-1.33-8.47-2-13-2c-5.87,0-11.87,1.2-18,3.6c-6.14,2.4-11.4,6-15.8,10.8
|
||||
c-4.4,4.8-7.8,10.2-10.2,16.2c-2.4,6-4,11.94-4.8,17.8l-22.4,134.8H3517.2z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#333333" d="M2317.2,550.4l29.6-180h-16.4v-28h52.4l-5.6,32.4c3.2-5.33,6.86-10.26,11-14.8c4.13-4.53,8.8-8.4,14-11.6
|
||||
s10.73-5.53,16.6-7c5.86-1.46,11.6-2.2,17.2-2.2c6.93,0,13.46,1.2,19.6,3.6c6.13,2.4,11.2,6,15.2,10.8c4,4.8,7,10.34,9,16.6
|
||||
c2,6.27,3.4,12.67,4.2,19.2c0.8,6.54,0.93,13.27,0.4,20.2c-0.54,6.94-1.34,13.74-2.4,20.4l-15.6,92.4h16.4l0.4,28h-52.4
|
||||
l20.4-124.8c0.8-4.53,1.33-9.06,1.6-13.6c0.26-4.53,0.13-8.93-0.4-13.2c-0.54-4.26-1.54-8.4-3-12.4c-1.47-4-3.6-7.53-6.4-10.6
|
||||
c-2.8-3.06-6.27-5.26-10.4-6.6c-4.14-1.33-8.47-2-13-2c-5.87,0-11.87,1.2-18,3.6c-6.14,2.4-11.4,6-15.8,10.8
|
||||
c-4.4,4.8-7.8,10.2-10.2,16.2c-2.4,6-4,11.94-4.8,17.8l-22.4,134.8H2317.2z"/>
|
||||
<path fill="#333333" d="M2599.2,553.6c-8,0-15.8-0.74-23.4-2.2c-7.6-1.46-14.54-4.13-20.8-8c-6.27-3.86-11.6-8.8-16-14.8
|
||||
s-7.67-12.6-9.8-19.8c-2.14-7.2-3.14-14.73-3-22.6c0.13-7.86,0.86-15.66,2.2-23.4l8-48c1.06-6.66,2.66-13.26,4.8-19.8
|
||||
c2.13-6.53,5.06-12.8,8.8-18.8c3.73-6,8.26-11.46,13.6-16.4c5.33-4.93,11.2-9,17.6-12.2c6.4-3.2,12.93-5.4,19.6-6.6
|
||||
c6.66-1.2,13.33-1.8,20-1.8c6.66,0,13.2,0.54,19.6,1.6c6.4,1.07,12.33,2.94,17.8,5.6c5.46,2.67,10.46,6.14,15,10.4
|
||||
c4.53,4.27,8.06,9.2,10.6,14.8c2.53,5.6,4.26,11.6,5.2,18c0.93,6.4,0.86,12.94-0.2,19.6c-0.8,5.34-2.54,10.67-5.2,16
|
||||
c-2.67,5.34-6,10.2-10,14.6s-8.6,8.14-13.8,11.2c-5.2,3.07-10.54,5.54-16,7.4c-5.47,1.87-11,3.07-16.6,3.6
|
||||
c-5.6,0.54-11.2,0.8-16.8,0.8h-14.8c-5.87-0.26-11.74-0.6-17.6-1c-5.87-0.4-11.87-1.13-18-2.2l-1.2,7.6
|
||||
c-0.8,4.8-1.27,9.6-1.4,14.4c-0.14,4.8,0.33,9.47,1.4,14c1.06,4.54,2.8,8.8,5.2,12.8s5.33,7.34,8.8,10
|
||||
c3.46,2.67,7.53,4.54,12.2,5.6c4.66,1.07,9.4,1.6,14.2,1.6c5.06,0,10.13-0.6,15.2-1.8c5.06-1.2,9.93-3.2,14.6-6
|
||||
c4.66-2.8,8.86-6.2,12.6-10.2c3.73-4,6.8-8.4,9.2-13.2l26,12.8c-4,6.94-8.74,13.47-14.2,19.6c-5.47,6.14-11.67,11.27-18.6,15.4
|
||||
c-6.94,4.14-14.27,7.07-22,8.8C2614.26,552.74,2606.66,553.6,2599.2,553.6z M2615.6,436c4.53,0,9.13-0.53,13.8-1.6
|
||||
c4.66-1.06,9.06-3,13.2-5.8c4.13-2.8,7.53-6.33,10.2-10.6c2.66-4.26,4.4-8.66,5.2-13.2c0.8-5.33,0.53-10.53-0.8-15.6
|
||||
c-1.34-5.06-3.8-9.26-7.4-12.6c-3.6-3.33-7.94-5.73-13-7.2c-5.07-1.46-10.27-2.2-15.6-2.2c-4.27,0-8.74,0.47-13.4,1.4
|
||||
c-4.67,0.94-9,2.54-13,4.8c-4,2.27-7.67,5.2-11,8.8c-3.34,3.6-6.14,7.4-8.4,11.4c-2.27,4-4.07,8.2-5.4,12.6
|
||||
c-1.34,4.4-2.4,8.74-3.2,13l-2,12.4c4,0.8,8.13,1.4,12.4,1.8c4.26,0.4,8.6,0.67,13,0.8c4.4,0.14,8.66,0.47,12.8,1
|
||||
C2607.13,435.74,2611.33,436,2615.6,436z"/>
|
||||
<path fill="#333333" d="M2822,553.6c-6.4,0-12.74-0.74-19-2.2c-6.27-1.46-11.74-4-16.4-7.6c-4.67-3.6-8.6-8.06-11.8-13.4
|
||||
c-3.2-5.33-5.47-11-6.8-17c-1.34-6-1.87-12.26-1.6-18.8c0.26-6.53,0.93-13,2-19.4l17.2-104.8h-36v-28h40.8l14-86h31.2l-14,86h68
|
||||
v28h-72.8l-18,109.2c-0.54,3.47-0.87,6.94-1,10.4c-0.14,3.47-0.14,6.87,0,10.2c0.13,3.34,0.73,6.6,1.8,9.8
|
||||
c1.06,3.2,2.66,6,4.8,8.4c2.13,2.4,4.73,4.2,7.8,5.4c3.06,1.2,6.33,1.8,9.8,1.8c4.8,0,9.53-1.2,14.2-3.6
|
||||
c4.66-2.4,8.6-5.6,11.8-9.6s5.8-8.33,7.8-13c2-4.66,3.66-9.4,5-14.2l28.4,8c-1.34,5.07-3.07,10.07-5.2,15
|
||||
c-2.14,4.94-4.74,9.74-7.8,14.4c-3.07,4.67-6.54,9-10.4,13c-3.87,4-8.2,7.4-13,10.2c-4.8,2.8-9.87,4.8-15.2,6
|
||||
C2832.26,553,2827.06,553.6,2822,553.6z"/>
|
||||
<path fill="#333333" d="M2936.4,550.4l0.4-180h-16.4v-28h48l-10.8,180.8l38-102.4h30.4l4.4,102.4l49.2-180.8h31.6l-68.4,208h-30.4
|
||||
l-6.8-96.8l-38.8,96.8H2936.4z"/>
|
||||
<path fill="#333333" d="M3193.2,553.6c-7.74,0-15.2-0.8-22.4-2.4c-7.2-1.6-13.67-4.46-19.4-8.6c-5.74-4.13-10.54-9.2-14.4-15.2
|
||||
c-3.87-6-6.67-12.6-8.4-19.8c-1.74-7.2-2.54-14.6-2.4-22.2c0.13-7.6,0.86-15.13,2.2-22.6l8-48c1.06-6.66,2.66-13.26,4.8-19.8
|
||||
c2.13-6.53,5.06-12.8,8.8-18.8c3.73-6,8.2-11.46,13.4-16.4c5.2-4.93,10.93-9,17.2-12.2c6.26-3.2,12.73-5.4,19.4-6.6
|
||||
c6.66-1.2,13.33-1.8,20-1.8c7.73,0,15.2,0.8,22.4,2.4c7.2,1.6,13.73,4.47,19.6,8.6c5.86,4.14,10.73,9.2,14.6,15.2
|
||||
c3.86,6,6.66,12.6,8.4,19.8c1.73,7.2,2.46,14.6,2.2,22.2c-0.27,7.6-0.94,15.14-2,22.6l-8,48c-1.07,6.67-2.74,13.27-5,19.8
|
||||
c-2.27,6.54-5.2,12.8-8.8,18.8c-3.6,6-8,11.47-13.2,16.4c-5.2,4.94-10.94,9-17.2,12.2c-6.27,3.2-12.8,5.4-19.6,6.6
|
||||
C3206.6,553,3199.86,553.6,3193.2,553.6z M3193.6,525.6c4.53,0,8.93-0.53,13.2-1.6c4.26-1.06,8.4-2.8,12.4-5.2s7.66-5.33,11-8.8
|
||||
c3.33-3.46,6.06-7.2,8.2-11.2c2.13-4,3.86-8.13,5.2-12.4c1.33-4.26,2.26-8.53,2.8-12.8l8-48c0.8-4.53,1.33-9.13,1.6-13.8
|
||||
c0.26-4.66,0-9.2-0.8-13.6c-0.8-4.4-2.07-8.6-3.8-12.6c-1.74-4-4.14-7.46-7.2-10.4c-3.07-2.93-6.74-5-11-6.2
|
||||
c-4.27-1.2-8.67-1.8-13.2-1.8c-4.54,0-9,0.54-13.4,1.6c-4.4,1.07-8.6,2.8-12.6,5.2s-7.6,5.34-10.8,8.8c-3.2,3.47-5.87,7.2-8,11.2
|
||||
c-2.14,4-3.87,8.14-5.2,12.4c-1.34,4.27-2.4,8.54-3.2,12.8l-8,48c-0.8,4.54-1.27,9.14-1.4,13.8c-0.14,4.67,0.13,9.2,0.8,13.6
|
||||
c0.66,4.4,1.86,8.6,3.6,12.6c1.73,4,4.13,7.47,7.2,10.4c3.06,2.94,6.8,5,11.2,6.2C3184.6,525,3189.06,525.6,3193.6,525.6z"/>
|
||||
<path fill="#333333" d="M3341.2,550.4l29.6-180h-23.6v-28h59.6L3400,382c2.93-5.6,6.33-11.06,10.2-16.4c3.86-5.33,8.2-10,13-14
|
||||
s10.26-7.06,16.4-9.2c6.13-2.13,12.13-3.2,18-3.2c4.8,0,9.4,0.67,13.8,2c4.4,1.34,8.26,3.54,11.6,6.6
|
||||
c3.33,3.07,5.93,6.67,7.8,10.8c1.86,4.14,3.06,8.54,3.6,13.2c0.53,4.67,0.6,9.4,0.2,14.2c-0.4,4.8-1,9.6-1.8,14.4h-31.2
|
||||
c0.53-3.73,0.86-7.4,1-11c0.13-3.6-0.27-7.13-1.2-10.6c-0.94-3.46-2.74-6.26-5.4-8.4c-2.67-2.13-5.87-3.2-9.6-3.2
|
||||
c-5.07,0-10.14,0.87-15.2,2.6c-5.07,1.74-9.6,4.34-13.6,7.8c-4,3.47-7.4,7.4-10.2,11.8c-2.8,4.4-5.2,9-7.2,13.8
|
||||
c-2,4.8-3.67,9.67-5,14.6c-1.34,4.94-2.4,9.8-3.2,14.6l-19.6,118H3341.2z"/>
|
||||
<path fill="#333333" d="M3635.6,553.2c-4,0-7.94-0.67-11.8-2c-3.87-1.33-7.07-3.33-9.6-6c-2.54-2.66-4.47-5.8-5.8-9.4
|
||||
c-1.34-3.6-2.4-7.4-3.2-11.4l-10.4-54.8c-2.14,0.27-4.34,0.47-6.6,0.6c-2.27,0.14-4.6,0.2-7,0.2c-2.14,0-4.34-0.06-6.6-0.2
|
||||
c-2.27-0.13-4.47-0.33-6.6-0.6l-13.2,80.8h-31.6l44-266h-16.4v-28h52.4l-17.6,108c3.73-3.73,7.73-7.26,12-10.6
|
||||
c4.26-3.33,8.86-6.06,13.8-8.2c4.93-2.13,9.93-3.73,15-4.8c5.06-1.06,10-1.6,14.8-1.6c7.2,0,13.8,1.47,19.8,4.4
|
||||
c6,2.94,10.8,7.07,14.4,12.4c3.6,5.34,5.93,11.4,7,18.2c1.06,6.8,1.06,13.67,0,20.6c-1.34,7.47-3.54,14.87-6.6,22.2
|
||||
c-3.07,7.34-7.2,14-12.4,20c-5.2,6-11.2,11.14-18,15.4c-6.8,4.27-14.07,7.74-21.8,10.4l10.8,56.8c0.26,1.6,0.86,3.07,1.8,4.4
|
||||
c0.93,1.34,2.2,2,3.8,2s3.13-0.6,4.6-1.8c1.46-1.2,2.6-2.46,3.4-3.8l31.6-54.8l25.6,13.6l-31.2,54.4c-1.87,3.2-4.34,6-7.4,8.4
|
||||
c-3.07,2.4-6.34,4.47-9.8,6.2c-3.47,1.74-7,3-10.6,3.8C3642.6,552.8,3639.06,553.2,3635.6,553.2z M3583.6,444
|
||||
c4.53,0,9.2-0.4,14-1.2c4.8-0.8,9.6-2,14.4-3.6c4.8-1.6,9.4-3.66,13.8-6.2c4.4-2.53,8.46-5.66,12.2-9.4
|
||||
c3.73-3.73,6.6-7.93,8.6-12.6c2-4.66,3.4-9.4,4.2-14.2c0.53-3.46,0.73-6.86,0.6-10.2c-0.14-3.33-0.94-6.46-2.4-9.4
|
||||
c-1.47-2.93-3.54-5.33-6.2-7.2c-2.67-1.86-5.74-2.8-9.2-2.8c-5.34,0-10.87,1.27-16.6,3.8c-5.74,2.54-10.74,5.87-15,10
|
||||
c-4.27,4.14-8,8.74-11.2,13.8c-3.2,5.07-6,10.27-8.4,15.6c-2.4,5.34-4.34,10.74-5.8,16.2c-1.47,5.47-2.87,11-4.2,16.6
|
||||
c1.86,0.27,3.73,0.47,5.6,0.6C3579.86,443.94,3581.73,444,3583.6,444z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 76 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 151 KiB |
@@ -0,0 +1 @@
|
||||
<svg height="50" viewBox="0 0 1033 1024" width="50" xmlns="http://www.w3.org/2000/svg"><path d="M512 512m-499.2 0a499.2 499.2 0 1 0 998.4 0 499.2 499.2 0 1 0-998.4 0Z" fill="#1989FA" fill-opacity=".3"></path><path d="M13.4144 536.8832A507.4816 507.4816 0 0 1 12.8 512C12.8 236.288 236.288 12.8 512 12.8c134.464 0 256.512 53.1584 346.2656 139.6096-7.1936 13.1328-18.2528 22.8992-28.5696 31.7056-17.1392 14.656-21.12-14.6432-34.3808-62.9888s-113.792-20.736-113.792 0 90.2272 29.6064-2.5984 79.296c-27.84 14.8992-65.1136 16.2176-87.8464 27.648-12.1344 6.0928-6.528 44.1856-14.6176 59.3152-6.272 11.776-26.8288 2.4064-31.68 0-24.8192-12.288-7.8336-80.9472-27.1104-86.9632-26.3168-8.2304-50.2784 27.4304-50.2784 40.64 0 15.0656 22.464 94.72 0 151.0784-24.8832 62.4256-104.5504 120.7936-156.2624 110.2976-98.4064-19.968-122.4448-48.4608-143.7184-19.968-21.2864 28.4928 12.9664 94.976 37.5552 135.6544 24.576 40.6656 2.56 92.2624-24.5888 92.2624-36.544 0-79.7824-46.6816-102.8096-92.2624-11.4048-22.5664-32.7936-49.664-64.1536-81.2416z m466.3936 246.7456c55.8336-38.3232 121.7664-60.6976 185.28-38.3232 63.488 22.3616 85.376 158.2976 31.616 200.0256-53.76 41.728-106.112 14.1696-128.7296 0-22.6176-14.1824-155.9936 14.1696-177.984 0-21.9904-14.1824-45.824-44.0832-45.824-99.776 0-55.68 79.808-23.616 135.6416-61.9264z m-171.392-146.7136c12.288-25.4208 40.64 7.168 57.3056-39.68 16.6656-46.8736 31.616-56.6784 49.344-26.5984 17.7408 30.08 13.376 62.7968 0 82.5344-13.376 19.7248-12.7872 15.5008-48.768 15.5008-35.968 0-70.1952-6.336-57.8944-31.7568zM473.0112 435.2c13.0176 1.3824 19.52 5.824 19.52 13.3504 0 11.2768-9.7536 26.9056-9.7536 26.9056s-27.1616 15.2576-33.28 8.704c-6.0928-6.528 8.1664-22.272 8.1664-35.6096 0-8.896 5.12-13.3504 15.36-13.3504z m24.6016 206.3488c28.9536-16.0512 51.7632-18.6368 68.4032-7.744 24.96 16.3456 87.2448 28.9024 87.2448 36.4928v25.0368c-51.9296-2.9824-85.248-11.328-99.9424-25.0368-22.0416-20.5568-66.9312 9.0368-66.9312 0 0-6.016 3.7376-15.6032 11.2256-28.7488z" fill="#1989FA"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
@@ -0,0 +1 @@
|
||||
<svg height="50" viewBox="0 0 1024 1024" width="50" xmlns="http://www.w3.org/2000/svg"><path d="M109.312 228.736H765.44c30.208 0 54.72 24.512 54.72 54.656v468.16H54.656V283.392c0-30.144 24.512-54.656 54.656-54.656z" fill="#A4ADC5"></path><path d="M0 809.6m27.328 0l820.096 0q27.328 0 27.328 27.328l0 61.504q0 27.328-27.328 27.328l-820.096 0q-27.328 0-27.328-27.328l0-61.504q0-27.328 27.328-27.328Z" fill="#A4ADC5"></path><path d="M328 83.52m54.656 0l546.752 0q54.656 0 54.656 54.656l0 413.504q0 54.656-54.656 54.656l-546.752 0q-54.656 0-54.656-54.656l0-413.504q0-54.656 54.656-54.656Z" fill="#08153A"></path><path d="M536.96 244.16a25.6 25.6 0 0 1 4.224 32l-3.2 4.16-60.8 64.576 60.8 64.64a25.6 25.6 0 0 1 2.304 32.256l-3.392 3.904A25.6 25.6 0 0 1 504.64 448l-3.904-3.392-69.12-73.344a38.4 38.4 0 0 1-3.712-48l3.776-4.672 69.056-73.344a25.6 25.6 0 0 1 36.16-1.088zM775.168 244.16a25.6 25.6 0 0 0-4.224 32l3.2 4.16 60.8 64.576-60.8 64.64a25.6 25.6 0 0 0-2.368 32.256l3.392 3.904a25.6 25.6 0 0 0 32.256 2.304l3.968-3.392 69.056-73.344a38.4 38.4 0 0 0 3.712-48l-3.712-4.672-69.12-73.344a25.6 25.6 0 0 0-36.16-1.088zM677.952 243.712a25.6 25.6 0 0 1 47.04 19.648l-2.048 4.8-88.832 163.456a25.6 25.6 0 0 1-46.976-19.648l1.984-4.8 88.832-163.456z" fill="#FFFFFF"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg height="50" viewBox="0 0 1048 1024" width="50" xmlns="http://www.w3.org/2000/svg"><path d="M387.121951 636.878049m-387.121951 0a387.121951 387.121951 0 1 0 774.243902 0 387.121951 387.121951 0 1 0-774.243902 0Z" fill="#FFEFDB"></path><path d="M899.121951 574.439024v224.780488H249.756098V274.731707h212.292682l87.414635 69.931708V0h499.512195v574.439024H899.121951zM437.073171 324.682927H299.707317v424.585366h549.463415V424.585366H561.95122zM999.02439 49.95122H599.414634v324.682926h299.707317v149.853659h99.902439V49.95122z" fill="#040405"></path><path d="M674.341463 299.707317v-49.951219h249.756098v49.951219H674.341463z m0-149.853658h249.756098v49.951219H674.341463v-49.951219z" fill="#FF9E1F"></path></svg>
|
||||
|
After Width: | Height: | Size: 718 B |
@@ -0,0 +1 @@
|
||||
<svg height="50" viewBox="0 0 1024 1024" width="50" xmlns="http://www.w3.org/2000/svg"><path d="M572.4 584.1m-159.4 0a159.4 159.4 0 1 0 318.8 0 159.4 159.4 0 1 0-318.8 0Z" fill="#FF4C4D"></path><path d="M223.3 743.5l54.5-145.4h199.7l51.9 145.4h61.9L408.6 231.8l-6.8-19.7-41.5-0.6-199.3 532h62.3zM380 325l76.6 214.8h-157L380 325zM869.1 474.2c17 19.2 25.4 45.2 25.4 78v183.6H853v-48.1c-11.4 15.9-26.2 28.8-44.2 38.7-21.8 11.4-45.4 17.1-70.8 17.1-28.8 0-51.6-7.4-68.6-22.1-17.7-15.1-26.6-35.2-26.6-60.3 0-36.5 14.6-63.1 43.7-79.6 23.6-14 55.3-21 95.1-21l68.6-0.6v-9.4c0-47.9-24.9-71.9-74.7-71.9-23.2 0-41.3 4.8-54.2 14.4-14.4 10-23.2 24.7-26.5 44.2h-43.7c4.4-32.8 18.4-57.1 42-73 20.6-14.7 49-22.1 85.2-22.1 40.7 0 70.9 10.7 90.8 32.1z m-18.8 120.5l-65.8 0.6c-64.1 0-96.2 21.8-96.2 65.3 0 14 5.2 25.4 15.5 34.3 10.7 8.5 25.2 12.7 43.7 12.7 28.8 0 53.3-8.9 73.6-26.6 19.5-17.7 29.3-38.2 29.3-61.4v-24.9z"></path></svg>
|
||||
|
After Width: | Height: | Size: 915 B |
@@ -0,0 +1 @@
|
||||
<svg height="50" viewBox="0 0 1024 1024" width="50" xmlns="http://www.w3.org/2000/svg"><path d="M311.224 428.616V40.96C186.696 93.99 87.406 195.29 36.936 321.096l274.286 274.286 0.002-166.766z" fill="#AFE164"></path><path d="M428.616 311.22L702.904 36.936C643.84 13.164 579.474 0 512 0c-71.314 0-139.154 14.628-200.776 40.96v387.656L428.616 311.22z" fill="#D7E664"></path><path d="M983.04 311.22H595.384l117.394 117.396 274.286 274.286C1010.836 643.84 1024 579.474 1024 512c0-71.314-14.628-139.154-40.96-200.78z" fill="#FFAA64"></path><path d="M712.776 595.384V983.04c124.526-53.03 223.816-154.33 274.286-280.136L712.776 428.616v166.768z" fill="#FF6469"></path><path d="M595.384 712.776L321.096 987.064C380.16 1010.834 444.526 1024 512 1024c71.316 0 139.154-14.628 200.776-40.96V595.384L595.384 712.776z" fill="#C3B4FA"></path><path d="M428.616 712.776H40.96c53.03 124.526 154.33 223.816 280.136 274.286l274.286-274.286H428.616z" fill="#7DD2F0"></path><path d="M311.224 595.384L36.936 321.096C13.164 380.16 0 444.526 0 512c0 71.314 14.628 139.154 40.96 200.776h387.656L311.224 595.384z" fill="#7DE6C3"></path><path d="M595.384 311.22H983.04C930.01 186.696 828.71 87.404 702.904 36.936L428.616 311.22h166.768z" fill="#FFE669"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg height="50" viewBox="0 0 1024 1024" width="50" xmlns="http://www.w3.org/2000/svg"><path d="M891.2 948.8l-33.6-96H699.2l-33.6 96H564.8l153.6-403.2h115.2l153.6 403.2h-96zM780.8 632l-57.6 148.8h115.2L780.8 632zM526.4 780.8L569.6 680c-14.4-9.6-28.8-19.2-38.4-28.8 72-81.6 129.6-182.4 172.8-302.4h129.6v-96H468.8l72-24c-9.6-33.6-33.6-86.4-57.6-129.6l-105.6 33.6c19.2 38.4 38.4 86.4 48 120H70.4v96h134.4c43.2 120 105.6 220.8 177.6 302.4C296 718.4 185.6 766.4 56 800c19.2 24 48 72 62.4 96 134.4-38.4 249.6-96 340.8-172.8 19.2 19.2 43.2 38.4 67.2 57.6z m-220.8-432h288C560 440 512 516.8 454.4 584 392 516.8 339.2 440 305.6 348.8z"></path></svg>
|
||||
|
After Width: | Height: | Size: 642 B |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><rect x="4" width="16" height="8" style="fill:#ff7186"/><rect x="4" width="8" height="24" style="fill:#ff7186"/><rect x="12" width="8" height="8" style="fill:#ff889f"/><rect x="4" y="8" width="8" height="8" style="fill:#ff4e58"/><rect x="4" y="16" width="8" height="8" style="fill:#f2254d"/></svg>
|
||||
|
After Width: | Height: | Size: 380 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 220 KiB |
|
After Width: | Height: | Size: 81 KiB |