aboutsummaryrefslogtreecommitdiffhomepage
path: root/demo
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-03 12:36:25 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-03 12:36:25 -0400
commit4be41963bba445bb3bb26d5e05883f7eb72a9a22 (patch)
treefc89f9e8ddc1f6bba852276509eca2f74195c996 /demo
parentd8de44ce7c70fc8ce462e764223e413a9a6ea6b6 (diff)
css demo
Diffstat (limited to 'demo')
-rw-r--r--demo/css.ur11
-rw-r--r--demo/css.urp4
-rw-r--r--demo/css.urs1
-rw-r--r--demo/prose4
4 files changed, 20 insertions, 0 deletions
diff --git a/demo/css.ur b/demo/css.ur
new file mode 100644
index 00000000..0c1d8f70
--- /dev/null
+++ b/demo/css.ur
@@ -0,0 +1,11 @@
+style quote
+
+fun main () = return <xml>
+ <head>
+ <link rel="stylesheet" type="text/css" href="http://adam.chlipala.net/style.css"/>
+ </head>
+
+ <body>
+ <div class={quote}>Here's a quote.</div>
+ </body>
+</xml>
diff --git a/demo/css.urp b/demo/css.urp
new file mode 100644
index 00000000..150808de
--- /dev/null
+++ b/demo/css.urp
@@ -0,0 +1,4 @@
+allow url http://adam.chlipala.net/style.css
+rewrite style Css/quote quote
+
+css
diff --git a/demo/css.urs b/demo/css.urs
new file mode 100644
index 00000000..6ac44e0b
--- /dev/null
+++ b/demo/css.urs
@@ -0,0 +1 @@
+val main : unit -> transaction page
diff --git a/demo/prose b/demo/prose
index c6acf57d..4eb5fe93 100644
--- a/demo/prose
+++ b/demo/prose
@@ -70,6 +70,10 @@ url.urp
<p>Further, each Ur/Web application enforces a global condition on which strings are allowed as URLs. The <tt>.urp</tt> file for this demo shows an example that specifies particular rules about which URLs are allowed. You can try entering a variety of URLs on the form on the front page. Only those satisfying the <tt>allow url</tt>/<tt>deny url</tt> conditions should be permitted.</p>
+css.urp
+
+<p>Ur/Web supports a structured approach to Cascading Style Sheets, where each style is a first-class value within a module. This demo shows the importing of an external style sheet with one style. By default, like other Ur/Web entities, the name of the style would be <tt>Css_quote</tt>. We use the <tt>rewrite</tt> directive in the <tt>.urp</tt> file to specify an alternate name for a particular canonical module path. The external style sheet contains a definition of a style with the alternate name that we give.</p>
+
listShop.urp
<p>This example shows off algebraic datatypes, parametric polymorphism, and functors.</p>