139 lines
10 KiB
PHP
139 lines
10 KiB
PHP
<!DOCTYPE html>
|
|
<html <?php language_attributes(); ?>>
|
|
<head>
|
|
<meta charset="<?php bloginfo('charset'); ?>">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<?php wp_head(); ?>
|
|
</head>
|
|
<body <?php body_class(); ?>>
|
|
<?php wp_body_open(); ?>
|
|
|
|
<header class="site-header">
|
|
<div class="container">
|
|
<div class="header-content">
|
|
<div class="logo-container">
|
|
<a href="<?php echo esc_url(home_url('/')); ?>" class="logo-link">
|
|
<svg class="logo-main" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="260" height="70" viewBox="0 0 260 70">
|
|
<defs>
|
|
<style>
|
|
.cls-1 { fill: #f8d1d9; }
|
|
.cls-1, .cls-2, .cls-3 { fill-rule: evenodd; }
|
|
.cls-2 { fill: #bab5ec; }
|
|
.cls-3 { fill: url(#linear-gradient); }
|
|
.text-group {
|
|
font-family: "PingFang SC", "Microsoft YaHei", "Heiti SC", sans-serif;
|
|
text-anchor: middle;
|
|
}
|
|
.text-cn {
|
|
font-size: 26px;
|
|
font-weight: 800;
|
|
}
|
|
.text-en {
|
|
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
letter-spacing: 3px;
|
|
fill: #8e88c7;
|
|
text-transform: uppercase;
|
|
}
|
|
.deco-solid-circle { fill: #f1b7bf; }
|
|
.deco-hollow-circle { fill: none; stroke: #bab5ec; stroke-width: 2; }
|
|
.deco-plus { stroke: #bab5ec; stroke-width: 3; stroke-linecap: round; }
|
|
.deco-square { fill: #bab5ec; opacity: 0.8; }
|
|
.deco-line { stroke: #f8d1d9; stroke-width: 3; stroke-linecap: round; }
|
|
</style>
|
|
<linearGradient id="linear-gradient" x1="19.41" y1="66" x2="44.59" y2="12" gradientUnits="userSpaceOnUse">
|
|
<stop offset="0" stop-color="#bab5ec"/>
|
|
<stop offset="1" stop-color="#f1b7bf"/>
|
|
</linearGradient>
|
|
</defs>
|
|
<g id="decorations">
|
|
<rect class="deco-square" x="5" y="8" width="6" height="6" transform="rotate(15 8 11)" />
|
|
<path class="deco-plus" d="M78 20 L88 20 M83 15 L83 25" />
|
|
<circle class="deco-hollow-circle" cx="245" cy="15" r="5" />
|
|
<circle class="deco-solid-circle" cx="235" cy="55" r="4" />
|
|
<path class="deco-line" d="M250 60 L256 54" />
|
|
</g>
|
|
<g id="logo-main" transform="translate(12, 2) scale(0.95)">
|
|
<path id="cls-1" class="cls-1" d="M0,17L30,0V39L0,57V17Z"/>
|
|
<path id="cls-2" class="cls-2" d="M33,39L62,56V17L33,0V39Z"/>
|
|
<path id="cls-3" data-name="cls-3" class="cls-3" d="M18,28L46,12V49L18,66V28Z"/>
|
|
</g>
|
|
<g class="text-group" transform="translate(165, 0)">
|
|
<text y="38" class="text-cn" fill="currentColor">爱特工作室</text>
|
|
<text y="56" class="text-en">IT Studio</text>
|
|
</g>
|
|
</svg>
|
|
<img src="<?php echo get_template_directory_uri(); ?>/resources/it_logo_2024.svg" class="logo-mobile" alt="IT Studio">
|
|
</a>
|
|
</div>
|
|
|
|
<nav class="main-navigation">
|
|
<button class="mobile-menu-toggle" aria-label="Toggle Menu">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
</button>
|
|
<?php
|
|
$announcement_nav_url = get_post_type_archive_link('announcement');
|
|
if (!$announcement_nav_url) {
|
|
$announcement_nav_url = home_url('/announcements');
|
|
}
|
|
$news_nav_url = get_post_type_archive_link('news');
|
|
if (!$news_nav_url) {
|
|
$news_nav_url = home_url('/news');
|
|
}
|
|
$posts_page_id = (int) get_option('page_for_posts');
|
|
$blog_nav_url = $posts_page_id ? get_permalink($posts_page_id) : '';
|
|
if (!$blog_nav_url) {
|
|
$blog_nav_url = home_url('/blog');
|
|
}
|
|
$blog_nav_url = 'https://blog.itstudio.club';
|
|
?>
|
|
|
|
<ul class="nav-menu">
|
|
<li><a href="<?php echo esc_url(home_url('/')); ?>" data-cn="首页" data-en="Home"></a></li>
|
|
<li><a href="<?php echo esc_url($announcement_nav_url); ?>" data-cn="公告通知" data-en="Announcements"></a></li>
|
|
<li><a href="<?php echo esc_url($news_nav_url); ?>" data-cn="社团新闻" data-en="News"></a></li>
|
|
<li><a href="<?php echo esc_url($blog_nav_url); ?>" target="_blank" rel="noopener noreferrer" data-cn="博客" data-en="Blog"></a></li>
|
|
<li><a href="<?php echo esc_url(home_url('/services')); ?>" data-cn="便民服务" data-en="Service"></a></li>
|
|
<li><a href="<?php echo esc_url(home_url('/about')); ?>" data-cn="社团介绍" data-en="Introduction"></a></li>
|
|
<li><a href="<?php echo esc_url(home_url('/join')); ?>" data-cn="加入我们" data-en="Join"></a></li>
|
|
</ul>
|
|
|
|
<div class="social-links">
|
|
<button class="lang-toggle" aria-label="Toggle Language">
|
|
<span class="lang-text">EN</span>
|
|
</button>
|
|
<a href="https://github.com/itstudio-2002" target="_blank" rel="noopener noreferrer" aria-label="GitHub">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
</svg>
|
|
</a>
|
|
<a href="https://space.bilibili.com/3546373051910563" target="_blank" rel="noopener noreferrer" aria-label="Bilibili">
|
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="currentColor">
|
|
<path d="M17.813 4.653h.854c1.51.054 2.769.578 3.773 1.574 1.004.995 1.524 2.249 1.56 3.76v7.36c-.036 1.51-.556 2.769-1.56 3.773s-2.262 1.524-3.773 1.56H5.333c-1.51-.036-2.769-.556-3.773-1.56S.036 18.858 0 17.347v-7.36c.036-1.511.556-2.765 1.56-3.76 1.004-.996 2.262-1.52 3.773-1.574h.774l-1.174-1.12a1.234 1.234 0 0 1-.373-.906c0-.356.124-.658.373-.907l.027-.027c.267-.249.573-.373.92-.373.347 0 .653.124.92.373L9.653 4.44c.071.071.134.142.187.213h4.267a.836.836 0 0 1 .16-.213l2.853-2.747c.267-.249.573-.373.92-.373.347 0 .662.151.929.4.267.249.391.551.391.907 0 .355-.124.657-.373.906zM5.333 7.24c-.746.018-1.373.276-1.88.773-.506.498-.769 1.13-.786 1.894v7.52c.017.764.28 1.395.786 1.893.507.498 1.134.756 1.88.773h13.334c.746-.017 1.373-.275 1.88-.773.506-.498.769-1.129.786-1.893v-7.52c-.017-.765-.28-1.396-.786-1.894-.507-.497-1.134-.755-1.88-.773zM8 11.107c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c0-.373.129-.689.386-.947.258-.257.574-.386.947-.386zm8 0c.373 0 .684.124.933.373.25.249.383.569.4.96v1.173c-.017.391-.15.711-.4.96-.249.25-.56.374-.933.374s-.684-.125-.933-.374c-.25-.249-.383-.569-.4-.96V12.44c.017-.391.15-.711.4-.96.249-.249.56-.373.933-.373Z"/>
|
|
</svg>
|
|
</a>
|
|
<button class="theme-toggle" aria-label="Toggle Theme">
|
|
<svg class="sun-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<circle cx="12" cy="12" r="5"/>
|
|
<line x1="12" y1="1" x2="12" y2="3"/>
|
|
<line x1="12" y1="21" x2="12" y2="23"/>
|
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
|
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
|
|
<line x1="1" y1="12" x2="3" y2="12"/>
|
|
<line x1="21" y1="12" x2="23" y2="12"/>
|
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
|
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
|
|
</svg>
|
|
<svg class="moon-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</header>
|