menu over
This commit is contained in:
parent
4b02dd9cc9
commit
eee76ebb5f
@ -9,11 +9,23 @@ code {
|
|||||||
/* menu */
|
/* menu */
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
nav#menu {
|
#menu-check ~ label .close-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
/* Style the button when the checkbox is checked */
|
|
||||||
#expand-toggle:checked ~ nav#menu {
|
#menu-check ~ label .open-icon {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu-check:checked ~ label .close-icon {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu-check:checked ~ label .open-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#menu-check:checked ~ #menu {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -29,7 +29,7 @@
|
|||||||
@apply bg-gray-100 p-3 mx-3 my-2 border-l-4 border-gray-400;
|
@apply bg-gray-100 p-3 mx-3 my-2 border-l-4 border-gray-400;
|
||||||
}
|
}
|
||||||
.markdown table {
|
.markdown table {
|
||||||
@apply m-auto border-t border-b border-gray-800 border-solid;
|
@apply m-auto border-t border-b border-gray-800 border-solid whitespace-normal;
|
||||||
}
|
}
|
||||||
.markdown table thead th {
|
.markdown table thead th {
|
||||||
@apply border-b border-solid border-gray-700;
|
@apply border-b border-solid border-gray-700;
|
||||||
@ -44,7 +44,7 @@
|
|||||||
@apply bg-gray-200;
|
@apply bg-gray-200;
|
||||||
}
|
}
|
||||||
.markdown pre {
|
.markdown pre {
|
||||||
@apply overflow-x-auto shadow-md p-4 border-2 border-solid border-gray-100;
|
@apply overflow-x-auto p-4 border border-solid border-gray-400 shadow-lg;
|
||||||
}
|
}
|
||||||
.markdown code {
|
.markdown code {
|
||||||
@apply bg-gray-200;
|
@apply bg-gray-200;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<article class="max-w-3xl mx-auto leading-relaxed markdown">
|
<article class="flex-shrink max-w-3xl mx-auto leading-relaxed markdown">
|
||||||
<h1 class="text-center">{{ .Title }}</h1>
|
<h1 class="text-center">{{ .Title }}</h1>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</article>
|
</article>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<header class="flex flex-col w-full md:w-1/5 md:text-right md:pr-8 bg-white text-center">
|
<header class="flex flex-col w-full md:w-1/5 md:text-right md:pr-8 bg-white text-center">
|
||||||
<h1 class="text-4xl my-12 font-medium mt-4 md:mb-12"><a href="#">Wrong.Wang</a></h1>
|
<h1 class="text-4xl my-6 md:my-12 font-medium mt-4 md:mb-12"><a href="#">Wrong.Wang</a></h1>
|
||||||
<p class="font-thin italic">前进</p>
|
<p class="font-thin italic">前进</p>
|
||||||
<input type="checkbox" class="hidden" id="expand-toggle" />
|
<!-- <input type="checkbox" class="hidden" id="expand-toggle" />
|
||||||
<div class="block absolute right-0 md:hidden">
|
<div class="block absolute right-0 md:hidden">
|
||||||
<label for="expand-toggle" id="expand-btn" class="flex items-center px-3 py-2 border rounded">
|
<label for="expand-toggle" id="expand-btn" class="flex items-center px-3 py-2 border rounded">
|
||||||
<svg class="h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
<svg class="h-3 w-3" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
|
||||||
@ -9,12 +9,18 @@
|
|||||||
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
|
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
|
||||||
</svg>
|
</svg>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div> -->
|
||||||
<nav id="menu" class="my-2 md:flex-row-reverse">
|
<input id="menu-check" type="checkbox" class="hidden"/>
|
||||||
<ul class="list-none pl-0">
|
<label id="menu-label" for="menu-check" class="unselectable md:hidden inline-block py-4 h-12 cursor-pointer mt-3 text-xl text-gray-900">
|
||||||
|
<span class="icon close-icon">✕</span>
|
||||||
|
<span class="icon open-icon">☰</span>
|
||||||
|
<span class="text">MENU</span>
|
||||||
|
</label>
|
||||||
|
<nav id="menu" class="my-2 md:flex-row-reverse hidden md:block">
|
||||||
|
<ul class="list-none pl-0 mx-auto justify-center max-w-xs">
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<li class="my-4 border-black border-b-2 md:border-none pb-1">
|
<li class="my-4 border-black border-b-2 md:border-none pb-1">
|
||||||
<a class="md:border-black md:border-b-2 md:pb-1" href="{{ .URL }}">{{ .Name }}</a>
|
<a class="py-4 md:border-black md:border-b-2 md:pb-1" href="{{ .URL }}">{{ .Name }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user