Libraryless. Click here for Pure Java version (4363L/25K).
1 | // design by Kriti Shankar Senapati |
2 | // title is in HTML |
3 | sS htitledSectionWithDiv(S title, O contents, O... _) { |
4 | S backgroundColor = "#fff"; // TODO: grab from params |
5 | S labelStyle = "width: auto; float: top; position: relative; top: -.6em; left:15px; background-color: " + backgroundColor; |
6 | |
7 | S innerDivStyle = stringPar innerDivStyle(_); |
8 | S innerDivClass = stringPar innerDivClass(_); |
9 | optPar S innerDivID; |
10 | _ = paramsMinus(_, "innerDivStyle", "innerDivID", "innerDivClass"); |
11 | |
12 | ret div( |
13 | htag label(b(" " + title + " "), style := labelStyle) |
14 | + div(contents, |
15 | style := joinNemptiesWithSemicolon(innerDivStyle, "padding-left: 15px"), |
16 | class := joinNemptiesWithSpace("sectionContents", innerDivClass), |
17 | id := innerDivID), |
18 | params_stylePlus("border: 2px solid", _); |
19 | } |
Began life as a copy of #1030187
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030189 |
Snippet name: | htitledSectionWithDiv - create titled section in HTML (like jSection) [not <section> tag] |
Eternal ID of this version: | #1030189/11 |
Text MD5: | 36c210c4f745b103ab1dd3cc3ad9191e |
Transpilation MD5: | 23756971ac349da440f4af15e14585cf |
Author: | stefan |
Category: | javax / html |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-22 17:43:45 |
Source code size: | 834 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 264 / 381 |
Version history: | 10 change(s) |
Referenced in: | [show references] |