From 0b8f6866c821c8b10eacc69eabc6937d308aad4e Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 21 Jun 2019 20:26:41 +0000 Subject: [PATCH] Class tweaks for convenience --- architype.css | 5 ++++- architype.js | 16 +++++++++++++++- index.html | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/architype.css b/architype.css index d111cca..176b4bb 100644 --- a/architype.css +++ b/architype.css @@ -14,9 +14,12 @@ body { left: 0; right: 0; bottom: 0; - margin: 0; +} +.architype { + width: 100%; + height: 100%; font-family: 'Courier', monospace; } diff --git a/architype.js b/architype.js index 00dadd8..9468aa9 100644 --- a/architype.js +++ b/architype.js @@ -1,5 +1,19 @@ 'use strict'; +class Architype { + constructor(container) { + this.container_ = container; + + this.container_.classList.add('architype'); + // TODO: make theme selectable + this.container_.classList.add('google'); + + let editorElem = document.createElement('ul'); + this.container_.appendChild(editorElem); + this.editor_ = new Editor(editorElem); + } +} + class ListenUtils { constructor() { this.listeners_ = []; @@ -580,4 +594,4 @@ class Link extends EditorEntryBase { } } -new Editor(document.getElementById('definition')); +new Architype(document.getElementById('architype')); diff --git a/index.html b/index.html index 4ba4e78..5372d95 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ -