lambdaway
::
janus
5
|
list
|
login
|
load
|
|
{require lib_janus} {block_editor 500 500 50 50} {block 1 _h2 janus | [[janus2]] | [[janus3]] _p Janus allows you to edit independently of each other different parts of a page, showing in real time the two faces of each one, code and display. _p Here is shown a page splitted into four columns. _h2 initialize ... _p First be sure to be logged in. Then open the page editor and initialize a sequence of blocks like this: {pre '{block_editor 500 500} '{block id1 ...} '{block id2 ...} '{block id3 ...} '{block id4 ...} } _p {i Please let a space after the identifier !!} _p Styles can be tuned up on demand: {pre '{style body { margin:0; padding:0; } #page_frame { margin-left:0px; border:0 solid #000; box-shadow:0 0 0 #000; } #page_content { border:0 solid #000; box-shadow:0 0 0 #000; width:1720px; /* number of blocks * width of a block + epsilon */ } .block_edit { display:inline-block; vertical-align:top; width:400px; /* width of a block */ } } ;; end of your styles } _h2 ... and use _p Click into a block to open its local editor. What you write is evaluated and displayed in real time inside the block. Click the button "Close & Save" to close the local editor and to save on internet the content of the page. _p If you started working without being logged your work is lost ... unless you click the discreet button at the top left of the page where it is saved. The rest is up to you... } {block 2 _h2 the factorial {prewrap '{def fac {lambda {:n} {if {< :n 1} then 1 else {long_mult :n {fac {- :n 1}}} }}} -> {def fac {lambda {:n} {if {< :n 1} then 1 else {long_mult :n {fac {- :n 1}}}}}} '{fac 500} -> {fac 500} } } {block 3 _h2 amélie poulain _p It's up to you. _img data/amelie_poulain.jpg _p Click me to see the code of this column } {block 4 _h2 block 4 _p It's up to you. Yes } ;; here add your styles {style body { margin:0; padding:0; } #page_frame { margin-left:0px; border:0 solid #000; box-shadow:0 0 0 #000; } #page_content { border:0 solid #000; box-shadow:0 0 0 #000; width:1720px; /* number of blocks * width of a block + epsilon */ } .block_edit { display:inline-block; vertical-align:top; width:400px; /* width of a block */ } } ;; end of your styles
lambdaway v.20211111