diff --git a/ayu-highlight.css b/ayu-highlight.css
index 0c45c6f..32c9432 100644
--- a/ayu-highlight.css
+++ b/ayu-highlight.css
@@ -8,7 +8,6 @@ Original by Dempfi (https://github.com/dempfi/ayu)
overflow-x: auto;
background: #191f26;
color: #e6e1cf;
- padding: 0.5em;
}
.hljs-comment,
diff --git a/css/chrome.css b/css/chrome.css
index 21c08b9..10fa4b3 100644
--- a/css/chrome.css
+++ b/css/chrome.css
@@ -208,24 +208,63 @@ pre {
pre > .buttons {
position: absolute;
z-index: 100;
- right: 5px;
- top: 5px;
+ right: 0px;
+ top: 2px;
+ margin: 0px;
+ padding: 2px 0px;
color: var(--sidebar-fg);
cursor: pointer;
+ visibility: hidden;
+ opacity: 0;
+ transition: visibility 0.1s linear, opacity 0.1s linear;
+}
+pre:hover > .buttons {
+ visibility: visible;
+ opacity: 1
}
pre > .buttons :hover {
color: var(--sidebar-active);
+ border-color: var(--icons-hover);
+ background-color: var(--theme-hover);
}
pre > .buttons i {
margin-left: 8px;
}
pre > .buttons button {
- color: inherit;
- background: transparent;
- border: none;
cursor: inherit;
+ margin: 0px 5px;
+ padding: 3px 5px;
+ font-size: 14px;
+
+ border-style: solid;
+ border-width: 1px;
+ border-radius: 4px;
+ border-color: var(--icons);
+ background-color: var(--theme-popup-bg);
+ transition: 100ms;
+ transition-property: color,border-color,background-color;
+ color: var(--icons);
}
+@media (pointer: coarse) {
+ pre > .buttons button {
+ /* On mobile, make it easier to tap buttons. */
+ padding: 0.3rem 1rem;
+ }
+}
+pre > code {
+ padding: 1rem;
+}
+
+/* FIXME: ACE editors overlap their buttons because ACE does absolute
+ positioning within the code block which breaks padding. The only solution I
+ can think of is to move the padding to the outer pre tag (or insert a div
+ wrapper), but that would require fixing a whole bunch of CSS rules.
+*/
+.hljs.ace_editor {
+ padding: 0rem 0rem;
+}
+
pre > .result {
margin-top: 10px;
}
diff --git a/css/general.css b/css/general.css
index ef2ba50..0e4f07a 100644
--- a/css/general.css
+++ b/css/general.css
@@ -26,6 +26,16 @@ code {
font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */
}
+/* make long words/inline code not x overflow */
+main {
+ overflow-wrap: break-word;
+}
+
+/* make wide tables scroll if they overflow */
+.table-wrapper {
+ overflow-x: auto;
+}
+
/* Don't change font size in headers. */
h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
font-size: unset;
@@ -80,8 +90,7 @@ h6:target::before {
.content {
overflow-y: auto;
- padding: 0 15px;
- padding-bottom: 50px;
+ padding: 0 5px 50px 5px;
}
.content main {
margin-left: auto;
diff --git a/highlight.css b/highlight.css
index c234322..ba57b82 100644
--- a/highlight.css
+++ b/highlight.css
@@ -61,7 +61,6 @@
overflow-x: auto;
background: #f6f7f6;
color: #000;
- padding: 0.5em;
}
.hljs-emphasis {
diff --git a/highlight.js b/highlight.js
index ed78c9b..b9e2110 100644
--- a/highlight.js
+++ b/highlight.js
@@ -1,3 +1,4 @@
+// hljs compiled with: node tools/build.js -t browser dockerfile modusfile
/*!
Highlight.js v11.5.0 (git: 3ea6652536)
(c) 2006-2022 Ivan Sagalaev and other contributors
@@ -323,7 +324,7 @@ contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MO
beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",
starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:""}),grmr_modusfile:e=>{
const t={
-built_in:["from","run","merge","copy","string_concat","string_eq","in_workdir","set_workdir","set_entrypoint","set_cmd","in_env","set_env","append_path","number_eq","number_gt","number_lt","number_geq","number_leq"]
+built_in:["from","run","merge","copy","string_concat","string_eq","in_workdir","set_workdir","set_entrypoint","set_cmd","in_env","set_env","set_label","append_path","number_eq","number_gt","number_lt","number_geq","number_leq"]
},n={match:/[a-zA-Z0-9][a-zA-Z0-9_]*/,scope:"variable",relevance:0},s=[{
scope:"string",begin:/f"/,end:/"/,relevance:0,contains:[e.BACKSLASH_ESCAPE,{
scope:"meta",begin:/\$\{/,end:/\}/,contains:[n]}]},n,e.QUOTE_STRING_MODE],i={
@@ -336,4 +337,4 @@ scope:"variable",relevance:0},{match:/(?<==)\s*[a-zA-Z0-9][a-zA-Z0-9_]*/,
scope:"variable",relevance:0},r,...s],illegal:""}}});const se=te
;for(const e of Object.keys(ne)){const t=e.replace("grmr_","").replace("_","-")
;se.registerLanguage(t,ne[e])}return se}()
-;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);
\ No newline at end of file
+;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);
diff --git a/index.html b/index.html
index d68c941..ed8b0b7 100644
--- a/index.html
+++ b/index.html
@@ -83,7 +83,7 @@
diff --git a/library/operators/image.html b/library/operators/image.html
index 9279aca..dd8e229 100644
--- a/library/operators/image.html
+++ b/library/operators/image.html
@@ -159,7 +159,7 @@
::append_path(+path)
: append string to the PATH environment variable.
-::set_env(+key, +value)
, ::set_entrypoint(+str_or_array)
, ::set_cmd(+array)
, ::set_workdir(+dir)
, ::set_user(+username)
: Set image properties.
+::set_env(+key, +value)
, ::set_entrypoint(+str_or_array)
, ::set_cmd(+array)
, ::set_workdir(+dir)
, ::set_user(+username)
, ::set_label(+key, +value)
: Set image properties.
::set_workdir
also allows specifying a relative path based on the input image's working directory. This will be resolved to an absolute path.
::set_entrypoint
will clear any command the image has, to be consistent with the ENTRYPOINT
command in Dockerfile.
Example:
@@ -169,7 +169,8 @@
copy("./app", "/"),
copy("./entrypoint.sh", "/")
)::set_entrypoint("/entrypoint.sh")
- ::set_cmd(["start"]).
+ ::set_cmd(["start"])
+ ::set_label("org.opencontainers.image.vendor", "Modus").
diff --git a/library/operators/index.html b/library/operators/index.html
index f8e4b66..d2e5f66 100644
--- a/library/operators/index.html
+++ b/library/operators/index.html
@@ -149,7 +149,7 @@
Operators begin with ::
; they can be applied to expressions to control the build process.
-Operator | From | To | Description |
+Operator | From | To | Description |
::copy | Image | Layer | Copy file/directory to current image |
::set_env | Image | Image | Set environment variable |
::set_entrypoint | Image | Image | Set entrypoint |
@@ -161,7 +161,7 @@
::in_env | Layer | Layer | Specify environment variables for layer commands |
::merge | Layer | Layer | Merge layers |
-
+
diff --git a/library/predicates/index.html b/library/predicates/index.html
index 4c11786..8a2bd28 100644
--- a/library/predicates/index.html
+++ b/library/predicates/index.html
@@ -159,7 +159,7 @@
-
means: This variable is an output to the predicate. It is usually non-instantiated, but may be if you want to check for a specific "return value".
For example, run
has the signature run(+cmdline)
, which means that the argument has to be initialised.
-Predicate | Kind | Description |
+Predicate | Kind | Description |
from | Image | Refer to existing local/registry image by its name |
run | Layer | Execute shell command |
copy | Layer | Copy local file/directory |
@@ -176,7 +176,7 @@
semver_geq | Logic | >= for SemVer versions |
semver_leq | Logic | <= for SemVer versions |
-
+