From 2c623139c9a1ab07241f3fec1da419054394f9bc Mon Sep 17 00:00:00 2001 From: Benjamin Barenblat Date: Thu, 25 Jun 2015 21:51:52 -0400 Subject: Add some CSS --- .gitmodules | 3 ++ main.ur | 63 +++++++++++++++++++---------------- normalize.css | 1 + style.ur | 1 + style.urs | 1 + urwiki.css | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++- urwiki.urp | 5 +-- vendor/normalize.css | 1 + 8 files changed, 137 insertions(+), 32 deletions(-) create mode 100644 .gitmodules create mode 120000 normalize.css create mode 160000 vendor/normalize.css diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..2487215 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vendor/normalize.css"] + path = vendor/normalize.css + url = git://github.com/necolas/normalize.css.git diff --git a/main.ur b/main.ur index 6478dd1..12fbb9d 100644 --- a/main.ur +++ b/main.ur @@ -55,6 +55,10 @@ fun create_commit title text : transaction unit = dml (INSERT INTO commit (Id, Created, Title, Content) VALUES ({[id]}, {[creation_time]}, {[title]}, {[text]})) +style article_text +style button_group +style top_bar + fun wiki requested_article_title = (* Look up the article. *) article <- current_revision requested_article_title; @@ -72,46 +76,47 @@ fun wiki requested_article_title = then Configuration.wiki_title else article.Title ^ " – " ^ Configuration.wiki_title]} - + + (* Page headings *) -
-

{[Configuration.wiki_title]}

- -
- (* Article *) - {[text]}} />
- (* Editing panel *) -
- (* Controls for View mode *) -
-
+ (* Controls for Edit mode *) +
+
- (* Controls for Edit mode *) + + (* Article *) +
+ (* Editing window *)

-
+ (* Article text (or live preview) *) + {[text]}} />
diff --git a/normalize.css b/normalize.css new file mode 120000 index 0000000..6f2da79 --- /dev/null +++ b/normalize.css @@ -0,0 +1 @@ +vendor/normalize.css/normalize.css \ No newline at end of file diff --git a/style.ur b/style.ur index a592666..64ee18e 100644 --- a/style.ur +++ b/style.ur @@ -11,4 +11,5 @@ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) +style inline_block style invisible diff --git a/style.urs b/style.urs index a592666..64ee18e 100644 --- a/style.urs +++ b/style.urs @@ -11,4 +11,5 @@ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. *) +style inline_block style invisible diff --git a/urwiki.css b/urwiki.css index 78adbe1..574177e 100644 --- a/urwiki.css +++ b/urwiki.css @@ -1,4 +1,5 @@ -/* Copyright 2015 the Massachusetts Institute of Technology +/* Copyright 2013 Garrick Van Buren and Jamie Thingelstad +Copyright 2015 the Massachusetts Institute of Technology Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -11,6 +12,97 @@ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ +*:before, *:after { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +button { + cursor: default; +} + +html { + background: #fff; + color: #000; + font-family: sans-serif; + font-size: 100%; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} + +body { + display: block; + background: #fff; + color: #222; + padding: 0; + margin: 0; + font-family: "Helvetica Neue", "Helvetica", Arial, sans-serif; + font-weight: normal; + font-style: normal; + line-height: 1.6em; + position: relative; + cursor: default; +} + +div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, p, blockquote, + th, td { + margin: 0; + padding: 0; + direction: ltr; +} + +div { + line-height: 1.6em; +} + +.Main_top_bar { + height: 45px; + line-height: 45px; + position: relative; + margin-bottom: 1.875em; + background: #111; + overflow: visible; +} + +.Main_top_bar a { + color: #fff; + font-size: 1.0625em; + font-weight: bold; + text-decoration: none; + padding: 0 15px; +} + +.Main_top_bar .Main_button_group { + float: right; + height: 45px; +} + +.Main_top_bar .Main_button_group button { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background: inherit; + color: #fff; + border: none; + padding: 0 15px; + height: 45px; +} + +.Main_article_text { + margin: 0 auto; + padding: 0 15px; + max-width: 62.5em; +} + +.Main_article_text textarea { + width: 100%; + height: 12em; + margin-bottom: 1em; + resize: vertical; +} + .Style_invisible { display: none; } diff --git a/urwiki.urp b/urwiki.urp index 066918c..d8afbf9 100644 --- a/urwiki.urp +++ b/urwiki.urp @@ -1,5 +1,6 @@ -allow url /urwiki.css -file /urwiki.css urwiki.css +allow url /css/* +file /css/normalize.css normalize.css +file /css/urwiki.css urwiki.css $/option style diff --git a/vendor/normalize.css b/vendor/normalize.css new file mode 160000 index 0000000..2bdda84 --- /dev/null +++ b/vendor/normalize.css @@ -0,0 +1 @@ +Subproject commit 2bdda84272650aedfb45d8abe11a6d177933a803 -- cgit v1.2.3