Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
94 additions
and
50 deletions.
There are no files selected for viewing
93 changes: 59 additions & 34 deletions
93
apps/phx_wc_storybook_web/lib/phx_wc_storybook_web/components/layouts/app.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,61 @@ | ||
<main class="px-4 sm:px-6 lg:px-8"> | ||
<div class="mx-auto max-w-screen-2xl"> | ||
<.flash kind={:info} title="Success!" flash={@flash} /> | ||
<.flash kind={:error} title="Error!" flash={@flash} /> | ||
<.flash | ||
id="disconnected" | ||
kind={:error} | ||
title="We can't find the internet" | ||
close={false} | ||
autoshow={false} | ||
phx-disconnected={show("#disconnected")} | ||
phx-connected={hide("#disconnected")} | ||
> | ||
Attempting to reconnect <.wc_bsi name="arrow-repeat" class="ml-1 w-3 h-3 inline animate-spin" /> | ||
</.flash> | ||
<.wc_left_menu | ||
class="w-48 h-[calc(100vh-56px)]" | ||
active={"phx-wc-hook"} | ||
menus={[ | ||
{"Hooks", [ | ||
{"phx-wc-hook", "PhxWCHook", "/"} | ||
]}, | ||
{"Components", | ||
[ | ||
{"actionbar", "Actionbar", "/storybook/components/actionbar"}, | ||
{"card", "Card", "/storybook/components/card"}, | ||
{"left_menu", "Left Menu", "/storybook/components/left_menu"}, | ||
{"markdown", "Markdown", "/storybook/components/markdown"}, | ||
{"pagination", "Pagination", "/storybook/components/pagination"}, | ||
{"table", "Table", "/storybook/components/table"} | ||
]} | ||
]} | ||
/> | ||
<%= @inner_content %> | ||
<main class="container h-[calc(100vh-56px)] flex flex-row justify-start items-start overflow-hidden"> | ||
<.flash kind={:info} title="Success!" flash={@flash} /> | ||
<.flash kind={:error} title="Error!" flash={@flash} /> | ||
<.flash | ||
id="disconnected" | ||
kind={:error} | ||
title="We can't find the internet" | ||
close={false} | ||
autoshow={false} | ||
phx-disconnected={show("#disconnected")} | ||
phx-connected={hide("#disconnected")} | ||
> | ||
Attempting to reconnect <.wc_bsi name="arrow-repeat" class="ml-1 w-3 h-3 inline animate-spin" /> | ||
</.flash> | ||
<.wc_left_menu | ||
class="w-48 h-[calc(100vh-56px)] bg-slate-100" | ||
active={assigns[:active_menu]} | ||
> | ||
<:title class="text-slate-400 font-bold"> | ||
WebComponent | ||
</:title> | ||
<:menu> | ||
<.wc_left_menu_group active={assigns[:active_menu]}> | ||
<:title>Hooks</:title> | ||
<:menu id="phx-wc-hook" to={"/"}> | ||
<.wc_mdi name={"webhook"} class="w-4 h-4" /> | ||
PhxWCHook | ||
</:menu> | ||
</.wc_left_menu_group> | ||
</:menu> | ||
<:menu> | ||
<.wc_left_menu_group active={assigns[:active_menu]}> | ||
<:title>Icons</:title> | ||
<:menu id="mdi" to={"/mdi"}> | ||
<.wc_mdi name={"material-design"} class="w-4 h-4" /> | ||
MD Icon | ||
</:menu> | ||
<:menu id="bsi" to={"/bsi"}> | ||
<.wc_bsi name={"bootstrap"} class="w-4 h-4" /> | ||
BS Icon | ||
</:menu> | ||
</.wc_left_menu_group> | ||
</:menu> | ||
<:menu> | ||
<.wc_left_menu_group active={assigns[:active_menu]}> | ||
<:title>Components</:title> | ||
<:menu id="actionbar" to="/storybook/components/actionbar"><.wc_bsi name={"tools"} class="w-4 h-4" />Actionbar</:menu> | ||
<:menu id="breadcrumb" to="/storybook/components/breadcrumb"><.wc_bsi name={"segmented-nav"} class="w-4 h-4" />Breadcrumb</:menu> | ||
<:menu id="card" to="/storybook/components/card"><.wc_bsi name={"card-text"} class="w-4 h-4" />Card</:menu> | ||
<:menu id="left_menu" to="/storybook/components/left_menu"><.wc_bsi name={"layout-sidebar"} class="w-4 h-4" />Left Menu</:menu> | ||
<:menu id="markdown" to="/storybook/components/markdown"><.wc_bsi name={"markdown"} class="w-4 h-4" />Markdown</:menu> | ||
<:menu id="modal" to="/storybook/components/modal"><.wc_bsi name={"chat-square"} class="w-4 h-4" />Modal</:menu> | ||
<:menu id="pagination" to="/storybook/components/pagination"><.wc_mdi name={"book-open-page-variant-outline"} class="w-4 h-4" />Pagination</:menu> | ||
<:menu id="table" to="/storybook/components/table"><.wc_mdi name={"table"} class="w-4 h-4" />Table</:menu> | ||
</.wc_left_menu_group> | ||
</:menu> | ||
</.wc_left_menu> | ||
<div class="flex flex-col flex-auto"> | ||
<%= @inner_content %> | ||
</div> | ||
</main> |
35 changes: 27 additions & 8 deletions
35
apps/phx_wc_storybook_web/lib/phx_wc_storybook_web/components/layouts/root.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,51 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta charset="utf-8"/> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"/> | ||
<meta name="csrf-token" content={get_csrf_token()} /> | ||
<.live_title suffix=" · PhxWCStorybook"> | ||
<%= assigns[:page_title] || "PhxWCStorybook" %> | ||
</.live_title> | ||
<link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} /> | ||
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}> | ||
</script> | ||
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}></script> | ||
</head> | ||
<body class="bg-white antialiased flex flex-col items-center"> | ||
<body class="flex flex-col items-center"> | ||
<div class="rainbow"></div> | ||
<%= if assigns[:mode] == "app" do %> | ||
<.wc_simple_appbar | ||
title={"Phoenix WebComponent"} | ||
menus={[ | ||
%{ label: "Component Storybook", to: ~p"/storybook" } | ||
]} | ||
> | ||
<:logo> | ||
<logo-gsmlg-dev /> | ||
</:logo> | ||
<:user_profile> | ||
<.wc_link href={"https://github.com/gsmlg-dev/phoenix_webcomponent"}> | ||
<.wc_mdi name="github" class="w-12 h-12" color="white" /> | ||
</.wc_link> | ||
</:user_profile> | ||
</.wc_simple_appbar> | ||
<% else %> | ||
<.wc_appbar | ||
title={"Phoenix WebComponent"} | ||
menus={[ | ||
%{ label: "Component Storybook", to: ~p"/" } | ||
%{ label: "Component Storybook", to: ~p"/storybook" } | ||
]} | ||
> | ||
<:logo> | ||
<logo-gsmlg-dev /> | ||
</:logo> | ||
<:user_profile> | ||
(^_^) | ||
<.wc_link href={"https://github.com/gsmlg-dev/phoenix_webcomponent"}> | ||
<.wc_mdi name="github" class="w-12 h-12" color="white" /> | ||
</.wc_link> | ||
</:user_profile> | ||
</.wc_appbar> | ||
|
||
<% end %> | ||
<%= @inner_content %> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters