base.html 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!doctype html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1" />
  6. {% if page and page.startswith('admin') %}
  7. <title>{{ title or "源代码分享管理系统" }}</title>
  8. {% else %}
  9. <title>SourceShare源码分享{% if title %} - {{ title }}{% endif %}</title>
  10. {% endif %}
  11. <link rel="preload" as="font" type="font/woff2" href="{{ url_for('static', filename='lib/remixicon/remixicon.woff2') }}" crossorigin />
  12. <link rel="stylesheet" href="{{ url_for('static', filename='lib/remixicon/remixicon.css') }}" />
  13. <link rel="stylesheet" href="{{ url_for('static', filename='lib/sweetalert2/sweetalert2.min.css') }}" />
  14. <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
  15. {% block head_extra %}{% endblock %}
  16. </head>
  17. <body data-page="{{ page or '' }}">
  18. <header class="topbar">
  19. <div class="container topbar-inner">
  20. <a class="brand" href="{{ url_for('page_index') }}">
  21. <div style="width: 32px; height: 32px; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%); border-radius: 8px; display: grid; place-items: center; color: white; margin-right: 8px; box-shadow: var(--shadow);">
  22. <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  23. <path d="M8 17L3 12l5-5"></path>
  24. <path d="M16 7l5 5-5 5"></path>
  25. <path d="M14 5l-4 14"></path>
  26. </svg>
  27. </div>
  28. <span style="font-weight: 700; letter-spacing: -0.5px;">SourceShare</span>
  29. </a>
  30. <nav class="nav" id="topNav">
  31. <div class="nav-group nav-left">
  32. <a href="{{ url_for('page_resources') }}" class="{{ 'active' if page=='resources' else '' }}"><i class="ri-apps-2-line" style="margin-right:4px;"></i>资源</a>
  33. <a href="{{ url_for('page_vip') }}" class="{{ 'active' if page=='vip' else '' }}"><i class="ri-vip-crown-line" style="margin-right:4px;"></i>会员</a>
  34. <a href="{{ url_for('page_me') }}" class="{{ 'active' if page=='me' else '' }}"><i class="ri-user-line" style="margin-right:4px;"></i>我的</a>
  35. </div>
  36. <div class="nav-group nav-right">
  37. <div id="navAuth" class="nav-auth">
  38. <a id="navLogin" href="{{ url_for('page_login') }}" class="btn btn-ghost {{ 'active' if page=='login' else '' }}" style="padding: 6px 12px; height: auto;"><i class="ri-login-box-line" style="margin-right:4px;"></i>登录</a>
  39. <a id="navRegister" href="{{ url_for('page_register') }}" class="btn btn-primary {{ 'active' if page=='register' else '' }}" style="padding: 6px 16px; height: auto; border-radius: 20px;"><i class="ri-user-add-line" style="margin-right:4px;"></i>注册</a>
  40. </div>
  41. </div>
  42. </nav>
  43. </div>
  44. </header>
  45. <main class="container">
  46. {% block content %}{% endblock %}
  47. </main>
  48. <footer class="footer" style="background: var(--bg); border-top: 1px solid var(--border); padding: 40px 0 20px; margin-top: 60px;">
  49. <div class="container">
  50. <div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 24px;">
  51. <div style="display: flex; align-items: center; gap: 8px;">
  52. <div style="width: 24px; height: 24px; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%); border-radius: 6px; display: grid; place-items: center; color: white;">
  53. <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  54. <path d="M8 17L3 12l5-5"></path>
  55. <path d="M16 7l5 5-5 5"></path>
  56. <path d="M14 5l-4 14"></path>
  57. </svg>
  58. </div>
  59. <span style="font-weight: 600; font-size: 1.1rem;">SourceShare</span>
  60. </div>
  61. </div>
  62. <div style="border-top: 1px solid var(--border); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.9rem;">
  63. <div class="muted">© 2026 SourceShare 源代码分享管理系统. 保留所有权利.</div>
  64. </div>
  65. </div>
  66. </footer>
  67. <script src="{{ url_for('static', filename='lib/sweetalert2/sweetalert2.min.js') }}"></script>
  68. {% block scripts %}
  69. <script src="{{ url_for('static', filename='app_common.js') }}"></script>
  70. <script src="{{ url_for('static', filename='app_user.js') }}"></script>
  71. {% endblock %}
  72. </body>
  73. </html>