Skip to content

Commit 8fa74fb

Browse files
kdmoncat: Help link and styling fixes. #383
1 parent 1d9a4bb commit 8fa74fb

File tree

5 files changed

+38
-28
lines changed

5 files changed

+38
-28
lines changed

halogen-kdmoncat/src/View/KDMonCat/App.purs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Effect.Class (class MonadEffect, liftEffect)
1717
import Global (encodeURIComponent)
1818
import Halogen as H
1919
import Halogen.HTML hiding (map, head, i, prop, title)
20-
import Halogen.HTML.Properties (classes, value, readOnly, href, type_, InputType(InputText), ref, title)
20+
import Halogen.HTML.Properties (classes, value, readOnly, href, type_, InputType(InputText), ref, target, title)
2121
import Halogen.HTML.Events (onValueInput, onClick, onMouseDown)
2222
import Halogen.Query.Input (RefLabel(..))
2323
import View.ReactiveInput as ReactiveInput
@@ -105,7 +105,11 @@ render _ st = div [ classes [ ClassName "kdmoncat-app" ] ]
105105
, div [ classes [ ClassName "fieldset" ]] $
106106
[ label_ [ text "Whole" ], input [ type_ InputText, value termTypeStr, readOnly true ] ]
107107
<> (selectionType # maybe [] \s -> [ label_ [ text "Selection" ], input [ type_ InputText, value s, readOnly true ] ])
108-
, h2_ [ text "Pixels"]
108+
, h2_ [ text "Pixels"
109+
, a [ href "https://hackmd.io/PUj5yVt8R4mxz8jH0TNNQQ"
110+
, target "_blank"
111+
, attr (AttrName "style") "float: right"]
112+
[ text "help" ] ]
109113
, textarea [ value st.input.pixels, onValueInput (Just <<< UpdatePixels), ref (RefLabel "pixels") ]
110114
, div_ pixelButtons
111115
, h2_ [ text "Context"]
@@ -122,7 +126,7 @@ render _ st = div [ classes [ ClassName "kdmoncat-app" ] ]
122126
]
123127
, h2_ [ text "Term view" ]
124128
, footer_ $ inferredType # either (const []) (\{ term } -> [slot _term unit Term.termView { term, selection: selectionPath } \_ -> Nothing])
125-
, a [ href "https://statebox.org" ] []
129+
, a [ href "https://statebox.org", target "_blank" ] []
126130
]
127131
where
128132
bricksInput :: Bricks.Input

studio/html/kdmoncat.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
width: 25vw;
1515
margin: -10px 0 0 20px;
1616
}
17+
.kdmoncat-app aside button {
18+
--button-height: 2rem;
19+
--button-horizontal-padding: 0.7rem;
20+
}
1721
.kdmoncat-app h2 {
1822
font-size: 1.2em;
1923
font-weight: 600;
@@ -32,6 +36,7 @@
3236
margin-bottom: 2em;
3337
background: var(--hiq-color-gray-7);
3438
}
39+
code { white-space: pre-wrap; }
3540

3641
/* generic bricks css */
3742
.kdmoncat-bricks {
@@ -71,6 +76,7 @@
7176
fill: var(--hiq-color-gray-9);
7277
font-size: .4px;
7378
font-weight: bold;
79+
font-family: sans-serif;
7480
transition: fill 0.3s;
7581
}
7682
.kdmoncat-bricks.show-wires .inner-box {

studio/package-lock.json

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

studio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"dependencies": {
3535
"@statebox/stbx-js": "0.0.31",
36-
"@statebox/style": "0.0.8",
36+
"@statebox/style": "0.0.9",
3737
"dagre": "^0.8.4",
3838
"firebase": "^7.9.1",
3939
"firebaseui": "^4.4.0"

tx-browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"dependencies": {
3434
"@statebox/stbx-js": "0.0.31",
35-
"@statebox/style": "0.0.8",
35+
"@statebox/style": "0.0.9",
3636
"dagre": "^0.8.4"
3737
}
3838
}

0 commit comments

Comments
 (0)