瀏覽代碼

Fix style

Now sandwich buttons are available from the keyboard. Opening-closing the menu by pressing the spacebar (at least on a computer O_o).
Visman 2 年之前
父節點
當前提交
318a1d2f69
共有 3 個文件被更改,包括 13 次插入2 次删除
  1. 1 1
      app/templates/layouts/admin.forkbb.php
  2. 1 1
      app/templates/layouts/main.forkbb.php
  3. 11 0
      public/style/ForkBB/style.css

+ 1 - 1
app/templates/layouts/admin.forkbb.php

@@ -7,7 +7,7 @@
       <div id="fork-a-menu">
       <div id="fork-a-menu">
 @if ($p->aNavigation)
 @if ($p->aNavigation)
         <nav id="fork-a-nav" class="f-menu">
         <nav id="fork-a-nav" class="f-menu">
-          <input hidden id="id-an-checkbox" class="f-menu-checkbox" type="checkbox">
+          <input id="id-an-checkbox" class="f-menu-checkbox" type="checkbox">
           <label id="id-an-label" class="f-menu-toggle" for="id-an-checkbox"></label>
           <label id="id-an-label" class="f-menu-toggle" for="id-an-checkbox"></label>
           <ul class="f-menu-items">
           <ul class="f-menu-items">
     @foreach ($p->aNavigation as $key => $val)
     @foreach ($p->aNavigation as $key => $val)

+ 1 - 1
app/templates/layouts/main.forkbb.php

@@ -23,7 +23,7 @@
  @if ($p->fNavigation)
  @if ($p->fNavigation)
     <nav id="fork-nav" class="f-menu @if ($p->fNavigation['search']) f-main-nav-search @endif">
     <nav id="fork-nav" class="f-menu @if ($p->fNavigation['search']) f-main-nav-search @endif">
       <div id="fork-navdir">
       <div id="fork-navdir">
-        <input hidden id="id-mn-checkbox" class="f-menu-checkbox" type="checkbox">
+        <input id="id-mn-checkbox" class="f-menu-checkbox" type="checkbox">
         <label id="id-mn-label" class="f-menu-toggle" for="id-mn-checkbox"></label>
         <label id="id-mn-label" class="f-menu-toggle" for="id-mn-checkbox"></label>
         <ul class="f-menu-items">
         <ul class="f-menu-items">
     @foreach ($p->fNavigation as $key => $val)
     @foreach ($p->fNavigation as $key => $val)

+ 11 - 0
public/style/ForkBB/style.css

@@ -351,6 +351,11 @@ body,
   color: #583200;
   color: #583200;
 }
 }
 
 
+#fork .f-menu-checkbox {
+  position: fixed;
+  transform: scale(0);
+}
+
 #fork .f-menu-checkbox:checked + .f-menu-toggle::after {
 #fork .f-menu-checkbox:checked + .f-menu-toggle::after {
   content: "\f00d";
   content: "\f00d";
 }
 }
@@ -393,6 +398,12 @@ body,
   text-overflow: ellipsis;
   text-overflow: ellipsis;
 }
 }
 
 
+@media screen and (min-width: 50rem) {
+  #fork .f-menu-checkbox {
+    display: none;
+  }
+}
+
 /****************/
 /****************/
 /* Главное меню */
 /* Главное меню */
 /****************/
 /****************/