diff --git a/assets/tailwind.config.js b/assets/tailwind.config.js
index 157c5fd..af642e0 100644
--- a/assets/tailwind.config.js
+++ b/assets/tailwind.config.js
@@ -14,7 +14,20 @@ module.exports = {
theme: {
extend: {
colors: {
- brand: "#FD4F00",
+ background: {
+ 200: "#717880",
+ 300: "#383D43",
+ 400: "#272B2E",
+ 500: "#1A1E21",
+ 600: "#0E1213",
+ },
+ primary: {
+ 200: "#9e11f7",
+ 300: "#970af0",
+ 400: "#8a0bd9",
+ 500: "#6707a3",
+ 600: "#4a0575",
+ },
}
},
},
@@ -25,14 +38,14 @@ module.exports = {
//
//
//
- plugin(({addVariant}) => addVariant("phx-click-loading", [".phx-click-loading&", ".phx-click-loading &"])),
- plugin(({addVariant}) => addVariant("phx-submit-loading", [".phx-submit-loading&", ".phx-submit-loading &"])),
- plugin(({addVariant}) => addVariant("phx-change-loading", [".phx-change-loading&", ".phx-change-loading &"])),
+ plugin(({ addVariant }) => addVariant("phx-click-loading", [".phx-click-loading&", ".phx-click-loading &"])),
+ plugin(({ addVariant }) => addVariant("phx-submit-loading", [".phx-submit-loading&", ".phx-submit-loading &"])),
+ plugin(({ addVariant }) => addVariant("phx-change-loading", [".phx-change-loading&", ".phx-change-loading &"])),
// Embeds Heroicons (https://heroicons.com) into your app.css bundle
// See your `CoreComponents.icon/1` for more information.
//
- plugin(function({matchComponents, theme}) {
+ plugin(function({ matchComponents, theme }) {
let iconsDir = path.join(__dirname, "../deps/heroicons/optimized")
let values = {}
let icons = [
@@ -44,11 +57,11 @@ module.exports = {
icons.forEach(([suffix, dir]) => {
fs.readdirSync(path.join(iconsDir, dir)).forEach(file => {
let name = path.basename(file, ".svg") + suffix
- values[name] = {name, fullPath: path.join(iconsDir, dir, file)}
+ values[name] = { name, fullPath: path.join(iconsDir, dir, file) }
})
})
matchComponents({
- "hero": ({name, fullPath}) => {
+ "hero": ({ name, fullPath }) => {
let content = fs.readFileSync(fullPath).toString().replace(/\r?\n|\r/g, "")
let size = theme("spacing.6")
if (name.endsWith("-mini")) {
@@ -68,7 +81,7 @@ module.exports = {
"height": size
}
}
- }, {values})
+ }, { values })
})
]
}
diff --git a/lib/potion_web/components/layouts/dashboard.html.heex b/lib/potion_web/components/layouts/dashboard.html.heex
new file mode 100644
index 0000000..12d8206
--- /dev/null
+++ b/lib/potion_web/components/layouts/dashboard.html.heex
@@ -0,0 +1,92 @@
+
+ <.flash_group flash={@flash} />
+
+
+
+ {@inner_content}
+
+
+
+
+
+
+
diff --git a/lib/potion_web/components/layouts/root.html.heex b/lib/potion_web/components/layouts/root.html.heex
index 380d9ee..fbc7046 100644
--- a/lib/potion_web/components/layouts/root.html.heex
+++ b/lib/potion_web/components/layouts/root.html.heex
@@ -11,7 +11,7 @@
-
+
{@inner_content}
diff --git a/lib/potion_web/controllers/page_controller.ex b/lib/potion_web/controllers/page_controller.ex
index 974324c..04f339c 100644
--- a/lib/potion_web/controllers/page_controller.ex
+++ b/lib/potion_web/controllers/page_controller.ex
@@ -2,8 +2,37 @@ defmodule PotionWeb.PageController do
use PotionWeb, :controller
def home(conn, _params) do
- # The home page is often custom made,
- # so skip the default app layout.
- render(conn, :home, layout: false)
+ conn
+ |> assign(:current_page, :home)
+ |> put_layout(html: :dashboard)
+ |> render(:home)
+ end
+
+ def favorites(conn, _params) do
+ conn
+ |> assign(:current_page, :favorites)
+ |> put_layout(html: :dashboard)
+ |> render(:favorites)
+ end
+
+ def create(conn, _params) do
+ conn
+ |> assign(:current_page, :create)
+ |> put_layout(html: :dashboard)
+ |> render(:create)
+ end
+
+ def list(conn, _params) do
+ conn
+ |> assign(:current_page, :list)
+ |> put_layout(html: :dashboard)
+ |> render(:list)
+ end
+
+ def profile(conn, _params) do
+ conn
+ |> assign(:current_page, :profile)
+ |> put_layout(html: :dashboard)
+ |> render(:profile)
end
end
diff --git a/lib/potion_web/controllers/page_html/create.html.heex b/lib/potion_web/controllers/page_html/create.html.heex
new file mode 100644
index 0000000..0a06b30
--- /dev/null
+++ b/lib/potion_web/controllers/page_html/create.html.heex
@@ -0,0 +1,5 @@
+
+
+ Page: {@current_page}
+
+
diff --git a/lib/potion_web/controllers/page_html/favorites.html.heex b/lib/potion_web/controllers/page_html/favorites.html.heex
new file mode 100644
index 0000000..0a06b30
--- /dev/null
+++ b/lib/potion_web/controllers/page_html/favorites.html.heex
@@ -0,0 +1,5 @@
+
+
+ Page: {@current_page}
+
+
diff --git a/lib/potion_web/controllers/page_html/home.html.heex b/lib/potion_web/controllers/page_html/home.html.heex
index d72b03c..0a06b30 100644
--- a/lib/potion_web/controllers/page_html/home.html.heex
+++ b/lib/potion_web/controllers/page_html/home.html.heex
@@ -1,222 +1,5 @@
-<.flash_group flash={@flash} />
-
-
-
-
-
-
-
- Phoenix Framework
-
- v{Application.spec(:phoenix, :vsn)}
-
-
-
- Peace of mind from prototype to production.
-
-
- Build rich, interactive web applications quickly, with less code and fewer moving parts. Join our growing community of developers using Phoenix to craft APIs, HTML5 apps and more, for fun or at scale.
-
-
-
+
+
+ Page: {@current_page}
+
diff --git a/lib/potion_web/controllers/page_html/list.html.heex b/lib/potion_web/controllers/page_html/list.html.heex
new file mode 100644
index 0000000..0a06b30
--- /dev/null
+++ b/lib/potion_web/controllers/page_html/list.html.heex
@@ -0,0 +1,5 @@
+
+
+ Page: {@current_page}
+
+
diff --git a/lib/potion_web/controllers/page_html/profile.html.heex b/lib/potion_web/controllers/page_html/profile.html.heex
new file mode 100644
index 0000000..0a06b30
--- /dev/null
+++ b/lib/potion_web/controllers/page_html/profile.html.heex
@@ -0,0 +1,5 @@
+
+
+ Page: {@current_page}
+
+
diff --git a/lib/potion_web/router.ex b/lib/potion_web/router.ex
index c6f05b9..1e586bf 100644
--- a/lib/potion_web/router.ex
+++ b/lib/potion_web/router.ex
@@ -17,7 +17,11 @@ defmodule PotionWeb.Router do
scope "/", PotionWeb do
pipe_through :browser
- get "/", PageController, :home
+ get "/home", PageController, :home
+ get "/favorites", PageController, :favorites
+ get "/create", PageController, :create
+ get "/list", PageController, :list
+ get "/profile", PageController, :profile
end
# Other scopes may use custom stacks.