diff options
Diffstat (limited to 'root')
3 files changed, 25 insertions, 18 deletions
diff --git a/root/blog/aspect_ratios/interactive/_base: text$moonscript -> table.moon b/root/blog/aspect_ratios/interactive/_base: text$moonscript -> table.moon index 419eef0..0219af6 100644 --- a/root/blog/aspect_ratios/interactive/_base: text$moonscript -> table.moon +++ b/root/blog/aspect_ratios/interactive/_base: text$moonscript -> table.moon @@ -1,22 +1,27 @@ -import div from require 'mmm.dom' +import div, a from require 'mmm.dom' +import interactive_link from (require 'mmm.mmmfs.util') require 'mmm.dom' if MODE ~= 'CLIENT' class Dummy render: => - div 'Interactive Example not available with Server-Side rendering', style: - position: 'relative' - resize: 'horizontal' - overflow: 'hidden' - - width: '480px' - height: '270px' - 'min-width': '270px' - 'max-width': '100%' - - margin: 'auto' - padding: '10px' - boxSizing: 'border-box' - background: 'var(--gray-bright)' + div { + style: + position: 'relative' + resize: 'horizontal' + overflow: 'hidden' + + width: '480px' + height: '270px' + 'min-width': '270px' + 'max-width': '100%' + + margin: 'auto' + padding: '10px' + boxSizing: 'border-box' + background: 'var(--gray-bright)' + + interactive_link '(click here for the interactive version of this article)' + } return { UIDemo: Dummy diff --git a/root/research/realities/_web_view: type b/root/research/realities/_web_view: type deleted file mode 100644 index bde5644..0000000 --- a/root/research/realities/_web_view: type +++ /dev/null @@ -1 +0,0 @@ -text/html+interactive diff --git a/root/research/realities/text$moonscript -> mmm$component.moon b/root/research/realities/text$moonscript -> mmm$component.moon index a7dc365..f6947db 100644 --- a/root/research/realities/text$moonscript -> mmm$component.moon +++ b/root/research/realities/text$moonscript -> mmm$component.moon @@ -1,5 +1,6 @@ import elements from require 'mmm.component' import h1, h2, p, a, i, div, ol, li, br, hr, span, button, section, article from elements +import interactive_link from (require 'mmm.mmmfs.util') elements _content = div! append = _content\append @@ -11,7 +12,9 @@ if MODE == 'SERVER' display: 'inline-block', width: '150px', height: '80px', - 'line-height': '80px', + padding: '12px' + 'line-height': '20px', + 'box-sizing': 'border-box' color: '#fff', background: '#666', } @@ -23,7 +26,7 @@ if MODE == 'SERVER' render: => rplc = with div id: @id, :style - \append '(diagram goes here)' + \append interactive_link 'click for interactive version' -- \append "<script type=\"text/lua\"> -- local rplc = js.global.document:getElementById('#{@id}'); -- local fn = #{compile @func} |
