Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reboot! start over using clojure and clojurescript

  • Loading branch information...
commit b372b5c302dbbfed97ccc733affc2b817e956ae8 1 parent 5057a34
@fbreuer authored
Showing with 2,366 additions and 12,842 deletions.
  1. +0 −8 compile.bat
  2. +8 −0 project.clj
  3. +282 −0 qute.leo
  4. +150 −102 {src → resources/public/css}/main.css
  5. +74 −74 {src → resources/public/css}/print.css
  6. 0  src/img/icon.ico → resources/public/favicon.ico
  7. +14 −14 src/themes/font-cosmetica.css → resources/public/fonts/cosmetica/font.css
  8. 0  {src/fonts → resources/public/fonts/cosmetica}/mgopencosmeticaregular.ttf
  9. +21 −21 {src/themes → resources/public/fonts/gentium}/font-gentium.css
  10. 0  {src/fonts → resources/public/fonts/gentium}/genbkbasr.ttf
  11. +21 −21 {src/themes → resources/public/fonts/junicode}/font-junicode.css
  12. 0  {src/fonts → resources/public/fonts/junicode}/junicoderegular.ttf
  13. +1,202 −1,202 {src → resources/public}/fonts/license.txt
  14. +17 −17 {src/themes → resources/public/fonts/ubuntu}/font-ubuntu.css
  15. 0  {src/fonts → resources/public/fonts/ubuntu}/ubunturegular.ttf
  16. 0  {src → resources/public}/img/icon-36.png
  17. 0  {src → resources/public}/img/icon-512.png
  18. 0  {src/img → resources/public/themes/cute}/cute-background.png
  19. +61 −61 {src/themes → resources/public/themes/cute}/theme-cute.css
  20. +68 −68 {src/themes → resources/public/themes/desk}/theme-desk.css
  21. 0  {src/img → resources/public/themes/dramatic-dark}/dramatic-dark-background.png
  22. +68 −68 {src/themes → resources/public/themes/dramatic-dark}/theme-dramatic-dark.css
  23. 0  {src/img → resources/public/themes/paper}/paper-background.png
  24. +61 −61 {src/themes → resources/public/themes/paper}/theme-paper.css
  25. 0  {src/themes → resources/public/themes/plain-bw}/theme-plain-bow.css
  26. 0  {src/themes → resources/public/themes/plain-wb}/theme-plain-wob.css
  27. 0  {src/img → resources/public/themes/sky}/sky-background.png
  28. +67 −67 {src/themes → resources/public/themes/sky}/theme-sky.css
  29. 0  {src/img → resources/public/themes/subtle-dark}/subtle-dark-background.png
  30. +65 −68 src/themes/theme-subtle-dark.css → resources/public/themes/subtle-dark/theme.css
  31. +60 −60 {src/themes → resources/public/themes/wood}/theme-wood.css
  32. 0  {src/img → resources/public/themes/wood}/wood-background.png
  33. +0 −1  run.bat
  34. +0 −8 src/appinfo.json
  35. BIN  src/favicon.ico
  36. +0 −218 src/index.html
  37. +0 −913 src/inkline.js
  38. +0 −8,316 src/lib/jquery-1.5.1.js
  39. +0 −99 src/lib/jquery.hotkeys.js
  40. +0 −1,312 src/lib/showdown.js
  41. +0 −31 src/one-column.css
  42. +100 −0 src/qute.cljs
  43. +27 −0 src/qute/server.clj
  44. +0 −32 src/two-column.css
View
8 compile.bat
@@ -1,8 +0,0 @@
-set PATH=C:\Python27;%PATH%
-set OUTPUTDIR=chromeless\build\Qute\
-
-python chromeless\chromeless appify src
-
-copy LICENSE-AGPL %OUTPUTDIR%
-copy README.md %OUTPUTDIR%
-copy src\img\icon.ico %OUTPUTDIR%
View
8 project.clj
@@ -0,0 +1,8 @@
+(defproject qute "0.5.0"
+ :description "Qute is an experimental document editor."
+ :dependencies [[org.clojure/clojure "1.3.0"]
+ [noir "1.1.1-SNAPSHOT"]
+ [hiccup "0.3.7"]
+ [pinot "0.1.1-SNAPSHOT"]]
+ :main qute.server)
+
View
282 qute.leo
@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Created by Leo (http://webpages.charter.net/edreamleo/front.html) -->
+<?xml-stylesheet ekr_test?>
+<leo_file xmlns:leo="http://www.leo-editor.org/2011/leo" >
+<leo_header file_format="2" tnodes="0" max_tnode_index="0" clone_windows="0"/>
+<globals body_outline_ratio="0.5" body_secondary_ratio="0.5">
+ <global_window_position top="50" left="50" height="500" width="700"/>
+ <global_log_window_position top="0" left="0" height="0" width="0"/>
+</globals>
+<preferences/>
+<find_panel_settings/>
+<vnodes>
+<v t="fbreuer.20111104102808.1226" a="E"><vh>Qute</vh>
+<v t="fbreuer.20111104102808.1227" a="E"><vh>Qute-TODO</vh>
+<v t="fbreuer.20111104102808.1228" a="E"><vh>Release 0.4</vh>
+<v t="fbreuer.20111104102808.1239"><vh>Blog Post</vh></v>
+<v t="fbreuer.20111104102808.1231"><vh>Freshmeat announcement</vh></v>
+</v>
+<v t="fbreuer.20111104102808.1232" a="E"><vh>Branch 0.5</vh>
+<v t="fbreuer.20111104102808.1240"><vh>UI Mockup</vh></v>
+<v t="fbreuer.20111104102808.1233"><vh>Create ClojureScript spike solution</vh></v>
+<v t="fbreuer.20111104102808.1234"><vh>make build script</vh></v>
+</v>
+</v>
+<v t="fbreuer.20111104102808.1256" a="E"><vh>Notes</vh>
+<v t="fbreuer.20111112151513.1282"><vh>Smooth Fonts in Firefox</vh></v>
+<v t="fbreuer.20111112000603.1284"><vh>Emacs</vh></v>
+<v t="fbreuer.20111104102808.1258"><vh>Connecting Browser to REPL</vh></v>
+<v t="fbreuer.20111104102808.1259" a="E"><vh>Workflow</vh>
+<v t="fbreuer.20111110211122.1279"><vh>Command Line</vh></v>
+<v t="fbreuer.20111110211122.1278" a="E"><vh>Leiningen</vh>
+<v t="fbreuer.20111110211122.1280"><vh>Preparations</vh></v>
+</v>
+</v>
+<v t="fbreuer.20111104102808.1257"><vh>Compiling ClojureScript from Clojure REPL</vh></v>
+</v>
+<v t="fbreuer.20111104102808.1235" a="E"><vh>Ideas</vh>
+<v t="fbreuer.20111104102808.1236"><vh>keep code in leo?</vh></v>
+</v>
+<v t="fbreuer.20111104102808.1241" a="E"><vh>Build System</vh>
+<v t="fbreuer.20111104102808.1242"><vh>compilejs.py</vh></v>
+<v t="fbreuer.20111104102808.1252"><vh>release.py</vh></v>
+</v>
+<v t="fbreuer.20111104102808.1253" a="E"><vh>Program</vh>
+<v t="fbreuer.20111112151513.1281"><vh>Snippets</vh></v>
+</v>
+<v t="fbreuer.20111105135419.1260" a="E"><vh>Specification</vh>
+<v t="fbreuer.20111105135419.1263" a="E"><vh>UI State</vh>
+<v t="fbreuer.20111105135419.1266"><vh>Outline</vh></v>
+<v t="fbreuer.20111105135419.1267"><vh>Body</vh></v>
+<v t="fbreuer.20111105135419.1268"><vh>Occurrences - Vertices</vh></v>
+</v>
+<v t="fbreuer.20111105135419.1261" a="E"><vh>Actions</vh>
+<v t="fbreuer.20111105135419.1264"><vh>Document actions</vh></v>
+<v t="fbreuer.20111105135419.1265"><vh>UI actions</vh></v>
+</v>
+<v t="fbreuer.20111105135419.1262"><vh>Input Mapping</vh></v>
+</v>
+</v>
+</vnodes>
+<tnodes>
+<t tx="fbreuer.20111104102808.1226"></t>
+<t tx="fbreuer.20111104102808.1227"></t>
+<t tx="fbreuer.20111104102808.1228"></t>
+<t tx="fbreuer.20111104102808.1231"></t>
+<t tx="fbreuer.20111104102808.1232"></t>
+<t tx="fbreuer.20111104102808.1233"></t>
+<t tx="fbreuer.20111104102808.1234"></t>
+<t tx="fbreuer.20111104102808.1235"></t>
+<t tx="fbreuer.20111104102808.1236">Drawbacks:
+
+ * Leo is constantly complaining about orphan nodes. Is there a way to turn this off?
+ * Leo does not support Clojure syntax.</t>
+<t tx="fbreuer.20111104102808.1239"></t>
+<t tx="fbreuer.20111104102808.1240"></t>
+<t tx="fbreuer.20111104102808.1241">old buildsystem, currently we use leiningen and cljs-watch</t>
+<t tx="fbreuer.20111104102808.1242">import os
+import os.path
+import shutil
+import subprocess
+
+abovebuilddir = "src"
+builddir = "src/js"
+sourcedir = "src"
+cljscexe = "cljsc"
+
+try:
+ os.makedirs(builddir)
+except:
+ pass
+
+subprocess.call([cljscexe, sourcedir, '{:output-dir "' + builddir + '" :output-to "' + abovebuilddir + '/qute.js"}'], shell=True)
+</t>
+<t tx="fbreuer.20111104102808.1252">import os
+import os.path
+import shutil
+import subprocess
+
+builddir = "build"
+sourcedir = "src"
+cljscexe = "cljsc"
+
+try:
+ shutil.rmtree(builddir)
+except:
+ pass
+
+shutil.copytree(os.path.join(sourcedir,"html"),builddir)
+
+for f in ["LICENSE-AGPL","README.md", "src\icon.ico"]:
+ shutil.copy(f,builddir)
+
+subprocess.call([cljscexe, sourcedir, '{:output-dir "' + builddir + '" :output-to "' + builddir + '/qute.js"}'], shell=True)
+</t>
+<t tx="fbreuer.20111104102808.1253"></t>
+<t tx="fbreuer.20111104102808.1256"></t>
+<t tx="fbreuer.20111104102808.1257">(require '[cljs.closure :as cljsc])
+(cljsc/build "src" {:output-dir "src/js" :output-to "src/qute.js"})</t>
+<t tx="fbreuer.20111104102808.1258">1) In clj REPL
+
+(require '[cljs.repl :as repl])
+(require '[cljs.repl.browser :as browser]) ;; require the browser implementation of IJavaScriptEnv
+(def env (browser/repl-env)) ;; create a new environment
+(repl/repl env) ;; start the REPL
+
+2) In Browser
+
+(ns foo
+ (:require [clojure.browser.repl :as repl]))
+(repl/connect "http://localhost:9000/repl")
+
+;; happens automatically now!
+;; just reload!</t>
+<t tx="fbreuer.20111104102808.1259"></t>
+<t tx="fbreuer.20111105135419.1260"></t>
+<t tx="fbreuer.20111105135419.1261">Which actions do I want to support in the first iteration?
+
+Here an *action* means an operation that modifies the *document state* or the *ui state*.</t>
+<t tx="fbreuer.20111105135419.1262">Given the state of the UI, which UI gestures trigger which actions?</t>
+<t tx="fbreuer.20111105135419.1263">The UI has several components each of which have a state.
+
+
+</t>
+<t tx="fbreuer.20111105135419.1264">Here come the actions that modify the document. These are relatively few.
+
+* set block content
+* set/remove block attribute
+* delete block
+* create block
+* move block
+ - absolute movement
+ - insert at particular spot
+ - relative movement
+ - move up/down/left/right
+* clone block (create cyclic structure)</t>
+<t tx="fbreuer.20111105135419.1265"></t>
+<t tx="fbreuer.20111105135419.1266"># State
+
+The outline is a tree with folding and hyperlinks. It also has an active node and a scroll bar.
+
+The UI state of the outline is determined by (b,v,y,S) where b is a boolean specifying whether the outline is visible, v is the currently active node, y is the y-scroll position and S is the set of unfolded nodes. Note that for a vertex that appears at multiple positions in the tree, using a set S does not suffice. We have to say *which* occurences of the vertex in the tree are expanded. It is not clear what we mean by occurrences. The most straightforward way to define this is to define an occurrence as a path from the root of the directed graph to the vertex. But this seems like overkill for most purposes. Instead, we could save a pair of vertex and parent (v,p) to denote that v is expanded when displayed as a child of p. We might also want to enforce that only one instance of a vertex can be open at any given time.
+
+
+IDEA: maybe use D3 to create a tree control which can be encapsulated?
+
+TODO: How to represent hyperlinks visually? &lt;- Just using indentation and icons in front of the lines.</t>
+<t tx="fbreuer.20111105135419.1267"># State
+
+The state of the body is given by a tuple (S, vroot, focused, editing) where
+
+* S is a set of visible vertices. Here we again have the issue that some elements may be folded, while others are not. Also, the visible elements cannot just be identified with vertices, rather they have to be indentified with _occurences_ of vertices.
+* vroot is the _parent_ of all the elements that are visible in he body.
+* focused is an element of S which denotes the element that currently has focus.
+* editing is either an element of S which is currently edited, or none, which means that no element is currently edited.</t>
+<t tx="fbreuer.20111105135419.1268">Here we define a labeled traversal of a document graph.
+
+The input, apart from the graph, is the following: (root, Occ).
+
+* root is a vertex of the graph.
+* Occ is a set of occurrences. An occurrence is a pair (v, p), where v is a vertex and p is a vertex with (p, v) \in E.
+
+traverse v Occ p d
+ draw-expanded v d
+ for w in children(v)
+ if (w,v) in Occ
+ traverse w (Occ - (w,v)) v d+1
+ else
+ draw-collapsed w d
+
+draw-expanded draws the content and attributes of v when v is expanded.
+
+draw-collapsed draws the content and attributes of v when v is collapsed.
+
+here d is a depth parameter</t>
+<t tx="fbreuer.20111110211122.1278">1) lein run
+
+to start the noir server from the project directory
+
+if there are errors here, try deleting the lib and classes directories. also, you may have to kill stale processes.
+
+2) cljs-watch
+
+to start live-compiling of clojurescript files
+
+3) edit away!
+
+
+</t>
+<t tx="fbreuer.20111110211122.1279">1) Open REPL for compiling
+
+2) Open REPL for interaction with browser
+- if possible it would be good to run this repl in Emacs
+- I can't get swank-clojure to work without installing Leiningen, which I'd rather avoid.
+- So, start the repls from shells inside Emacs.
+- To open *two* shells in Emacs use C-u M-x shell.
+
+3) Open index.html in browser
+
+4) Open source files in editor</t>
+<t tx="fbreuer.20111110211122.1280">Install clojurescript
+Install cljs-watch
+Install leiningen
+
+Create project.clj referencing noir and pinot
+</t>
+<t tx="fbreuer.20111112000603.1284">Rename buffer
+
+M-x rename-buffer &lt;RET&gt; [name] &lt;RET&gt;</t>
+<t tx="fbreuer.20111112151513.1281">(ns qute.io
+ (:require [cljs.reader :as reader]
+ [goog.storage.Storage :as storage]
+ [goog.storage.mechanism.HTML5LocalStorage :as h5storage]
+ ))
+
+(defn read-document [str]
+ (reader/read-string str))
+
+(defn write-document [doc]
+ (pr-str doc))
+
+(defn save-document [path]
+ (let [stor (goog.storage.Storage. (goog.storage.mechanism.HTML5LocalStorage.))]
+ (.set stor path (write-document (deref *doc*)))
+ ))
+
+(defn load-document [path]
+ (let [stor (goog.storage.Storage. (goog.storage.mechanism.HTML5LocalStorage.))]
+ (reset! *doc* (read-document (.get stor path)))
+ ))
+
+(ns qute.outline.render
+ (:require-macros [hiccups.core :as hiccups])
+ (:require [hiccups.runtime :as hiccupsrt]
+ [qute.doc :as qdoc]))
+
+(defn redraw-outline-visitor )
+
+(defn redraw-outline [doc expanded-occurrences]
+ ;; clear outline element
+ ;; prepare outline element
+ ;; run the traversal
+ (let [outline-elt
+ html-vec (qdoc/traverse doc )
+ write ;; convert to dom elements and append to correct elt
+ visitor-fn (fn [doc v expanded depth]
+ (write
+ [:span {:class "outline-row"
+ :style (join "padding-left: " (*depth 10) "px")}
+ [:span "outline-bullet" (if expanded "-" "+")]
+ [:span "outline-caption" (get-in doc [:content v])]]))]))
+
+(ns qute
+ (:require [cljs.reader :as reader]
+ [clojure.browser.repl :as repl]))
+
+;; we always want to connect to a repl!
+(repl/connect "http://localhost:9000/repl")</t>
+<t tx="fbreuer.20111112151513.1282">pref("gfx.direct2d.disabled", true);
+pref("layers.acceleration.disabled", true);
+</t>
+</tnodes>
+</leo_file>
View
252 src/main.css → resources/public/css/main.css
@@ -1,103 +1,151 @@
-/* MAIN */
-
-html {
- height: 100%;
-}
-
-body {
- background-position: 50% 0%;
- background-attachment: fixed;
- padding: 0;
- margin: 0;
- border: 0;
- height: 100%;
-}
-
-.box, .box-source, .box-output, .box-button {
- background: transparent;
-}
-
-.box-output, .box-source {
- font-size: 12pt;
- /* for debugging: */
- /* border: 1px solid white; */
-}
-
-.box-source {
- white-space: pre-wrap;
- outline: 0px solid transparent;
-}
-
-.box-button {
- font-weight: bold;
- float: left;
- width: 20px;
- margin: 0;
- padding: 0;
-}
-
-.box-source, .box-output {
- text-align: justify;
-}
-
-.column {
- margin: auto;
- padding: 40px 20px 100px 20px;
-}
-
-
-#scroll-area {
- width: 100%;
- height: 100%;
- padding: 0;
- margin: 0;
- border: 0;
- overflow-y: scroll;
-}
-
-/* NOTIFY AREA */
-
-#notify-area {
- padding: 10px;
- position: absolute;
- bottom: 50px;
- left: 50px;
- right: 50px;
-}
-
-/* MENU */
-
-#menu {
- position: absolute;
- width: 400px;
- padding: 30px;
-}
-
-#menu a {
- display: block;
- cursor: pointer;
- padding: 5px;
- margin: auto;
-}
-
-#menuanchor {
- cursor: pointer;
- position: absolute;
- top: 5px;
- left: 5px;
- padding: 5px;
-}
-
-/* HIDE SCROLLBAR */
-
-/* this does not work, as these properties are IE specific */
-
-.hidescroll {
- scrollbar-shadow-color: rgba(0,0,0,0);
- scrollbar-highlight-color: rgba(0,0,0,0);
- scrollbar-face-color: rgba(0,0,0,0);
- scrollbar-3dlight-color: rgba(0,0,0,0);
- scrollbar-darkshadow-color: rgba(0,0,0,0);
- scrollbar-track-color: rgba(0,0,0,0);
- scrollbar-arrow-color: rgba(0,0,0,0);
+/* MAIN */
+
+html {
+ height: 100%;
+}
+
+body {
+ background-position: 50% 0%;
+ background-attachment: fixed;
+ padding: 0;
+ margin: 0;
+ border: 0;
+ height: 100%;
+}
+
+.block, .block-source, .block-render, .block-controls {
+ border: 1px solid white;
+ margin: 5px;
+}
+
+.box, .box-source, .box-output, .box-button {
+ background: transparent;
+}
+
+.box-output, .box-source {
+ font-size: 12pt;
+ /* for debugging: */
+ /* border: 1px solid white; */
+}
+
+.box-source {
+ white-space: pre-wrap;
+ outline: 0px solid transparent;
+}
+
+.box-button {
+ font-weight: bold;
+ float: left;
+ width: 20px;
+ margin: 0;
+ padding: 0;
+}
+
+.box-source, .box-output {
+ text-align: justify;
+}
+
+#column {
+ margin: auto;
+ padding: 40px 20px 100px 220px;
+}
+
+
+#scroll-area {
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ margin: 0;
+ border: 0;
+ overflow-y: scroll;
+}
+
+/* OUTLINE */
+
+#outline {
+ background-color: rgba(0,0,0,0.5);
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ width: 200px;
+ height: 100%;
+}
+
+/* NOTIFY AREA */
+
+#notify-area {
+ padding: 10px;
+ position: absolute;
+ bottom: 50px;
+ left: 50px;
+ right: 50px;
+}
+
+/* MENU */
+
+#menu {
+ position: absolute;
+ width: 400px;
+ padding: 30px;
+}
+
+#menu a {
+ display: block;
+ cursor: pointer;
+ padding: 5px;
+ margin: auto;
+}
+
+#menuanchor {
+ cursor: pointer;
+ position: absolute;
+ top: 5px;
+ left: 5px;
+ padding: 5px;
+}
+
+/* HIDE SCROLLBAR */
+
+/* this does not work, as these properties are IE specific */
+
+.hidescroll {
+ scrollbar-shadow-color: rgba(0,0,0,0);
+ scrollbar-highlight-color: rgba(0,0,0,0);
+ scrollbar-face-color: rgba(0,0,0,0);
+ scrollbar-3dlight-color: rgba(0,0,0,0);
+ scrollbar-darkshadow-color: rgba(0,0,0,0);
+ scrollbar-track-color: rgba(0,0,0,0);
+ scrollbar-arrow-color: rgba(0,0,0,0);
+}
+
+/* FROM ONE-COLUMN MODE */
+
+.hidden {
+ display: none;
+}
+
+.box, .box-source, .box-output, .box-button {
+ padding: 0px;
+ margin: 1em;
+}
+
+.box-source {
+ padding-left: 20px !important;
+}
+
+.box-output p {
+ margin: 0;
+}
+
+.box-container {
+ margin: 1em;
+}
+
+.box-source, .box-output {
+ margin: 0;
+ padding: 0;
+}
+
+.column {
+ max-width: 700px;
}
View
148 src/print.css → resources/public/css/print.css
@@ -1,74 +1,74 @@
-/* MAIN */
-
-html {
- height: 100%;
-}
-
-body {
- padding: 0;
- margin: 0;
- border: 0;
- height: 100%;
-}
-
-.hidden {
- display: none;
-}
-
-.box, .box-source, .box-output, .box-button {
- padding: 0px;
- margin: 1em;
-}
-
-.box-output, .box-source {
- font-size: 12pt;
-}
-
-.box-source {
- white-space: pre-wrap;
- padding-left: 20px !important;
- outline: 0px solid transparent;
-}
-
-.box-output p {
- margin: 0;
-}
-
-.box-container {
- /*overflow: hidden;*/
- margin: 1em;
- /*width: 660px;*/
-}
-
-.box-button {
- font-weight: bold;
- float: left;
- width: 20px;
- margin: 0;
- padding: 0;
-}
-
-.box-source, .box-output {
- margin: 0;
- padding: 0;
- text-align: justify;
-}
-
-.column {
- margin: auto;
- padding: 40px 20px 100px 20px;
-}
-
-#scroll-area {
- width: 100%;
- height: 100%;
- padding: 0;
- margin: 0;
- border: 0;
-}
-
-/* MENU */
-
-#menu, #menu a, .menu-page, #menuanchor {
- display: none;
-}
+/* MAIN */
+
+html {
+ height: 100%;
+}
+
+body {
+ padding: 0;
+ margin: 0;
+ border: 0;
+ height: 100%;
+}
+
+.hidden {
+ display: none;
+}
+
+.box, .box-source, .box-output, .box-button {
+ padding: 0px;
+ margin: 1em;
+}
+
+.box-output, .box-source {
+ font-size: 12pt;
+}
+
+.box-source {
+ white-space: pre-wrap;
+ padding-left: 20px !important;
+ outline: 0px solid transparent;
+}
+
+.box-output p {
+ margin: 0;
+}
+
+.box-container {
+ /*overflow: hidden;*/
+ margin: 1em;
+ /*width: 660px;*/
+}
+
+.box-button {
+ font-weight: bold;
+ float: left;
+ width: 20px;
+ margin: 0;
+ padding: 0;
+}
+
+.box-source, .box-output {
+ margin: 0;
+ padding: 0;
+ text-align: justify;
+}
+
+.column {
+ margin: auto;
+ padding: 40px 20px 100px 20px;
+}
+
+#scroll-area {
+ width: 100%;
+ height: 100%;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+
+/* MENU */
+
+#menu, #menu a, .menu-page, #menuanchor {
+ display: none;
+}
View
0  src/img/icon.ico → resources/public/favicon.ico
File renamed without changes
View
28 src/themes/font-cosmetica.css → resources/public/fonts/cosmetica/font.css
@@ -1,15 +1,15 @@
-@font-face {
- font-family: "MgOpen Cosmetica";
- src: url("/fonts/mgopencosmeticaregular.ttf");
-}
-
-body, .box-source {
- font-family: "Optima", "Optima LT Std", "MgOpen Cosmetica";
-}
-
-/* BODY TEXT */
-
-.column code {
- font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
- text-wrap: normal;
+@font-face {
+ font-family: "MgOpen Cosmetica";
+ src: url("mgopencosmeticaregular.ttf");
+}
+
+body, .box-source {
+ font-family: "Optima", "Optima LT Std", "MgOpen Cosmetica";
+}
+
+/* BODY TEXT */
+
+.column code {
+ font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
+ text-wrap: normal;
}
View
0  src/fonts/mgopencosmeticaregular.ttf → ...onts/cosmetica/mgopencosmeticaregular.ttf
File renamed without changes
View
42 src/themes/font-gentium.css → ...ces/public/fonts/gentium/font-gentium.css
@@ -1,22 +1,22 @@
-@font-face {
- font-family: "Gentium Book Basic";
- src: url("/fonts/genbkbasr.ttf");
-}
-
-body {
- font-family: "Gentium Book Basic";
-}
-
-.box-source {
- font-family: "Gentium Book Basic";
-}
-
-#menu, .box-output, .box-source {
- font-size: 14pt;
-}
-
-/* BODY TEXT */
-
-.column code {
- font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
+@font-face {
+ font-family: "Gentium Book Basic";
+ src: url("/fonts/genbkbasr.ttf");
+}
+
+body {
+ font-family: "Gentium Book Basic";
+}
+
+.box-source {
+ font-family: "Gentium Book Basic";
+}
+
+#menu, .box-output, .box-source {
+ font-size: 14pt;
+}
+
+/* BODY TEXT */
+
+.column code {
+ font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
}
View
0  src/fonts/genbkbasr.ttf → resources/public/fonts/gentium/genbkbasr.ttf
File renamed without changes
View
42 src/themes/font-junicode.css → ...s/public/fonts/junicode/font-junicode.css
@@ -1,22 +1,22 @@
-@font-face {
- font-family: "Junicode";
- src: url("/fonts/junicoderegular.ttf");
-}
-
-body {
- font-family: "Garamond", "Garamond Premr Pro Med", "Junicode";
-}
-
-.box-source {
- font-family: "Garamond", "Garamond Premr Pro Med", "Junicode";
-}
-
-#menu, .box-output, .box-source {
- font-size: 14pt;
-}
-
-/* BODY TEXT */
-
-.column code {
- font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
+@font-face {
+ font-family: "Junicode";
+ src: url("/fonts/junicoderegular.ttf");
+}
+
+body {
+ font-family: "Garamond", "Garamond Premr Pro Med", "Junicode";
+}
+
+.box-source {
+ font-family: "Garamond", "Garamond Premr Pro Med", "Junicode";
+}
+
+#menu, .box-output, .box-source {
+ font-size: 14pt;
+}
+
+/* BODY TEXT */
+
+.column code {
+ font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
}
View
0  src/fonts/junicoderegular.ttf → ...public/fonts/junicode/junicoderegular.ttf
File renamed without changes
View
2,404 src/fonts/license.txt → resources/public/fonts/license.txt
1,202 additions, 1,202 deletions not shown
View
34 src/themes/font-ubuntu.css → ...urces/public/fonts/ubuntu/font-ubuntu.css
@@ -1,18 +1,18 @@
-@font-face {
- font-family: "Ubuntu";
- src: url("/fonts/ubunturegular.ttf");
-}
-
-body {
- font-family: "Ubuntu";
-}
-
-.box-source {
- font-family: "Ubuntu";
-}
-
-/* BODY TEXT */
-
-.column code {
- font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
+@font-face {
+ font-family: "Ubuntu";
+ src: url("/fonts/ubunturegular.ttf");
+}
+
+body {
+ font-family: "Ubuntu";
+}
+
+.box-source {
+ font-family: "Ubuntu";
+}
+
+/* BODY TEXT */
+
+.column code {
+ font-family: Consolas, Monaco, "Bitstream Vera Sans Mono";
}
View
0  src/fonts/ubunturegular.ttf → ...ces/public/fonts/ubuntu/ubunturegular.ttf
File renamed without changes
View
0  src/img/icon-36.png → resources/public/img/icon-36.png
File renamed without changes
View
0  src/img/icon-512.png → resources/public/img/icon-512.png
File renamed without changes
View
0  src/img/cute-background.png → ...es/public/themes/cute/cute-background.png
File renamed without changes
View
122 src/themes/theme-cute.css → resources/public/themes/cute/theme-cute.css
@@ -1,62 +1,62 @@
-/* BACKGROUND AND FOREGROUND */
-
-body {
- background-image: url("/img/cute-background.png");
- background-size: cover;
-}
-
-.box, .box-source, .box-output, .box-button {
- color: white;
-}
-
-.box-source {
- border-left: 1px solid white;
-}
-
-/* TEXT: PINK/WHITE GLOW */
-
-.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
- text-shadow: #f7f 0px 0px 4px, #fff 0px 0px 2px;
-}
-
-/* TEXT: STRONG PINK/WHITE GLOW */
-
-.active .box-button, #menu a:hover {
- text-shadow: #f7f 0px 0px 4px, #f7f 0px 0px 4px, #fff 0px 0px 2px, #fff 0px 0px 2px;
-}
-
-
-/* NOTIFY AREA */
-
-#notify-area {
- background-color: rgba(0,0,0,0.8);
- color: white;
- box-shadow: 0px 0px 4px #fff;
- border-radius: 5px;
-}
-
-/* MENU */
-
-#menu {
- background-color: rgba(0,0,0,0.8);
- box-shadow: 0px 0px 4px #fff;
- color: #fff;
-}
-
-#menu a {
- color: #fff;
- font-variant: small-caps;
- text-align: center;
-}
-
-#menuanchor {
- color: white;
- background-color: rgba(0,0,0,0.5);
-}
-
-
-/* BODY TEXT */
-
-.column a {
- color: white;
+/* BACKGROUND AND FOREGROUND */
+
+body {
+ background-image: url("/img/cute-background.png");
+ background-size: cover;
+}
+
+.box, .box-source, .box-output, .box-button {
+ color: white;
+}
+
+.box-source {
+ border-left: 1px solid white;
+}
+
+/* TEXT: PINK/WHITE GLOW */
+
+.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
+ text-shadow: #f7f 0px 0px 4px, #fff 0px 0px 2px;
+}
+
+/* TEXT: STRONG PINK/WHITE GLOW */
+
+.active .box-button, #menu a:hover {
+ text-shadow: #f7f 0px 0px 4px, #f7f 0px 0px 4px, #fff 0px 0px 2px, #fff 0px 0px 2px;
+}
+
+
+/* NOTIFY AREA */
+
+#notify-area {
+ background-color: rgba(0,0,0,0.8);
+ color: white;
+ box-shadow: 0px 0px 4px #fff;
+ border-radius: 5px;
+}
+
+/* MENU */
+
+#menu {
+ background-color: rgba(0,0,0,0.8);
+ box-shadow: 0px 0px 4px #fff;
+ color: #fff;
+}
+
+#menu a {
+ color: #fff;
+ font-variant: small-caps;
+ text-align: center;
+}
+
+#menuanchor {
+ color: white;
+ background-color: rgba(0,0,0,0.5);
+}
+
+
+/* BODY TEXT */
+
+.column a {
+ color: white;
}
View
136 src/themes/theme-desk.css → resources/public/themes/desk/theme-desk.css
@@ -1,69 +1,69 @@
-/* BACKGROUND AND FOREGROUND */
-
-body {
- background-image: url("/img/wood-background.png");
- background-size: cover;
-}
-
-.box, .box-source, .box-output, .box-button {
- color: black;
-}
-
-.box-source {
- border-left: 1px solid black;
-}
-
-/* WHITE SHEET */
-
-.column {
- background-color: white;
- box-shadow: 4px 4px 8px #000, 2px 2px 8px #000, 2px 2px 16px #000;
-}
-
-/* TEXT: BLACK DROP SHADOW */
-
-#notify-area, #menu a {
- color: white
- text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
-}
-
-/* TEXT: WHITE GLOW */
-
-.active .box-button, #menu a:hover {
- text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
-}
-
-
-/* NOTIFY AREA */
-
-#notify-area {
- background-color: rgba(0,0,0,0.8);
- color: white;
- box-shadow: 0px 0px 4px #fff;
- border-radius: 5px;
-}
-
-/* MENU */
-
-#menu {
- background-color: rgba(0,0,0,0.8);
- box-shadow: 0px 0px 4px #fff;
- color: #fff;
-}
-
-#menu a {
- color: #fff;
- font-variant: small-caps;
- text-align: center;
-}
-
-#menuanchor {
- color: white;
- background-color: rgba(0,0,0,0.5);
-}
-
-/* BODY TEXT */
-
-.column a {
- color: black;
+/* BACKGROUND AND FOREGROUND */
+
+body {
+ background-image: url("/img/wood-background.png");
+ background-size: cover;
+}
+
+.box, .box-source, .box-output, .box-button {
+ color: black;
+}
+
+.box-source {
+ border-left: 1px solid black;
+}
+
+/* WHITE SHEET */
+
+.column {
+ background-color: white;
+ box-shadow: 4px 4px 8px #000, 2px 2px 8px #000, 2px 2px 16px #000;
+}
+
+/* TEXT: BLACK DROP SHADOW */
+
+#notify-area, #menu a {
+ color: white
+ text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
+}
+
+/* TEXT: WHITE GLOW */
+
+.active .box-button, #menu a:hover {
+ text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
+}
+
+
+/* NOTIFY AREA */
+
+#notify-area {
+ background-color: rgba(0,0,0,0.8);
+ color: white;
+ box-shadow: 0px 0px 4px #fff;
+ border-radius: 5px;
+}
+
+/* MENU */
+
+#menu {
+ background-color: rgba(0,0,0,0.8);
+ box-shadow: 0px 0px 4px #fff;
+ color: #fff;
+}
+
+#menu a {
+ color: #fff;
+ font-variant: small-caps;
+ text-align: center;
+}
+
+#menuanchor {
+ color: white;
+ background-color: rgba(0,0,0,0.5);
+}
+
+/* BODY TEXT */
+
+.column a {
+ color: black;
}
View
0  src/img/dramatic-dark-background.png → ...ramatic-dark/dramatic-dark-background.png
File renamed without changes
View
136 src/themes/theme-dramatic-dark.css → ...mes/dramatic-dark/theme-dramatic-dark.css
@@ -1,68 +1,68 @@
-/* BACKGROUND AND FOREGROUND */
-
-body {
- /* background-image: url("/img/dark-background-ground.png"), url("/img/dark-background-top.png");
- background-color: black;
- background-repeat: no-repeat, repeat;
- background-size: cover, auto;*/
- background-image: url("/img/dramatic-dark-background.png");
- background-color: black;
- background-repeat: no-repeat;
- background-size: cover;
-}
-
-.box, .box-source, .box-output, .box-button {
- color: white;
-}
-
-.box-source {
- border-left: 1px solid white;
-}
-
-/* TEXT: BLACK DROP SHADOW */
-
-.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
- text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
-}
-
-/* TEXT: WHITE GLOW */
-
-.active .box-button, #menu a:hover {
- text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
-}
-
-
-/* NOTIFY AREA */
-
-#notify-area {
- background-color: rgba(0,0,0,0.8);
- color: white;
- box-shadow: 0px 0px 4px #fff;
- border-radius: 5px;
-}
-
-/* MENU */
-
-#menu {
- background-color: rgba(0,0,0,0.8);
- box-shadow: 0px 0px 4px #fff;
- color: #fff;
-}
-
-#menu a {
- color: #fff;
- font-variant: small-caps;
- text-align: center;
-}
-
-#menuanchor {
- color: white;
- background-color: rgba(0,0,0,0.5);
-}
-
-/* BODY TEXT */
-
-.column a {
- color: white;
-}
-
+/* BACKGROUND AND FOREGROUND */
+
+body {
+ /* background-image: url("/img/dark-background-ground.png"), url("/img/dark-background-top.png");
+ background-color: black;
+ background-repeat: no-repeat, repeat;
+ background-size: cover, auto;*/
+ background-image: url("/img/dramatic-dark-background.png");
+ background-color: black;
+ background-repeat: no-repeat;
+ background-size: cover;
+}
+
+.box, .box-source, .box-output, .box-button {
+ color: white;
+}
+
+.box-source {
+ border-left: 1px solid white;
+}
+
+/* TEXT: BLACK DROP SHADOW */
+
+.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
+ text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
+}
+
+/* TEXT: WHITE GLOW */
+
+.active .box-button, #menu a:hover {
+ text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
+}
+
+
+/* NOTIFY AREA */
+
+#notify-area {
+ background-color: rgba(0,0,0,0.8);
+ color: white;
+ box-shadow: 0px 0px 4px #fff;
+ border-radius: 5px;
+}
+
+/* MENU */
+
+#menu {
+ background-color: rgba(0,0,0,0.8);
+ box-shadow: 0px 0px 4px #fff;
+ color: #fff;
+}
+
+#menu a {
+ color: #fff;
+ font-variant: small-caps;
+ text-align: center;
+}
+
+#menuanchor {
+ color: white;
+ background-color: rgba(0,0,0,0.5);
+}
+
+/* BODY TEXT */
+
+.column a {
+ color: white;
+}
+
View
0  src/img/paper-background.png → .../public/themes/paper/paper-background.png
File renamed without changes
View
122 src/themes/theme-paper.css → ...urces/public/themes/paper/theme-paper.css
@@ -1,62 +1,62 @@
-/* BACKGROUND AND FOREGROUND */
-
-body {
- background-image: url("/img/paper-background.png");
- background-size: cover;
-}
-
-.box, .box-source, .box-output, .box-button {
- color: black;
-}
-
-.box-source {
- border-left: 1px solid black;
-}
-
-/* TEXT: WHITE HALO */
-
-.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
- text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
-}
-
-/* TEXT: RED GLOW */
-
-.active .box-button, #menu a:hover {
- color: white;
- text-shadow: #c40000 0px 0px 4px, #c40000 0px 0px 2px, #fff 0px 0px 1px;
-}
-
-
-/* NOTIFY AREA */
-
-#notify-area {
- background-color: rgba(255,255,255,0.7);
- color: black;
- box-shadow: 0px 0px 4px #000;
- border-radius: 5px;
-}
-
-/* MENU */
-
-#menu {
- background-color: rgba(255,255,255,0.7);
- box-shadow: 0px 0px 4px #000;
- color: black;
-}
-
-#menu a {
- color: black;
- font-variant: small-caps;
- text-align: center;
-}
-
-#menuanchor {
- color: #555;
- background-color: rgba(255,255,255,0.5);
-}
-
-/* BODY TEXT */
-
-.column a {
- color: #c40000;
+/* BACKGROUND AND FOREGROUND */
+
+body {
+ background-image: url("/img/paper-background.png");
+ background-size: cover;
+}
+
+.box, .box-source, .box-output, .box-button {
+ color: black;
+}
+
+.box-source {
+ border-left: 1px solid black;
+}
+
+/* TEXT: WHITE HALO */
+
+.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
+ text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
+}
+
+/* TEXT: RED GLOW */
+
+.active .box-button, #menu a:hover {
+ color: white;
+ text-shadow: #c40000 0px 0px 4px, #c40000 0px 0px 2px, #fff 0px 0px 1px;
+}
+
+
+/* NOTIFY AREA */
+
+#notify-area {
+ background-color: rgba(255,255,255,0.7);
+ color: black;
+ box-shadow: 0px 0px 4px #000;
+ border-radius: 5px;
+}
+
+/* MENU */
+
+#menu {
+ background-color: rgba(255,255,255,0.7);
+ box-shadow: 0px 0px 4px #000;
+ color: black;
+}
+
+#menu a {
+ color: black;
+ font-variant: small-caps;
+ text-align: center;
+}
+
+#menuanchor {
+ color: #555;
+ background-color: rgba(255,255,255,0.5);
+}
+
+/* BODY TEXT */
+
+.column a {
+ color: #c40000;
}
View
0  src/themes/theme-plain-bow.css → ...ublic/themes/plain-bw/theme-plain-bow.css
File renamed without changes
View
0  src/themes/theme-plain-wob.css → ...ublic/themes/plain-wb/theme-plain-wob.css
File renamed without changes
View
0  src/img/sky-background.png → ...rces/public/themes/sky/sky-background.png
File renamed without changes
View
134 src/themes/theme-sky.css → resources/public/themes/sky/theme-sky.css
@@ -1,68 +1,68 @@
-/* BACKGROUND AND FOREGROUND */
-
-body {
- background-image: url("/img/sky-background.png");
- background-size: cover;
-}
-
-.box, .box-source, .box-output, .box-button {
- color: white;
-}
-
-.box-source {
- border-left: 1px solid white;
-}
-
-/* TEXT: Drop Shadow */
-
-.box, .box-source, .box-output, .box-button, #notify-area, #menu a {
- /*text-shadow: #fff 0px 0px 6px;*/
- text-shadow: #000 2px 2px 4px, #000 2px 2px 4px;
-}
-
-/* TEXT: White GLOW */
-
-.active .box-button, #menu a:hover {
- color: white;
- text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px, #fff 0px 0px 4px, #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
-}
-
-
-/* NOTIFY AREA */
-
-#notify-area {
- background-color: rgba(50,88,149,0.9);
- color: white;
- text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
- box-shadow: 0px 0px 4px #fff;
- border-radius: 5px;
-}
-
-/* MENU */
-
-#menu {
- background-color: rgba(50,88,149,0.9);
- box-shadow: 0px 0px 4px #fff;
- text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
- color: white;
-}
-
-#menu a {
- color: white;
- text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
- font-variant: small-caps;
- text-align: center;
-}
-
-#menuanchor {
- color: #fff;
- text-shadow: #fff 0px 0px 4px, #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
- background-color: rgba(255,255,255,0.0);
-}
-
-/* BODY TEXT */
-
-.column a {
- color: #fff;
- text-decoration: underline;
+/* BACKGROUND AND FOREGROUND */
+
+body {
+ background-image: url("/img/sky-background.png");
+ background-size: cover;
+}
+
+.box, .box-source, .box-output, .box-button {
+ color: white;
+}
+
+.box-source {
+ border-left: 1px solid white;
+}
+
+/* TEXT: Drop Shadow */
+
+.box, .box-source, .box-output, .box-button, #notify-area, #menu a {
+ /*text-shadow: #fff 0px 0px 6px;*/
+ text-shadow: #000 2px 2px 4px, #000 2px 2px 4px;
+}
+
+/* TEXT: White GLOW */
+
+.active .box-button, #menu a:hover {
+ color: white;
+ text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px, #fff 0px 0px 4px, #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
+}
+
+
+/* NOTIFY AREA */
+
+#notify-area {
+ background-color: rgba(50,88,149,0.9);
+ color: white;
+ text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
+ box-shadow: 0px 0px 4px #fff;
+ border-radius: 5px;
+}
+
+/* MENU */
+
+#menu {
+ background-color: rgba(50,88,149,0.9);
+ box-shadow: 0px 0px 4px #fff;
+ text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
+ color: white;
+}
+
+#menu a {
+ color: white;
+ text-shadow: #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
+ font-variant: small-caps;
+ text-align: center;
+}
+
+#menuanchor {
+ color: #fff;
+ text-shadow: #fff 0px 0px 4px, #fff 0px 0px 3px, #fff 0px 0px 2px, #fff 0px 0px 1px;
+ background-color: rgba(255,255,255,0.0);
+}
+
+/* BODY TEXT */
+
+.column a {
+ color: #fff;
+ text-decoration: underline;
}
View
0  src/img/subtle-dark-background.png → ...es/subtle-dark/subtle-dark-background.png
File renamed without changes
View
133 src/themes/theme-subtle-dark.css → ...urces/public/themes/subtle-dark/theme.css
@@ -1,68 +1,65 @@
-/* BACKGROUND AND FOREGROUND */
-
-body {
- /* background-image: url("/img/dark-background-ground.png"), url("/img/dark-background-top.png");
- background-color: black;
- background-repeat: no-repeat, repeat;
- background-size: cover, auto;*/
- background-image: url("/img/subtle-dark-background.png");
- background-color: black;
- background-repeat: no-repeat;
- background-size: cover;
-}
-
-.box, .box-source, .box-output, .box-button {
- color: white;
-}
-
-.box-source {
- border-left: 1px solid white;
-}
-
-/* TEXT: BLACK DROP SHADOW */
-
-.box, .box-source, .box-output, .box-button, #notify-area, #menu a {
- text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
-}
-
-/* TEXT: WHITE GLOW */
-
-.active .box-button, #menu a:hover {
- text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
-}
-
-
-/* NOTIFY AREA */
-
-#notify-area {
- background-color: rgba(0,0,0,0.8);
- color: white;
- box-shadow: 0px 0px 4px #fff;
- border-radius: 5px;
-}
-
-/* MENU */
-
-#menu {
- background-color: rgba(0,0,0,0.8);
- box-shadow: 0px 0px 4px #fff;
- color: #fff;
-}
-
-#menu a {
- color: #fff;
- font-variant: small-caps;
- text-align: center;
-}
-
-#menuanchor {
- color: white;
- background-color: rgba(0,0,0,0.5);
-}
-
-/* BODY TEXT */
-
-.column a {
- color: white;
-}
-
+/* BACKGROUND AND FOREGROUND */
+
+body {
+ background-image: url("subtle-dark-background.png");
+ background-color: black;
+ background-repeat: no-repeat;
+ background-size: cover;
+ color: white;
+}
+
+.box, .box-source, .box-output, .box-button {
+ color: white;
+}
+
+.box-source {
+ border-left: 1px solid white;
+}
+
+/* TEXT: BLACK DROP SHADOW */
+
+.box, .box-source, .box-output, .box-button, #notify-area, #menu a {
+ text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
+}
+
+/* TEXT: WHITE GLOW */
+
+.active .box-button, #menu a:hover {
+ text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
+}
+
+
+/* NOTIFY AREA */
+
+#notify-area {
+ background-color: rgba(0,0,0,0.8);
+ color: white;
+ box-shadow: 0px 0px 4px #fff;
+ border-radius: 5px;
+}
+
+/* MENU */
+
+#menu {
+ background-color: rgba(0,0,0,0.8);
+ box-shadow: 0px 0px 4px #fff;
+ color: #fff;
+}
+
+#menu a {
+ color: #fff;
+ font-variant: small-caps;
+ text-align: center;
+}
+
+#menuanchor {
+ color: white;
+ background-color: rgba(0,0,0,0.5);
+}
+
+/* BODY TEXT */
+
+.column a {
+ color: white;
+}
+
View
120 src/themes/theme-wood.css → resources/public/themes/wood/theme-wood.css
@@ -1,61 +1,61 @@
-/* BACKGROUND AND FOREGROUND */
-
-body {
- background-image: url("/img/wood-background.png");
- background-size: cover;
-}
-
-.box, .box-source, .box-output, .box-button {
- color: white;
-}
-
-.box-source {
- border-left: 1px solid white;
-}
-
-/* TEXT: BLACK DROP SHADOW */
-
-.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
- text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
-}
-
-/* TEXT: WHITE GLOW */
-
-.active .box-button, #menu a:hover {
- text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
-}
-
-
-/* NOTIFY AREA */
-
-#notify-area {
- background-color: rgba(0,0,0,0.8);
- color: white;
- box-shadow: 0px 0px 4px #fff;
- border-radius: 5px;
-}
-
-/* MENU */
-
-#menu {
- background-color: rgba(0,0,0,0.8);
- box-shadow: 0px 0px 4px #fff;
- color: #fff;
-}
-
-#menu a {
- color: #fff;
- font-variant: small-caps;
- text-align: center;
-}
-
-#menuanchor {
- color: white;
- background-color: rgba(0,0,0,0.5);
-}
-
-/* BODY TEXT */
-
-.column a {
- color: white;
+/* BACKGROUND AND FOREGROUND */
+
+body {
+ background-image: url("/img/wood-background.png");
+ background-size: cover;
+}
+
+.box, .box-source, .box-output, .box-button {
+ color: white;
+}
+
+.box-source {
+ border-left: 1px solid white;
+}
+
+/* TEXT: BLACK DROP SHADOW */
+
+.box, .box-source, .box-output, .box-button, #notify-area, #menu a, #menu {
+ text-shadow: #000 2px 2px 4px, #000 2px 2px 4px, #000 2px 2px 4px;
+}
+
+/* TEXT: WHITE GLOW */
+
+.active .box-button, #menu a:hover {
+ text-shadow: #fff 0px 0px 6px, #fff 0px 0px 4px;
+}
+
+
+/* NOTIFY AREA */
+
+#notify-area {
+ background-color: rgba(0,0,0,0.8);
+ color: white;
+ box-shadow: 0px 0px 4px #fff;
+ border-radius: 5px;
+}
+
+/* MENU */
+
+#menu {
+ background-color: rgba(0,0,0,0.8);
+ box-shadow: 0px 0px 4px #fff;
+ color: #fff;
+}
+
+#menu a {
+ color: #fff;
+ font-variant: small-caps;
+ text-align: center;
+}
+
+#menuanchor {
+ color: white;
+ background-color: rgba(0,0,0,0.5);
+}
+
+/* BODY TEXT */
+
+.column a {
+ color: white;
}
View
0  src/img/wood-background.png → ...es/public/themes/wood/wood-background.png
File renamed without changes
View
1  run.bat
@@ -1 +0,0 @@
-chromeless\build\Qute\Qute.exe
View
8 src/appinfo.json
@@ -1,8 +0,0 @@
-{
- "name": "Qute",
- "version": "0.4",
- "vendor": "Felix Breuer",
- "developer_email": "felix@fbreuer.de",
- "resizable": true,
- "menubars": true
-}
View
BIN  src/favicon.ico
Binary file not shown
View
218 src/index.html
@@ -1,218 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
- <link rel="stylesheet" type="text/css" href="main.css" media="screen"/>
- <link id="column-mode" rel="stylesheet" type="text/css" href="one-column.css" media="screen"/>
- <link rel="stylesheet" type="text/css" href="print.css" media="print"/>
- <link id="thefont" rel="stylesheet" type="text/css" href="themes/font-cosmetica.css"/>
- <link id="thetheme" rel="stylesheet" type="text/css" href="themes/theme-subtle-dark.css" media="screen"/>
- <script type="text/javascript" src="lib/jquery-1.5.1.js"></script>
- <script type="text/javascript" src="lib/jquery.hotkeys.js"></script>
- <script type="text/javascript" src="lib/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
- MathJax.Hub.Config({
- extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js", "TeX/noErrors.js"],
- jax: ["input/TeX", "output/NativeMML"],
- tex2jax: {
- inlineMath: [ ['$','$'], ["\\(","\\)"] ],
- displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
- processEscapes: true,
- },
- skipStartupTypeset: true,
- "HTML-CSS": { availableFonts: ["STIX","TeX"], imageFont: null }
- });
- </script>
- <script type="text/javascript" src="lib/showdown.js"></script>
- <script type="text/javascript" src="inkline.js"></script>
- <title>Qute v0.4</title>
-</head>
-
-<body spellcheck="false">
-
-<a id="menuanchor" onclick="showMenu('root');">Q<!--<img src="img/icon-36.png"></img>--></a>
-
-<div id="scroll-area">
-<div class="column"># Welcome to Qute!
-
-**Qute** is an experimental text editor. You can learn more about it at:
-
-&gt; **http://www.inkcode.net/qute**
-
-Here is how to use Qute:
-
-1. To edit a paragraph, click on it.
-2. When done editing, double click the paragraph.
-
-You can use **Markdown** syntax for formatting and **TeX** syntax for formulas.
-
-The **Q** in the top left corner opens the **menu**, which you can use to save and load text files and switch **themes**.
-
-## News
-
-This release, Qute 0.4, is a small bugfix release. There are a few known issues, which are listed at http://github.com/fbreuer/qute-html5/issues.
-
-For the next release, Qute 0.5, a rewrite of large parts of Qute is planned, which means more features and a cleaner implementation at the expense of some convenience functions.
-
-## Keyboard Shortcuts
-
-**Enter** - split paragraph at the current cursor position.
-
-**Ctrl+Enter** - insert new empty paragraph.
-
-**Shift+Enter** - add new line to current paragraph.
-
-**Esc** - toggle menu.
-
-**Ctrl+S** or **F5** - save.
-
-**F9** - load.
-
-**F11** - toggle fullscreen.
-
-**F12** - toggle two column mode.
-
-**Ctrl+T** - switch all paragraphs to display mode.
-
-**Ctrl+Up** and **Ctrl+Down** - change focus to previous/next paragraph.
-
-**Ctrl+Shift+Up** and **Ctrl+Shift+Down** - move current paragraph up/down.
-
-**Backspace** and **Del** - join paragraphs when the cursor is at the beginning/end of one.
-
-**Ctrl+Alt+Up** and **Ctrl+Alt+Down** - join paragraphs.
-
-To **delete** a paragraph, just join it to the previous one, or double-click it, while it's empty.
-
-A note for **Mac users**: in the above list of keyboard shortcuts, you can use Cmd instead of Ctrl as well.
-
-## Notes
-
-Qute saves and loads plain text that you can **edit with any other text editor**. Make sure, though, that your text editor uses **UTF-8** encoding and **Unix-style line endings** ("\n" instead of "\r\n"). **Paragraphs are separated by blank lines**, i.e., by the character sequence "\n\n".
-
-Qute does **not support undo and redo**. You may try Ctrl+Z and Ctrl+Y, but unpredictable things may happen.
-
-Qute is **experimental** software, so many things may not work. In particular, Qute comes **without warranty** of any kind.
-
-Qute is built on many great pieces of software, in particular **Showdown**, **MathJax** and **Chromeless**.
-
-Feedback is very welcome! Visit **http://www.inkcode.net/qute** to get in touch.
-
-</div>
-</div>
-
-<div id="notify-area">
-</div>
-
-<div id="menu" onclick="$('#menu').hide();" style="display:none;">
- <div class="menu-page" id="menu-root" style="display:none;">
- <a onclick="newFile();">new file</a>
- <a alt="F9" onclick="openFile();">open file</a>
- <a alt="F5" onclick="saveFile();">save file</a>
- <!--<a onclick="alert('foo');">test</a>-->
- <a alt="F11" onclick="toggleFullscreen();">toggle fullscreen</a>
- <a alt="F12" onclick="toggleTwoColumnMode();">toggle split view</a>
- <a alt="F12" onclick='notify(cPrefs.get("gfx.direct2d.disable")+" and "+cPrefs.get("layers.acceleration.disable"));'>test</a>
- <!-- does not work yet <a onclick="toggleScrollbar();">scrollbar</a> -->
- <a onclick="showMenu('publish');event.stopPropagation();">publish</a>
- <a onclick="showMenu('config');event.stopPropagation();">config</a>
- <a onclick="showMenu('help');event.stopPropagation();">help</a>
- </div>
- <div class="menu-page" id="menu-publish" style="display:none;">
- <a onclick="window.print();">print</a>
- <a onclick="copyEverything();">copy source to clipboard</a>
- <a onclick="copyOutputToClipboard('text');">copy formatted output to clipboard (as text)</a>
- <a onclick="copyOutputToClipboard('html');">copy formatted output to clipboard (as html)</a>
- <a onclick="exportHTML(true);">export formatted output to html file (w/ MathJax)</a>
- <a onclick="exportHTML(false);">export formatted output to html file (w/o MathJax)</a>
- <div style="font-size: 80%">
- <p>Pandoc export options</p>
- <form action="form_action.asp" method="get" onclick="event.stopPropagation();">
- Path to Pandoc executable: <input id="pandoc-exe" type="text" name="fname"><br />
- Path to Markdown2pdf executable: <input id="pandoc-m2p-exe" type="text" name="lname" /><br />
-</form>
- </div>
- <a onclick="exportLaTeX();">export to LaTeX (requires Pandoc)</a>
- <a onclick="exportPDF();">export to PDF via LaTeX (requires Pandoc)</a>
- </div>
- <div class="menu-page" id="menu-config" style="display:none;">
- <a onclick="showMenu('theme');event.stopPropagation();">themes</a>
- <a onclick="showMenu('font');event.stopPropagation();">fonts</a>
- </div>
- <div class="menu-page" id="menu-font" style="display:none;">
- <a onclick="setFont('cosmetica');">Optima / MgOpen Cosmetica</a>
- <a onclick="setFont('ubuntu');">Ubuntu</a>
- <a onclick="setFont('gentium');">Gentium Book Basic</a>
- <a onclick="setFont('junicode');">Garamond / Junicode</a>
- </div>
- <div class="menu-page" id="menu-theme" style="display:none;">
- <a onclick="setTheme('subtle-dark');">Subtle Dark</a>
- <a onclick="setTheme('dramatic-dark');">Dramatic Dark</a>
- <a onclick="setTheme('paper');">White Paper</a>
- <a onclick="setTheme('wood');">Wood</a>
- <a onclick="setTheme('sky');">Sky</a>
- <a onclick="setTheme('desk');">Desk</a>
- <a onclick="setTheme('cute');">Cute</a>
- <a onclick="setTheme('plain-bow');">Plain Black on White</a>
- <a onclick="setTheme('plain-wob');">Plain White on Black</a>
- </div>
- <div class="menu-page" id="menu-help" style="display:none;">
- <a onclick="showMenu('keyboard');event.stopPropagation();">keyboard shortcuts</a>
- <a onclick="showMenu('about');event.stopPropagation();">about</a>
- </div>
- <div class="menu-page" id="menu-keyboard" style="display:none;">
- <table style="font-size:80%">
- <tr>
- <td>Enter</td><td>split paragraph</td>
- </tr>
- <tr>
- <td>Ctrl+Enter</td><td>insert new paragraph</td>
- </tr>
- <tr>
- <td>Shift+Enter</td><td>add new line</td>
- </tr>
- <tr>
- <td>Esc</td><td>toggle menu</td>
- </tr>
- <tr>
- <td>F5</td><td>save file (also Ctrl+S)</td>
- </tr>
- <tr>
- <td>F9</td><td>load file</td>
- </tr>
- <tr>
- <td>F11</td><td>toggle fullscreen</td>
- </tr>
- <tr>
- <td>F12</td><td>toggle split view</td>
- </tr>
- <tr>
- <td>Ctrl+T</td><td>switch all paragraphs to display mode</td>
- </tr>
- <tr>
- <td>Ctrl+Up/Down</td><td>change focus to prev/next paragraph</td>
- </tr>
- <tr>
- <td>Ctrl+Shift+Up/Down</td><td>move paragraph up/down</td>
- </tr>
- <tr>
- <td>Backspace</td><td>join with previous paragraph if cursor is at beginning</td>
- </tr>
- <tr>
- <td>Delete</td><td>join with next paragraph if cursor is at end</td>
- </tr>
- <tr>
- <td>Ctrl+Alt+Up/Down</td><td>join paragraphs</td>
- </tr>
- </table>
- </div>
- <div class="menu-page" id="menu-about" style="display:none;text-align:center;">
- <p style="font-size:120%;"><b>Qute 0.4</b></p>
- <p>released Oct 31st, 2011</p>
- <p><b>http://www.inkcode.net/qute</b></p>
- <p>Copyright &#169; 2011 Felix Breuer</p>
- </div>
-</div>
-
-</body>
-</html>
-
View
913 src/inkline.js
@@ -1,913 +0,0 @@
-/*
- Qute - a themable text editor with paragraph-wise preview of markup
- Copyright (C) 2011 Felix Breuer
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-mozDirtyStr = "<br _moz='true' _moz_dirty=''/>";
-blankBlockStr = "<div class='box-container'><div class='box-button' style='display:none;'>&gt;</div><div class='box-source' contentEditable='true'>" + mozDirtyStr + "</div><div class='box-output'></div></div>";
-
-dir="C:\\Users\\Felix\\";
-
-converter = new Showdown.converter();
-
-blockSeparator = "\n\n";
-
-cFullscreen = require("fullscreen");
-cUI = require("ui");
-cMenu = require("menu");
-cFile = require("file");
-cFilePicker = require("file-picker");
-cHotkey = require("hotkey");
-cClipboard = require("clipboard");
-cPrefs = require("preferences-service");
-cCProcess = require("child_process");
-
-var filename = "";
-
-var twoColumnMode = false;
-var transformTimer = false;
-
-// UI
-
-function togglePanel() {
- $("#panelslider").slideToggle();
-}
-
-function toggleFullscreen() {
- cFullscreen.toggle(window);
-}
-
-function toggleTwoColumnMode() {
- setTwoColumnMode(!twoColumnMode);
-}
-
-function setTwoColumnMode(b) {
- if(b) {
- /* activate two column mode */
- $("#column-mode").attr("href", "two-column.css");
- twoColumnMode = true;
- /* bind event handlers */
- $('.box-source').live('keyup.twoColumn paste.twoColumn', function(event) {
- if(transformTimer) {
- console.log("clearing Timeout");
- window.clearTimeout(transformTimer);
- transformTimer = undefined;
- }
- // window.setTimeout( function() {alert("foo");}, 1000);
- transformTimer = window.setTimeout(function() { transformBlock($(event.target).parent(".box-container")) }, 800);
- }).live('blur.twoColumn', function(event) {
- transformBlock($(event.target).parent(".box-container"))
- });
-
- } else {
- /* activate one column mode */
- $("#column-mode").attr("href", "one-column.css");
- twoColumnMode = false;
- /* unbind event handlers */
- if(transformTimer) {
- console.log("clearing Timeout");
- window.clearTimeout(transformTimer);
- transformTimer = undefined;
- }
- $('.box-source').die('keyup.twoColumn paste.twoColumn blur.twoColumn');
- }
-}
-
-function toggleScrollbar() {
- /* scroll bar cannot be hidden via css */
- $("#scroll-area").toggleClass("hidescroll");
-}
-
-function pickFile() {
- fp = cFilePicker.FilePicker();
- fp.title = "Open File";
- fp.mode = "save";
- fp.show(function(x) {
- if (x === undefined) {
- console.log("Nothing picked");
- } else {
- console.log("picked " + x);
- }
- });
-}
-
-// BLOCK QUERIES
-
-function getActiveBlock() {
- node = window.getSelection().getRangeAt(0).endContainer;
- return $($(node).parents(".box-container").get(0));
-}
-
-// BLOCK MANIPULATION
-
-insertEmptyBlock = function(block) {
- insertAfterBlock("",block);
-}
-
-insertAfterBlock = function(str,target) {
- $(target).after(blankBlockStr);
- block = $(target).next().get(0);
- prepareBlankBlock(block, str);
- return block;
-}
-
-appendEmptyBlock = function() {
- appendBlock("");
-}
-
-function appendBlock(str) {
- $(".column").append(blankBlockStr);
- block = $(".column").children().last();
- prepareBlankBlock(block, str);
- return block;
-}
-
-function prepareBlankBlock(block, str) {
- textnode = document.createTextNode(str);
- $($(block).find(".box-source").get(0)).prepend(textnode);
- $(block).find('.box-button').click( function () { toggleBlock($(this).parent()); } );
- $(block).find('.box-source').dblclick( function () { toggleBlock($(this).parent()); } );
- $(block).find('.box-output').click( function () { toggleBlock($(this).parent()); } );
-}
-
-
-// BLOCK SPLITTING
-
-// delete block if necessary. split block if necessary.
-function processBlock(block) {
- sourceElt = $(block).find(".box-source").get(0);
- source = readBlock(sourceElt);
- if(source.trim() == "") { // delete
- $(block).remove();
- return [];
- }
- var sources = source.split(blockSeparator);
- if(sources.length > 1) { // split
- sourceElt.innerHTML = sources[0];
- blocks = [$(block).get(0)];
- for(i = 1; i < sources.length; i++) {
- b = insertAfterBlock(sources[i], blocks[blocks.length-1]);
- blocks.push(b);
- }
- return blocks;
- } else { // no-op
- return [$(block).get(0)];
- }
-}
-
-function deleteEmptyBlocks() {
- $(".box-container").each(function (block) {
- sourceElt = $(block).find(".box-source").get(0);
- source = readBlock(sourceElt);
- if(source.trim() == "") { // delete
- $(block).remove();
- return [];
- }
- });
-}
-
-
-// TRANSFORMATION
-
-function transformBlock(block) {
- sourceElt = $(block).find(".box-source").get(0);
- outputElt = $(block).find(".box-output").get(0);
- source = readBlock(sourceElt);
- outputElt.innerHTML = source;
- MathJax.Hub.Queue(["Typeset",MathJax.Hub,outputElt], // apply MathJax
- [function(){
- outputElt.innerHTML = converter.makeHtml(outputElt.innerHTML); // apply Showdown
- displayBlock(block);
- }]);
- }
-
-function transformAll() {
- $(".box-container").each(function(i, e) { transformBlock(e); })
-}
-
-function editBlock(block) {
- sourceElt = $(block).find(".box-source").get(0);
- outputElt = $(block).find(".box-output").get(0);
- $(sourceElt).removeClass("hidden");
- $(outputElt).addClass("hidden");
- r = document.createRange();
- r.setStart($(sourceElt).get(0),0);
- r.collapse(true);
- window.getSelection().removeAllRanges();
- window.getSelection().addRange(r);
- $(sourceElt).focus();
-}
-
-function displayBlock(block) {
- sourceElt = $(block).find(".box-source").get(0);
- outputElt = $(block).find(".box-output").get(0);
- $(sourceElt).addClass("hidden");
- $(outputElt).removeClass("hidden");
-}
-
-function blockInEditMode(block) {
- sourceElt = $(block).find(".box-source").get(0);
- outputElt = $(block).find(".box-output").get(0);
- return $(outputElt).hasClass("hidden");
-}
-
-function toggleBlock(block) {
- console.log("toggleBlock");
- if(blockInEditMode(block)) {
- finishEditingBlock(block);
- } else {
- editBlock(block);
- }
-}
-
-function finishEditingBlock(block) {
- blocks = processBlock(block);
- console.log("toggleBlock: transforming " + blocks.length + " blocks");
- for(i = 0; i < blocks.length; i++) {
- transformBlock(blocks[i]);
- }
- // remove cursor
- window.getSelection().removeAllRanges();
- }
-
-
-// EDITING
-
-function closeCurrentBlockAndAddNext() {
- b = getActiveBlock();
- if(b != undefined) {
- nb = insertAfterBlock("",b);
- toggleBlock(b);
- editBlock(nb);
- }
-}
-
-/* make sure that the block is in edit mode when calling this function! */
-function placeCursor(block, offset) {
- normalizeBlock(block);
- elem = $(block).find(".box-source").get(0);
- for(i = 0; i < elem.childNodes.length; i++) {
- if(elem.childNodes[i].nodeType == Node.TEXT_NODE) {
- s = window.getSelection();
- r = document.createRange();
- r.setStart(elem.childNodes[i], offset);
-