-
Notifications
You must be signed in to change notification settings - Fork 83
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
6 changed files
with
65 additions
and
109 deletions.
There are no files selected for viewing
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,3 +1,3 @@ | ||
@import "tailwindcss/base"; | ||
@import "tailwindcss/components"; | ||
@import "tailwindcss/utilities"; | ||
@import 'tailwindcss/base'; | ||
@import 'tailwindcss/components'; | ||
@import 'tailwindcss/utilities'; |
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,25 +1,31 @@ | ||
// Include phoenix_html to handle method=PUT/DELETE in forms and buttons. | ||
import "phoenix_html" | ||
import 'phoenix_html'; | ||
|
||
// Show progress bar on live navigation and form submits | ||
import topbar from "topbar" | ||
import topbar from 'topbar'; | ||
|
||
topbar.config({barColors: {0: "#29d"}, shadowColor: "rgba(0, 0, 0, .3)"}) | ||
window.addEventListener("phx:page-loading-start", info => topbar.delayedShow(200)) | ||
window.addEventListener("phx:page-loading-stop", info => topbar.hide()) | ||
topbar.config({barColors: {0: '#29d'}, shadowColor: 'rgba(0, 0, 0, .3)'}); | ||
window.addEventListener('phx:page-loading-start', (info) => | ||
topbar.delayedShow(200) | ||
); | ||
window.addEventListener('phx:page-loading-stop', (info) => topbar.hide()); | ||
|
||
// Establish Phoenix Socket and LiveView configuration. | ||
import {Socket} from "phoenix" | ||
import {LiveSocket} from "phoenix_live_view" | ||
import {Socket} from 'phoenix'; | ||
import {LiveSocket} from 'phoenix_live_view'; | ||
|
||
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content") | ||
let liveSocket = new LiveSocket("/live", Socket, {params: {_csrf_token: csrfToken}}) | ||
let csrfToken = document | ||
.querySelector("meta[name='csrf-token']") | ||
.getAttribute('content'); | ||
let liveSocket = new LiveSocket('/live', Socket, { | ||
params: {_csrf_token: csrfToken} | ||
}); | ||
|
||
// connect if there are any LiveViews on the page | ||
liveSocket.connect() | ||
liveSocket.connect(); | ||
|
||
// expose liveSocket on window for web console debug logs and latency simulation: | ||
// >> liveSocket.enableDebug() | ||
// >> liveSocket.enableLatencySim(1000) // enabled for duration of browser session | ||
// >> liveSocket.disableLatencySim() | ||
window.liveSocket = liveSocket | ||
window.liveSocket = liveSocket; |
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,26 +1,39 @@ | ||
// See the Tailwind configuration guide for advanced usage | ||
// https://tailwindcss.com/docs/configuration | ||
|
||
const plugin = require("tailwindcss/plugin") | ||
const plugin = require('tailwindcss/plugin'); | ||
|
||
module.exports = { | ||
content: [ | ||
"./js/**/*.js", | ||
"../lib/*_web.ex", | ||
"../lib/*_web/**/*.*ex" | ||
], | ||
content: ['./js/**/*.js', '../lib/*_web.ex', '../lib/*_web/**/*.*ex'], | ||
theme: { | ||
extend: { | ||
colors: { | ||
brand: "#FD4F00", | ||
brand: '#FD4F00' | ||
} | ||
}, | ||
} | ||
}, | ||
plugins: [ | ||
require("@tailwindcss/forms"), | ||
plugin(({addVariant}) => addVariant("phx-no-feedback", [".phx-no-feedback&", ".phx-no-feedback &"])), | ||
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 &"])) | ||
require('@tailwindcss/forms'), | ||
plugin(({addVariant}) => | ||
addVariant('phx-no-feedback', ['.phx-no-feedback&', '.phx-no-feedback &']) | ||
), | ||
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 &' | ||
]) | ||
) | ||
] | ||
} | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
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