aboutsummaryrefslogtreecommitdiff
path: root/components/navigation/ResponsiveBar.vue
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-11-03 23:52:24 -0700
committerFuwn <[email protected]>2021-11-03 23:52:24 -0700
commit70f5f5ab700ecdc8d5f65fe9a52e3d37280e718e (patch)
treec4d380afbef990e5c71492da13ce1d2d8d67a191 /components/navigation/ResponsiveBar.vue
parentfeat(index): add press pack link (diff)
downloadyucky.fun-70f5f5ab700ecdc8d5f65fe9a52e3d37280e718e.tar.xz
yucky.fun-70f5f5ab700ecdc8d5f65fe9a52e3d37280e718e.zip
feat: new
Diffstat (limited to 'components/navigation/ResponsiveBar.vue')
-rw-r--r--components/navigation/ResponsiveBar.vue234
1 files changed, 234 insertions, 0 deletions
diff --git a/components/navigation/ResponsiveBar.vue b/components/navigation/ResponsiveBar.vue
new file mode 100644
index 0000000..d59547b
--- /dev/null
+++ b/components/navigation/ResponsiveBar.vue
@@ -0,0 +1,234 @@
+<template>
+ <nav>
+ <input id="nav" type="checkbox" class="hidden">
+ <label for="nav" class="nav-btn">
+ <i />
+ <i />
+ <i />
+ </label>
+ <div class="logo">
+ <a href="/">::</a>
+ </div>
+ <div class="nav-wrapper">
+ <ul>
+ <!-- <li>$ ls -a routes/</li> -->
+ <li><a href="/">..</a></li>
+ <li><a href="/members">members</a></li>
+ <li><a href="https://fuwn.link/apply2yucky">apply</a></li>
+ </ul>
+ </div>
+ </nav>
+</template>
+
+<script>
+export default {
+ name: 'ResponsiveBar'
+}
+</script>
+
+<style scoped lang="scss">
+
+* {
+ box-sizing: border-box;
+}
+
+html {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100vh;
+}
+
+body {
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100vh;
+ /* font-family: Poppins, serif; */
+ font-weight: 400;
+ background-position: center;
+ background-size: cover;
+}
+
+nav {
+ padding: 8px;
+}
+
+.logo {
+ float: left;
+ padding: 8px;
+ margin-left: 16px;
+ margin-top: 8px;
+ color: white;
+}
+
+.logo a {
+ color: white;
+ /* text-transform: uppercase; */
+ font-weight: 700;
+ font-size: 18px;
+ letter-spacing: 0; /* px */
+ text-decoration: none;
+}
+
+nav ul {
+ float: right;
+}
+
+nav ul li {
+ display: inline-block;
+ float: left;
+}
+
+nav ul li:not(:first-child) {
+ margin-left: 48px;
+}
+
+nav ul li:last-child {
+ margin-right: 24px;
+}
+
+nav ul li a {
+ display: inline-block;
+ outline: none;
+ color: white;
+ /* text-transform: uppercase; */
+ text-decoration: none;
+ font-size: 14px;
+ letter-spacing: 1.2px;
+ // font-weight: 600;
+}
+
+@media screen and (max-width: 864px) {
+ .logo {
+ padding: 0;
+ }
+
+ .nav-wrapper {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: -1;
+ background: #0f0f0f;
+ opacity: 0;
+ transition: all 0.2s ease;
+ }
+
+ .nav-wrapper ul {
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ width: 100%;
+ }
+
+ .nav-wrapper ul li {
+ display: block;
+ float: none;
+ width: 100%;
+ text-align: right;
+ margin-bottom: 10px;
+ }
+
+ .nav-wrapper ul li:nth-child(1) a {
+ transition-delay: 0.2s;
+ }
+
+ .nav-wrapper ul li:nth-child(2) a {
+ transition-delay: 0.3s;
+ }
+
+ .nav-wrapper ul li:nth-child(3) a {
+ transition-delay: 0.4s;
+ }
+
+ .nav-wrapper ul li:nth-child(4) a {
+ transition-delay: 0.5s;
+ }
+
+ .nav-wrapper ul li:not(:first-child) {
+ margin-left: 0;
+ }
+
+ .nav-wrapper ul li a {
+ padding: 10px 24px;
+ opacity: 0;
+ color: white; /* #000 */
+ font-size: 14px;
+ // font-weight: 600;
+ letter-spacing: 1.2px;
+ transform: translateX(-20px);
+ transition: all 0.2s ease;
+ }
+
+ .nav-btn {
+ position: fixed;
+ right: 10px;
+ top: 10px;
+ display: block;
+ width: 48px;
+ height: 48px;
+ cursor: pointer;
+ z-index: 9999;
+ border-radius: 50%;
+ }
+
+ .nav-btn i {
+ display: block;
+ width: 20px;
+ height: 2px;
+ background: white;
+ border-radius: 2px;
+ margin-left: 14px;
+ }
+
+ .nav-btn i:nth-child(1) {
+ margin-top: 16px;
+ }
+
+ .nav-btn i:nth-child(2) {
+ margin-top: 4px;
+ opacity: 1;
+ }
+
+ .nav-btn i:nth-child(3) {
+ margin-top: 4px;
+ }
+}
+
+#nav:checked + .nav-btn {
+ transform: rotate(45deg);
+}
+
+#nav:checked + .nav-btn i {
+ background: white;
+ transition: transform 0.2s ease;
+}
+
+#nav:checked + .nav-btn i:nth-child(1) {
+ transform: translateY(6px) rotate(180deg);
+}
+
+#nav:checked + .nav-btn i:nth-child(2) {
+ opacity: 0;
+}
+
+#nav:checked + .nav-btn i:nth-child(3) {
+ transform: translateY(-6px) rotate(90deg);
+}
+
+#nav:checked ~ .nav-wrapper {
+ z-index: 9990;
+ opacity: 1;
+}
+
+#nav:checked ~ .nav-wrapper ul li a {
+ opacity: 1;
+ transform: translateX(0);
+}
+
+.hidden {
+ display: none;
+}
+</style>