db_seed.php 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. /**
  3. * BCJD 导航 - 初始数据(种子数据)
  4. *
  5. * 此文件由 db_init.php 自动调用,在数据库表创建后导入默认链接数据。
  6. * 如果需要自定义初始链接,修改此文件即可。
  7. *
  8. * 每条记录字段说明:
  9. * title - 链接标题
  10. * url - 链接地址
  11. * description - 描述文字
  12. * icon_svg - SVG 图标代码
  13. * group_name - 分组名称(英文标识)
  14. * group_label - 分组显示标签
  15. * group_hint - 分组提示文字(可含 HTML)
  16. * keywords - 搜索关键词(空格分隔)
  17. * tag_label - 标签文字
  18. * tag_class - 标签样式类(ok / warn / 空)
  19. * meta_domain - 域名/元信息
  20. * sort_order - 排序序号
  21. * is_private - 是否私有(1=需登录, 0=公开)
  22. *
  23. * @return array
  24. */
  25. function get_seed_links(): array
  26. {
  27. return [
  28. // ===== 应用 - 公开 =====
  29. [
  30. 'title' => 'Monica',
  31. 'url' => 'https://monica.bcjd.net',
  32. 'description' => '个人关系/联系人管理类应用入口。',
  33. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M12 21s-7-4.4-9-9.2C1.3 8 3.4 5 6.8 5c1.8 0 3 .9 3.7 1.8C11.2 5.9 12.4 5 14.2 5 17.6 5 19.7 8 21 11.8 19 16.6 12 21 12 21Z" stroke="currentColor" stroke-width="1.7"/></svg>',
  34. 'group_name' => 'apps',
  35. 'group_label' => '应用',
  36. 'group_hint' => '常用入口',
  37. 'keywords' => 'monica crm 联系人 个人 管理',
  38. 'tag_label' => 'App',
  39. 'tag_class' => 'ok',
  40. 'meta_domain' => 'monica.bcjd.net',
  41. 'sort_order' => 1,
  42. 'is_private' => 0,
  43. ],
  44. [
  45. 'title' => 'Gogs',
  46. 'url' => 'https://gogs.bcjd.net',
  47. 'description' => 'Git 仓库服务入口(代码托管/协作)。',
  48. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M7 7h10v10H7V7Z" stroke="currentColor" stroke-width="1.7"/><path d="M9 9h6M9 12h6M9 15h4" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>',
  49. 'group_name' => 'apps',
  50. 'group_label' => '应用',
  51. 'group_hint' => '常用入口',
  52. 'keywords' => 'gogs git 代码 仓库 dev',
  53. 'tag_label' => 'Dev',
  54. 'tag_class' => 'ok',
  55. 'meta_domain' => 'gogs.bcjd.net',
  56. 'sort_order' => 2,
  57. 'is_private' => 0,
  58. ],
  59. [
  60. 'title' => 'Docker',
  61. 'url' => 'https://docker.bcjd.net',
  62. 'description' => '容器管理入口(例如 Portainer)。建议仅管理员使用。',
  63. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M4 7.5 12 3l8 4.5v9L12 21l-8-4.5v-9Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/><path d="M12 3v18" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" opacity=".75"/><path d="M4 7.5 12 12l8-4.5" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round" opacity=".75"/></svg>',
  64. 'group_name' => 'apps',
  65. 'group_label' => '应用',
  66. 'group_hint' => '常用入口',
  67. 'keywords' => 'docker portainer 容器 运维 管理',
  68. 'tag_label' => 'Ops',
  69. 'tag_class' => 'ok',
  70. 'meta_domain' => 'docker.bcjd.net',
  71. 'sort_order' => 3,
  72. 'is_private' => 1,
  73. ],
  74. // ===== 运维/管理 - 私有 =====
  75. [
  76. 'title' => 'Webmin',
  77. 'url' => 'https://webmin.bcjd.net',
  78. 'description' => '服务器管理面板入口。请确认账号安全与访问来源。',
  79. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M12 2l8 4v6c0 5-3.5 9.4-8 10-4.5-.6-8-5-8-10V6l8-4Z" stroke="currentColor" stroke-width="1.7"/></svg>',
  80. 'group_name' => 'ops',
  81. 'group_label' => '运维 / 管理',
  82. 'group_hint' => '<span style="color:var(--danger)">谨慎操作</span>(建议仅管理员使用)',
  83. 'keywords' => 'webmin 运维 管理 面板 linux',
  84. 'tag_label' => 'Admin',
  85. 'tag_class' => 'warn',
  86. 'meta_domain' => 'webmin.bcjd.net',
  87. 'sort_order' => 10,
  88. 'is_private' => 1,
  89. ],
  90. [
  91. 'title' => 'phpMyAdmin',
  92. 'url' => 'https://phpmyadmin.bcjd.net',
  93. 'description' => '数据库管理入口。请避免在不可信网络下使用。',
  94. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M6 7c0 2.2 2.7 4 6 4s6-1.8 6-4-2.7-4-6-4-6 1.8-6 4Z" stroke="currentColor" stroke-width="1.7"/><path d="M6 7v10c0 2.2 2.7 4 6 4s6-1.8 6-4V7" stroke="currentColor" stroke-width="1.7"/></svg>',
  95. 'group_name' => 'ops',
  96. 'group_label' => '运维 / 管理',
  97. 'group_hint' => '<span style="color:var(--danger)">谨慎操作</span>(建议仅管理员使用)',
  98. 'keywords' => 'phpmyadmin mysql mariadb 数据库 管理',
  99. 'tag_label' => 'DB',
  100. 'tag_class' => 'warn',
  101. 'meta_domain' => 'phpmyadmin.bcjd.net',
  102. 'sort_order' => 11,
  103. 'is_private' => 1,
  104. ],
  105. [
  106. 'title' => 'Mail',
  107. 'url' => 'https://mail.bcjd.net',
  108. 'description' => '邮箱系统入口(WebMail/邮件访问)。建议注意账号与设备安全。',
  109. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M4 7h16v10H4V7Z" stroke="currentColor" stroke-width="1.7"/><path d="M4 8l8 6 8-6" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>',
  110. 'group_name' => 'ops',
  111. 'group_label' => '运维 / 管理',
  112. 'group_hint' => '<span style="color:var(--danger)">谨慎操作</span>(建议仅管理员使用)',
  113. 'keywords' => 'mail 邮箱 邮件 webmail 收件箱 管理 运维 smtp imap',
  114. 'tag_label' => 'Mail',
  115. 'tag_class' => 'warn',
  116. 'meta_domain' => 'mail.bcjd.net',
  117. 'sort_order' => 12,
  118. 'is_private' => 1,
  119. ],
  120. // ===== 站点 - 公开 =====
  121. [
  122. 'title' => 'www.bcjd.net',
  123. 'url' => 'https://www.bcjd.net',
  124. 'description' => '网站主页/内容入口。你可以把此导航页部署在这里。',
  125. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M4 10.5 12 4l8 6.5V20a1 1 0 0 1-1 1h-5v-6H10v6H5a1 1 0 0 1-1-1v-9.5Z" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>',
  126. 'group_name' => 'sites',
  127. 'group_label' => '站点',
  128. 'group_hint' => '对外主页 / 内容入口',
  129. 'keywords' => 'bcjd 主站 www 首页',
  130. 'tag_label' => 'Web',
  131. 'tag_class' => 'ok',
  132. 'meta_domain' => '主站入口',
  133. 'sort_order' => 20,
  134. 'is_private' => 0,
  135. ],
  136. [
  137. 'title' => 'www.qyqy.org',
  138. 'url' => 'https://www.qyqy.org',
  139. 'description' => 'qyqy.org 的 www 入口。',
  140. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M4 6h16v12H4V6Z" stroke="currentColor" stroke-width="1.7"/><path d="M7 9h10M7 12h8M7 15h6" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"/></svg>',
  141. 'group_name' => 'sites',
  142. 'group_label' => '站点',
  143. 'group_hint' => '对外主页 / 内容入口',
  144. 'keywords' => 'qyqy 网站 www',
  145. 'tag_label' => 'Web',
  146. 'tag_class' => '',
  147. 'meta_domain' => '站点入口',
  148. 'sort_order' => 21,
  149. 'is_private' => 0,
  150. ],
  151. [
  152. 'title' => 'www.mahaoyun.com',
  153. 'url' => 'https://www.mahaoyun.com',
  154. 'description' => 'mahaoyun.com 的 www 入口。',
  155. 'icon_svg' => '<svg viewBox="0 0 24 24" fill="none"><path d="M12 3l9 6-9 6-9-6 9-6Z" stroke="currentColor" stroke-width="1.7"/><path d="M3 9v8l9 6 9-6V9" stroke="currentColor" stroke-width="1.7"/></svg>',
  156. 'group_name' => 'sites',
  157. 'group_label' => '站点',
  158. 'group_hint' => '对外主页 / 内容入口',
  159. 'keywords' => 'mahaoyun 网站 www',
  160. 'tag_label' => 'Web',
  161. 'tag_class' => '',
  162. 'meta_domain' => '站点入口',
  163. 'sort_order' => 22,
  164. 'is_private' => 0,
  165. ],
  166. ];
  167. }