mirror of https://github.com/docker/docs.git
feat: add dockerfile tooltips
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
30feb94b3f
commit
ec22fd57f5
|
@ -0,0 +1,12 @@
|
||||||
|
const cmds = document.querySelectorAll(".language-dockerfile span.k");
|
||||||
|
|
||||||
|
for (const cmd of cmds) {
|
||||||
|
const name = cmd.textContent;
|
||||||
|
const a = document.createElement("a")
|
||||||
|
a.classList.add("underline","underline-offset-4","decoration-dashed","cursor-pointer")
|
||||||
|
a.title = `Learn more about the ${name} instruction`
|
||||||
|
a.href = `/engine/reference/builder/#${name.toLowerCase()}`
|
||||||
|
a.innerHTML = cmd.outerHTML
|
||||||
|
cmd.insertAdjacentElement("beforebegin", a)
|
||||||
|
cmd.remove()
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
/** @type {import('tailwindcss').Config} */
|
/** @type {import('tailwindcss').Config} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
content: ["./hugo_stats.json","./layouts/**/*.{html,js}", "./content/**/*.md"],
|
content: ["./hugo_stats.json","./layouts/**/*.{html,js}", "./content/**/*.md", "assets/js/**/*.js"],
|
||||||
darkMode: "class",
|
darkMode: "class",
|
||||||
theme: {
|
theme: {
|
||||||
extend: {
|
extend: {
|
||||||
|
|
Loading…
Reference in New Issue