Skip to content

Commit

Permalink
#55 Move the mobile logo and hamburger icon to the default layout
Browse files Browse the repository at this point in the history
  • Loading branch information
waseemsadiq committed May 24, 2022
1 parent ed9411b commit d18feae
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 26 deletions.
24 changes: 2 additions & 22 deletions sites/dashboard/pages/index.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,13 @@
@layout:
path: /default

class: antialiased bg-gray-100
pageclass: antialiased bg-gray-100
name: Dashboard
title: Joomlatools Server Dashboard
summary: Dashboard for managing Joomlatools Server
visible: false
---
<?= partial('navigation/main',[]);?>

<!-- PAGE CONTENT -->
<main class="flex-1 h-screen overflow-y-scroll overflow-x-hidden">
<div class="md:hidden justify-between items-center bg-black text-white flex">
<h1 class="px-4">
<?= partial('logos/joomlatools',[
'display_text' => 1,
'display_time' => 0,
'icon_size' => '6',
'icon_colour' => 'white',
'direction' => 'h',
]);
?>
</h1>
<button @click="navOpen = !navOpen" class="btn p-4 focus:outline-none hover:bg-gray-800">
<svg class="w-6 h-6 fill-current" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16m-7 6h7"></path></svg>
</button>
</div>
<section class="max-w-7xl mx-auto py-4 px-5">
<div class="flex justify-between items-center border-b border-gray-300">
<h1 class="text-2xl font-semibold pt-2 pb-6">Sites running on this server</h1>
Expand Down Expand Up @@ -91,6 +73,4 @@ class: antialiased bg-gray-100
<!-- END OF TABLE -->


</section>
<!-- END OF PAGE CONTENT -->
</main>
</section>
35 changes: 32 additions & 3 deletions sites/dashboard/templates/layouts/default.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@
prefetch: .navigation
pageclass:
---
<div class="flex relative" x-data="{navOpen: false}">
<ktml:content>
</div>

<div class="flex relative" x-data="{navOpen: false}">

<?= partial('navigation/main',[]);?>


<main class="flex-1 h-screen overflow-y-scroll overflow-x-hidden">

<!-- LOGO AND HAMBURGER BUTTON - HIDDEN ON DESKTOP -->
<div class="md:hidden justify-between items-center bg-black text-white flex">
<h1 class="px-4">
<?= partial('logos/joomlatools',[
'display_text' => 1,
'display_time' => 0,
'icon_size' => '6',
'icon_colour' => 'white',
'direction' => 'h',
]);
?>
</h1>
<button @click="navOpen = !navOpen" class="btn p-4 focus:outline-none hover:bg-gray-800">
<svg class="w-6 h-6 fill-current" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16m-7 6h7"></path></svg>
</button>
</div>
<!-- END OF LOGO AND HAMBURGER BUTTON -->

<!-- PAGE CONTENT -->
<ktml:content>
<!-- END OF PAGE CONTENT -->

</main>
</div>
2 changes: 1 addition & 1 deletion sites/dashboard/templates/layouts/index.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
<ktml:script src="https://cdn.jsdelivr.net/gh/alpinejs/[email protected]/dist/alpine-ie11.min.js" defer="defer" module="nomodule" />
<![endif]-->

<body class="<?= isset(page()->class) ? page()->class : '' ?>">
<body class="<?= isset(page()->pageclass) ? page()->pageclass : '' ?>">
<ktml:content>
</body>

0 comments on commit d18feae

Please sign in to comment.