Skip to content

Commit

Permalink
更改了页面设计风格
Browse files Browse the repository at this point in the history
  • Loading branch information
Redapple-one committed Jan 11, 2025
1 parent a286806 commit 399f3f2
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 105 deletions.
1 change: 0 additions & 1 deletion src/icons/arrow.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/icons/tacs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/images/bg-compressed.webp
Binary file not shown.
1 change: 1 addition & 0 deletions src/images/bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/cover3.webp
Binary file not shown.
211 changes: 111 additions & 100 deletions src/index.html

Large diffs are not rendered by default.

19 changes: 17 additions & 2 deletions src/input.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
/* font */
html{
font-family: "MiSans VF", "MiSans", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
background-color: #0E0E0E;
}

.navbar-menu:checked ~ label .navbar-menu-arrow {
--tw-rotate: 180deg;
Expand All @@ -17,13 +22,23 @@
}

.navbar-menu\:block {
will-change: max-height, opacity; /* 提升这两个属性的性能 */
height: 0; /* 初始高度为 0 */
overflow: hidden; /* 防止内容溢出 */
opacity: 0; /* 初始透明度为 0 */
}

.navbar-menu\:block.visible {
height: calc(100vh - 64px); /* 目标高度 */
height: calc(100vh - 4rem); /* 目标高度 */
opacity: 1; /* 完全不透明 */
background-color: #1e2939;
}

.navbar-menu\:nav.visible {
background-color: #1e2939;
}

.grid-images{
display: grid;
gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}
2 changes: 2 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
`)
const menuToggle = document.querySelector('input.navbar-menu');
const navbarMenuBlock = document.querySelector('.navbar-menu\\:block');
const navbarNavbar = document.querySelector('.navbar-menu\\:nav');
const mobileNavbar = document.querySelector('.mobile-navbar');
let isMobileNavbarVisible = false;
let isMenuVisible = false;
Expand All @@ -31,6 +32,7 @@ document.addEventListener('DOMContentLoaded', () => {
const shouldShow = menuToggle.checked;
if (shouldShow !== isMenuVisible) {
navbarMenuBlock.classList.toggle('visible', shouldShow);
navbarNavbar.classList.toggle('visible', shouldShow);
isMenuVisible = shouldShow;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/output.css

Large diffs are not rendered by default.

0 comments on commit 399f3f2

Please sign in to comment.