Skip to content

Commit 05bb367

Browse files
committed
Update index.html
1 parent 33b7d25 commit 05bb367

File tree

1 file changed

+80
-3
lines changed

1 file changed

+80
-3
lines changed

index.html

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717

1818
/* Navigation Bar */
1919
nav {
20-
background-color: #986ce8; /* Inspired by the purple in the logo */
20+
position: sticky;
21+
top: 0;
22+
background-color: #986ce8;
2123
color: #fff;
2224
padding: 1rem;
2325
display: flex;
@@ -40,6 +42,11 @@
4042
width: 40px;
4143
}
4244

45+
nav .menu {
46+
display: flex;
47+
align-items: center;
48+
}
49+
4350
nav a {
4451
color: #fff;
4552
text-decoration: none;
@@ -51,6 +58,14 @@
5158
text-decoration: underline;
5259
}
5360

61+
.language-select {
62+
margin-left: 1.5rem;
63+
padding: 0.5rem;
64+
font-size: 1rem;
65+
border: none;
66+
border-radius: 5px;
67+
}
68+
5469
/* Container Styles */
5570
.container {
5671
max-width: 1000px;
@@ -152,6 +167,58 @@
152167
.copy-btn:hover {
153168
background: #3a2d58;
154169
}
170+
171+
/* Hamburger Menu */
172+
.hamburger {
173+
display: none;
174+
flex-direction: column;
175+
cursor: pointer;
176+
}
177+
178+
.hamburger div {
179+
background-color: #fff;
180+
height: 3px;
181+
width: 25px;
182+
margin: 3px 0;
183+
}
184+
185+
.menu {
186+
display: flex;
187+
}
188+
189+
.menu a, .menu .language-select {
190+
display: inline-block;
191+
}
192+
193+
@media (max-width: 768px) {
194+
.hamburger {
195+
display: flex;
196+
}
197+
198+
nav .menu {
199+
display: none;
200+
flex-direction: column;
201+
position: absolute;
202+
top: 70px;
203+
right: 10px;
204+
background: #986ce8;
205+
padding: 1rem;
206+
border-radius: 5px;
207+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
208+
}
209+
210+
.menu.active {
211+
display: flex;
212+
}
213+
214+
.menu a {
215+
margin: 0.5rem 0;
216+
}
217+
218+
.language-select {
219+
margin: 0.5rem 0;
220+
}
221+
}
155222
</style>
156223
</head>
157224
<body>
@@ -160,7 +227,12 @@ <h1>
160227
<img src="https://avatars.githubusercontent.com/u/3723144?s=48&v=4" alt="tinystruct logo">
161228
tinystruct
162229
</h1>
163-
<div>
230+
<div class="hamburger" onclick="toggleMenu()">
231+
<div></div>
232+
<div></div>
233+
<div></div>
234+
</div>
235+
<div class="menu">
164236
<a href="#about" class="lang" data-en="What is tinystruct?" data-fr="Qu'est-ce que tinystruct?" data-de="Was ist tinystruct?" data-zh="什么是 tinystruct?">What is tinystruct?</a>
165237
<a href="#features" class="lang" data-en="Features" data-fr="Caractéristiques" data-de="Funktionen" data-zh="特点">Features</a>
166238
<a href="#use-cases" class="lang" data-en="Use Cases" data-fr="Cas d'utilisation" data-de="Anwendungsfälle" data-zh="用例">Use Cases</a>
@@ -174,7 +246,6 @@ <h1>
174246
</select>
175247
</div>
176248
</nav>
177-
178249
<div class="container" id="about">
179250
<h2 class="lang" data-en="What is tinystruct?" data-fr="Qu'est-ce que tinystruct?" data-de="Was ist tinystruct?" data-zh="什么是 tinystruct?">What is tinystruct?</h2>
180251
<p class="lang" data-en="tinystruct is a lightweight Java framework designed to simplify application development by emphasizing simplicity and performance. Its core philosophy is encapsulated in the motto: 'Simplicity is difficult, while complexity is easy. Better thinking leads to better design.'" data-fr="tinystruct est un framework Java léger conçu pour simplifier le développement d'applications en mettant l'accent sur la simplicité et les performances. Sa philosophie centrale est résumée dans la devise : 'La simplicité est difficile, tandis que la complexité est facile. Une meilleure réflexion conduit à une meilleure conception.'" data-de="tinystruct ist ein leichtgewichtiges Java-Framework, das entwickelt wurde, um die Anwendungsentwicklung durch Betonung von Einfachheit und Leistung zu vereinfachen. Die zentrale Philosophie ist im Motto zusammengefasst: 'Einfachheit ist schwierig, während Komplexität einfach ist. Besseres Denken führt zu besserem Design.'" data-zh="tinystruct 是一个轻量级的 Java 框架,旨在通过强调简单性和性能来简化应用程序开发。其核心理念总结在座右铭中:‘简单是困难的,而复杂是容易的。更好的思考带来更好的设计。’">tinystruct is a lightweight Java framework designed to simplify application development by emphasizing simplicity and performance. Its core philosophy is encapsulated in the motto: 'Simplicity is difficult, while complexity is easy. Better thinking leads to better design.'</p>
@@ -257,6 +328,12 @@ <h2 id="installation" class="lang" data-en="Installation and Getting Started" da
257328
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js" integrity="sha512-7Z9J3l1+EYfeaPKcGXu3MS/7T+w19WtKQY/n+xzmw4hZhJ9tyYmcUS+4QqAlzhicE5LAfMQSF3iFTK9bQdTxXg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
258329
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-java.min.js"></script>
259330
<script>
331+
// Toggle Menu
332+
function toggleMenu() {
333+
const menu = document.querySelector('.menu');
334+
menu.classList.toggle('active');
335+
}
336+
260337
// Language Change Function
261338
function changeLanguage(lang) {
262339
document.querySelectorAll('.lang').forEach(element => {

0 commit comments

Comments
 (0)