Commit
•
02b0e67
1
Parent(s):
8131779
chore: Style header
Browse files
assets/tailwind.config.js
CHANGED
@@ -1,21 +1,24 @@
|
|
1 |
// See the Tailwind configuration guide for advanced usage
|
2 |
// https://tailwindcss.com/docs/configuration
|
3 |
|
4 |
-
const plugin = require("tailwindcss/plugin")
|
5 |
-
const fs = require("fs")
|
6 |
-
const path = require("path")
|
7 |
|
8 |
module.exports = {
|
9 |
content: [
|
10 |
"./js/**/*.js",
|
11 |
"../lib/medical_transcription_web.ex",
|
12 |
-
"../lib/medical_transcription_web/**/*.*ex"
|
13 |
],
|
14 |
theme: {
|
15 |
extend: {
|
16 |
colors: {
|
17 |
-
brand: "#
|
18 |
-
|
|
|
|
|
|
|
19 |
},
|
20 |
},
|
21 |
plugins: [
|
@@ -25,44 +28,70 @@ module.exports = {
|
|
25 |
//
|
26 |
// <div class="phx-click-loading:animate-ping">
|
27 |
//
|
28 |
-
plugin(({addVariant}) =>
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
// Embeds Heroicons (https://heroicons.com) into your app.css bundle
|
34 |
// See your `CoreComponents.icon/1` for more information.
|
35 |
//
|
36 |
-
plugin(function({matchComponents, theme}) {
|
37 |
-
let iconsDir = path.join(__dirname, "./vendor/heroicons/optimized")
|
38 |
-
let values = {}
|
39 |
let icons = [
|
40 |
["", "/24/outline"],
|
41 |
["-solid", "/24/solid"],
|
42 |
-
["-mini", "/20/solid"]
|
43 |
-
]
|
44 |
icons.forEach(([suffix, dir]) => {
|
45 |
-
fs.readdirSync(path.join(iconsDir, dir)).forEach(file => {
|
46 |
-
let name = path.basename(file, ".svg") + suffix
|
47 |
-
values[name] = {name, fullPath: path.join(iconsDir, dir, file)}
|
48 |
-
})
|
49 |
-
})
|
50 |
-
matchComponents(
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
// See the Tailwind configuration guide for advanced usage
|
2 |
// https://tailwindcss.com/docs/configuration
|
3 |
|
4 |
+
const plugin = require("tailwindcss/plugin");
|
5 |
+
const fs = require("fs");
|
6 |
+
const path = require("path");
|
7 |
|
8 |
module.exports = {
|
9 |
content: [
|
10 |
"./js/**/*.js",
|
11 |
"../lib/medical_transcription_web.ex",
|
12 |
+
"../lib/medical_transcription_web/**/*.*ex",
|
13 |
],
|
14 |
theme: {
|
15 |
extend: {
|
16 |
colors: {
|
17 |
+
brand: "#B8EB86",
|
18 |
+
"brand-active": "#93BC6B",
|
19 |
+
link: "#BCBCBC",
|
20 |
+
"link-active": "#D6D6D6",
|
21 |
+
},
|
22 |
},
|
23 |
},
|
24 |
plugins: [
|
|
|
28 |
//
|
29 |
// <div class="phx-click-loading:animate-ping">
|
30 |
//
|
31 |
+
plugin(({ addVariant }) =>
|
32 |
+
addVariant("phx-no-feedback", [
|
33 |
+
".phx-no-feedback&",
|
34 |
+
".phx-no-feedback &",
|
35 |
+
]),
|
36 |
+
),
|
37 |
+
plugin(({ addVariant }) =>
|
38 |
+
addVariant("phx-click-loading", [
|
39 |
+
".phx-click-loading&",
|
40 |
+
".phx-click-loading &",
|
41 |
+
]),
|
42 |
+
),
|
43 |
+
plugin(({ addVariant }) =>
|
44 |
+
addVariant("phx-submit-loading", [
|
45 |
+
".phx-submit-loading&",
|
46 |
+
".phx-submit-loading &",
|
47 |
+
]),
|
48 |
+
),
|
49 |
+
plugin(({ addVariant }) =>
|
50 |
+
addVariant("phx-change-loading", [
|
51 |
+
".phx-change-loading&",
|
52 |
+
".phx-change-loading &",
|
53 |
+
]),
|
54 |
+
),
|
55 |
|
56 |
// Embeds Heroicons (https://heroicons.com) into your app.css bundle
|
57 |
// See your `CoreComponents.icon/1` for more information.
|
58 |
//
|
59 |
+
plugin(function ({ matchComponents, theme }) {
|
60 |
+
let iconsDir = path.join(__dirname, "./vendor/heroicons/optimized");
|
61 |
+
let values = {};
|
62 |
let icons = [
|
63 |
["", "/24/outline"],
|
64 |
["-solid", "/24/solid"],
|
65 |
+
["-mini", "/20/solid"],
|
66 |
+
];
|
67 |
icons.forEach(([suffix, dir]) => {
|
68 |
+
fs.readdirSync(path.join(iconsDir, dir)).forEach((file) => {
|
69 |
+
let name = path.basename(file, ".svg") + suffix;
|
70 |
+
values[name] = { name, fullPath: path.join(iconsDir, dir, file) };
|
71 |
+
});
|
72 |
+
});
|
73 |
+
matchComponents(
|
74 |
+
{
|
75 |
+
hero: ({ name, fullPath }) => {
|
76 |
+
let content = fs
|
77 |
+
.readFileSync(fullPath)
|
78 |
+
.toString()
|
79 |
+
.replace(/\r?\n|\r/g, "");
|
80 |
+
return {
|
81 |
+
[`--hero-${name}`]: `url('data:image/svg+xml;utf8,${content}')`,
|
82 |
+
"-webkit-mask": `var(--hero-${name})`,
|
83 |
+
mask: `var(--hero-${name})`,
|
84 |
+
"mask-repeat": "no-repeat",
|
85 |
+
"background-color": "currentColor",
|
86 |
+
"vertical-align": "middle",
|
87 |
+
display: "inline-block",
|
88 |
+
width: theme("spacing.5"),
|
89 |
+
height: theme("spacing.5"),
|
90 |
+
};
|
91 |
+
},
|
92 |
+
},
|
93 |
+
{ values },
|
94 |
+
);
|
95 |
+
}),
|
96 |
+
],
|
97 |
+
};
|
lib/medical_transcription_web/components/layouts/app.html.heex
CHANGED
@@ -1,25 +1,22 @@
|
|
1 |
-
<header class="px-4 sm:px-6 lg:px-8">
|
2 |
-
<div class="flex items-center justify-between
|
3 |
<div class="flex items-center gap-4">
|
4 |
<a href="/">
|
5 |
<img src={~p"/images/logo.svg"} width="36" />
|
6 |
</a>
|
7 |
-
<p class="bg-brand/5 text-
|
8 |
-
|
9 |
</p>
|
10 |
</div>
|
11 |
-
<div class="flex items-center gap-4 font-semibold leading-6 text-
|
12 |
-
<a href="https://twitter.com/
|
13 |
-
@
|
14 |
-
</a>
|
15 |
-
<a href="https://github.com/phoenixframework/phoenix" class="hover:text-zinc-700">
|
16 |
-
GitHub
|
17 |
</a>
|
18 |
<a
|
19 |
-
href="https://
|
20 |
-
class="rounded-lg
|
21 |
>
|
22 |
-
|
23 |
</a>
|
24 |
</div>
|
25 |
</div>
|
|
|
1 |
+
<header class="px-4 sm:px-6 lg:px-8 bg-black border-b border-slate-500">
|
2 |
+
<div class="flex items-center justify-between py-3 text-sm">
|
3 |
<div class="flex items-center gap-4">
|
4 |
<a href="/">
|
5 |
<img src={~p"/images/logo.svg"} width="36" />
|
6 |
</a>
|
7 |
+
<p class="bg-brand/5 text-white rounded-full px-2 font-medium leading-6">
|
8 |
+
Medical Code Transcriber
|
9 |
</p>
|
10 |
</div>
|
11 |
+
<div class="flex items-center gap-4 font-semibold leading-6 text-link">
|
12 |
+
<a href="https://twitter.com/headwayio" class="hover:text-link-active">
|
13 |
+
@headwayio
|
|
|
|
|
|
|
14 |
</a>
|
15 |
<a
|
16 |
+
href="https://github.com/headwayio/medical_transcription"
|
17 |
+
class="rounded-lg font-light text-zinc-900 bg-brand px-2 py-1 hover:bg-brand-active"
|
18 |
>
|
19 |
+
GitHub <span aria-hidden="true">→</span>
|
20 |
</a>
|
21 |
</div>
|
22 |
</div>
|