跳转到内容
打开/关闭菜单
  • 450 条目
  • 804 文件
  • 22 用户
  • 9044 编辑
Blockland Wiki
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
无编辑摘要
无编辑摘要
第1行: 第1行:
<!-- 这个<style>代码块是所有美化的核心,它自带了字体、颜色、布局、动画效果 -->
<!--  
<style>
  这是“魔法”所在!
/* 导入一个更现代、更具设计感的免费字体 */
  这行代码会告诉页面去加载并使用我们在第一步创建的那个CSS文件。
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap');
  这才是MediaWiki的正确做法。
-->
<templatestyles src="Template:MainPage/styles.css" />


/* --- 颜色和全局样式定义 --- */
<!-- 这是页面的HTML结构 -->
:root {
<div class="blockland-container">
    --bg-color: #121212; /* 深邃的背景色 */
    --primary-color: #00aaff; /* 明亮的蓝色,用于交互和高亮 */
    --card-color: #1e1e1e; /* 卡片背景色,比主背景稍亮 */
    --text-color: #e0e0e0; /* 主要文字颜色,柔和不刺眼 */
    --text-muted: #888;  /* 次要文字颜色 */
    --border-color: #333; /* 边框颜色 */
}


/* --- 整体容器 --- */
    <!-- 顶部大图和搜索区域 -->
.blockland-container {
    <div class="hero-section">
    font-family: 'Montserrat', sans-serif;
        <h1>方块大陆百科</h1>
    background-color: var(--bg-color);
        <p>一个由你我共同构筑,涵盖了关于方块大陆世界一切的自由知识库</p>
    color: var(--text-color);
        <div class="search-container">
    margin: -24px -24px -24px -24px; /* 撑满整个内容区 */
            <form class="search-form" action="{{localurl:Special:Search}}">
     padding: 0;
                <input class="search-input" type="search" name="search" placeholder="探索这个世界的奥秘...">
}
                <button class="search-button" type="submit">探索</button>
            </form>
        </div>
     </div>


/* --- 顶部“英雄”横幅 --- */
    <!-- 主要内容区域 -->
.hero-section {
    <div class="main-grid">
    background-image: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 1)), url('https://images.unsplash.com/photo-1579546929518-9e396f3cc809?q=80&w=1920'); /* 您可以替换成自己世界的图片URL */
       
    background-size: cover;
        <!-- 大卡片:内容传送门 -->
    background-position: center;
        <div class="b-card" style="grid-column: span 2;">
    padding: 100px 40px;
            <h2>内容传送门</h2>
    text-align: center;
            <div class="portal-grid">
    border-bottom: 2px solid var(--primary-color);
                <a href="/wiki/传送门:世界地理" class="portal-link"><svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zM17.9 17.39c-.21.79-1.01 1.4-1.9 1.4v-3h2c.55 0 1 .45 1 1 0 .62-.37 1.16-.89 1.39zM13 14v-4c0-1.1-.9-2-2-2h-1V6h1c1.1 0 2-.9 2-2V3.07c3.95.49 7 3.85 7 7.93 0 .62-.08 1.21-.21 1.79L13 14z"/></svg> 世界地理</a>
}
                <a href="/wiki/传送门:历史年表" class="portal-link"><svg viewBox="0 0 24 24"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"/></svg> 历史年表</a>
.hero-section h1 {
                <a href="/wiki/传送门:种族与生物" class="portal-link"><svg viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg> 种族与生物</a>
    font-size: 4em;
                <a href="/wiki/传送门:组织与势力" class="portal-link"><svg viewBox="0 0 24 24"><path d="M12 3L4 9v12h16V9l-8-6zm0 2.24L17.76 9H6.24L12 5.24zM18 19H6v-8h12v8zM8 13h2v4H8v-4zm4 0h2v4h-2v-4z"/></svg> 组织与势力</a>
    font-weight: 700;
                <a href="/wiki/传送门:科技与魔法" class="portal-link"><svg viewBox="0 0 24 24"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/></svg> 科技与魔法</a>
    color: #fff;
                <a href="/wiki/传送门:重要人物" class="portal-link"><svg viewBox="0 0 24 24"><path d="M16.5 12c1.38 0 2.5-1.12 2.5-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.5c0-.85.33-2.34 2.37-3.41C10.5 13.1 9.66 13 9 13z"/></svg> 重要人物</a>
    margin: 0;
            </div>
    text-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
        </div>
}
.hero-section p {
    font-size: 1.2em;
    color: var(--text-muted);
    margin-top: 10px;
}


/* --- 超级搜索框 --- */
        <!-- 中间卡片:今日推荐 -->
.search-container {
        <div class="b-card">
    margin-top: 30px;
            <h2>今日推荐条目</h2>
}
            <div style="color: var(--text-muted); padding: 10px 0;">{{模板:今日推荐条目}}</div>
.search-form { display: flex; max-width: 600px; margin: auto; border: 2px solid var(--primary-color); border-radius: 50px; overflow: hidden; background: var(--card-color); }
        </div>
.search-input { flex-grow: 1; border: none; background: transparent; padding: 15px 25px; font-size: 1.1em; color: var(--text-color); outline: none; }
.search-button { border: none; background: var(--primary-color); color: #fff; padding: 0 30px; font-size: 1.1em; font-weight: bold; cursor: pointer; transition: background-color 0.2s; }
.search-button:hover { background-color: #0088cc; }


/* --- 主内容网格布局 --- */
        <!-- 右侧卡片:杂项 -->
.main-grid {
        <div class="b-card">
    display: grid;
            <h2>你知道吗?</h2>
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            <ul style="color: var(--text-muted);">
    gap: 30px;
              <li>{{模板:你知道吗}}</li>
    padding: 40px;
            </ul>
}
        </div>
 
     </div>
/* --- 卡片样式 --- */
</div>
.b-card {
    background-color: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.b-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 170, 255, 0.1);
}
.b-card h2 {
    font-size: 1.5em;
     font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}
.b-card a { color: var(--primary-color); text-decoration: none; font-weight: 500;

2025年11月17日 (一) 10:30的版本

页面模板:MainPage/styles.css没有内容。

方块大陆百科

一个由你我共同构筑,涵盖了关于方块大陆世界一切的自由知识库

           <form class="search-form" action="/wiki/%E7%89%B9%E6%AE%8A:Search">
               <input class="search-input" type="search" name="search" placeholder="探索这个世界的奥秘...">
               <button class="search-button" type="submit">探索</button>
           </form>

内容传送门

               <a href="/wiki/传送门:世界地理" class="portal-link"><svg viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zM17.9 17.39c-.21.79-1.01 1.4-1.9 1.4v-3h2c.55 0 1 .45 1 1 0 .62-.37 1.16-.89 1.39zM13 14v-4c0-1.1-.9-2-2-2h-1V6h1c1.1 0 2-.9 2-2V3.07c3.95.49 7 3.85 7 7.93 0 .62-.08 1.21-.21 1.79L13 14z"/></svg> 世界地理</a>
               <a href="/wiki/传送门:历史年表" class="portal-link"><svg viewBox="0 0 24 24"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7v-5z"/></svg> 历史年表</a>
               <a href="/wiki/传送门:种族与生物" class="portal-link"><svg viewBox="0 0 24 24"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg> 种族与生物</a>
               <a href="/wiki/传送门:组织与势力" class="portal-link"><svg viewBox="0 0 24 24"><path d="M12 3L4 9v12h16V9l-8-6zm0 2.24L17.76 9H6.24L12 5.24zM18 19H6v-8h12v8zM8 13h2v4H8v-4zm4 0h2v4h-2v-4z"/></svg> 组织与势力</a>
               <a href="/wiki/传送门:科技与魔法" class="portal-link"><svg viewBox="0 0 24 24"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"/></svg> 科技与魔法</a>
               <a href="/wiki/传送门:重要人物" class="portal-link"><svg viewBox="0 0 24 24"><path d="M16.5 12c1.38 0 2.5-1.12 2.5-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3 1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.5c0-.85.33-2.34 2.37-3.41C10.5 13.1 9.66 13 9 13z"/></svg> 重要人物</a>

今日推荐条目

你知道吗?

首页:修订间差异

来自Blockland Wiki