From 2d5b3c7ff371ce32f0f4f77e79202db6009ee661 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Fri, 12 Jul 2019 04:55:02 +0000 Subject: [PATCH] Add github link to help text --- EditorHelp.js | 14 ++++++++++++++ architype.css | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/EditorHelp.js b/EditorHelp.js index d2d3805..337b5a6 100644 --- a/EditorHelp.js +++ b/EditorHelp.js @@ -67,6 +67,13 @@ class EditorHelp extends EditorEntryBase { this.addLine(); this.addKey('m'); this.addText('Next theme '); + + this.addLine(); + + this.addLine(); + this.addLink( + 'GitHub', + 'https://github.com/firestuff/architype/blob/master/README.md'); } addLine() { @@ -90,6 +97,13 @@ class EditorHelp extends EditorEntryBase { } } + addLink(text, href) { + let a = document.createElement('a'); + a.href = href; + a.innerText = text; + this.line_.appendChild(a); + } + afterDomAdd() { this.elem_.focus(); } diff --git a/architype.css b/architype.css index 5ced210..024bc17 100644 --- a/architype.css +++ b/architype.css @@ -144,6 +144,7 @@ body { } .editor li.help > div { + margin-top: 2px; min-height: 10px; } @@ -170,6 +171,10 @@ body { margin: 5px; } +.editor li.help a { + color: var(--text); +} + .editor li:focus { border-left: 10px solid var(--focus) !important; }