Author: reto
Date: Mon Apr 18 16:20:51 2011
New Revision: 1094640
URL: http://svn.apache.org/viewvc?rev=1094640&view=rev
Log:
Added pseudo-namespace for some css-classes to avoid conflicts with discobits
editor. Changed HeadedPage to use the website style. Changed download link in
faq to point into the tdb-launcher directory. Simplified publishing process by
adding shell script.
Added:
incubator/clerezza/site/trunk/deploy.sh
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/images/logo-big.png
(with props)
incubator/clerezza/site/trunk/src/main/scala/GlobalMenuRenderlet.scala
incubator/clerezza/site/trunk/src/main/scala/TitledContentRenderlet.scala
Modified:
incubator/clerezza/site/trunk/ (props changed)
incubator/clerezza/site/trunk/graph.nt
incubator/clerezza/site/trunk/readme.txt
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/architecture/index.html
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/downloads/index.html
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/building-clerezza/index.html
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/launching-clerezza/index.html
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/mailinglists/index.html
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/style.css
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/thanks/index.html
incubator/clerezza/site/trunk/src/main/scala/Activator.scala
incubator/clerezza/site/trunk/src/main/scala/HeadedPageRenderlet.scala
Propchange: incubator/clerezza/site/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Apr 18 16:20:51 2011
@@ -1 +1,3 @@
target
+
+site.zip
Added: incubator/clerezza/site/trunk/deploy.sh
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/deploy.sh?rev=1094640&view=auto
==============================================================================
--- incubator/clerezza/site/trunk/deploy.sh (added)
+++ incubator/clerezza/site/trunk/deploy.sh Mon Apr 18 16:20:51 2011
@@ -0,0 +1 @@
+curl -u admin:admin
"http://localhost:8080/admin/offline/download?baseUri=http://localhost:8080/&targetUri=http://incubator.apache.org/clerezza/&formatExtension=xhtml&formatExtension=rdf&formatExtension=png&formatExtension=html&formatExtension=js&formatExtension=jpeg&rootLinkPrefix=/clerezza"
| ssh people.apache.org "cd /www/incubator.apache.org/clerezza; umask 0002;cat
- > site.zip; unzip -o site.zip"
\ No newline at end of file
Modified: incubator/clerezza/site/trunk/graph.nt
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/graph.nt?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
--- incubator/clerezza/site/trunk/graph.nt (original)
+++ incubator/clerezza/site/trunk/graph.nt Mon Apr 18 16:20:51 2011
@@ -66,7 +66,7 @@
<http://localhost:8080/faq/index-content-el/0>
<http://discobits.org/ontology#contains> _:bbaf2032ebdc69d16c3f1bb53549aa691 .
<http://localhost:8080/faq/index-content-el/0>
<http://discobits.org/ontology#contains> _:c6cf7677baf6648625092e492d69813b1 .
<http://localhost:8080/faq/index-content-el/0>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://discobits.org/ontology#TitledContent> .
-<http://localhost:8080/faq/index-content-el/1-content>
<http://discobits.org/ontology#infoBit> "<div
xmlns=\"http://www.w3.org/1999/xhtml\">You can download it from the <a
href=\"http://repository.apache.org/content/groups/snapshots/org/apache/clerezza/\"
target=\"_blanke\">Maven Repository</a> or from <a
href=\"../downloads/\">here</a>.</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>
.
+<http://localhost:8080/faq/index-content-el/1-content>
<http://discobits.org/ontology#infoBit> "<div
xmlns=\"http://www.w3.org/1999/xhtml\">You can download a launcher from the <a
href=\"https://repository.apache.org/content/groups/snapshots/org/apache/clerezza/platform.launcher.tdb/0.5-incubating-SNAPSHOT/\"
target=\"_blank\">Maven Repository</a>, learn more <a
href=\"../downloads/\">here</a>.</div>"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral>
.
<http://localhost:8080/faq/index-content-el/1-content>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://discobits.org/ontology#XHTMLInfoDiscoBit> .
<http://localhost:8080/faq/index-content-el/1-title>
<http://discobits.org/ontology#infoBit> "Where can I download a
launcher?"^^<http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral> .
<http://localhost:8080/faq/index-content-el/1-title>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://discobits.org/ontology#XHTMLInfoDiscoBit> .
Modified: incubator/clerezza/site/trunk/readme.txt
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/readme.txt?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
--- incubator/clerezza/site/trunk/readme.txt (original)
+++ incubator/clerezza/site/trunk/readme.txt Mon Apr 18 16:20:51 2011
@@ -5,7 +5,11 @@
- change the site as needed, do not create pages ending with /, create a page
ending with /index instead, the entry page is http://localhost:8080/index (you
may open http://localhost:8080/tools/editor with firefox to edit it)
- commit the changed graph.nt to subversion
-Currently it is necessary to manually upload the site as follows
+Currently the site isn't deployed automatically on commit so it is necessary
to upload the generated site, this can be done by
+either:
+- execute the deploy.sh script
+
+or manually:
- retrieve a zipped offline version from
http://localhost:8080/admin/offline/download?baseUri=http://localhost:8080/&targetUri=http://incubator.apache.org/clerezza/&formatExtension=xhtml&formatExtension=rdf&formatExtension=png&formatExtension=html&formatExtension=js&formatExtension=jpeg&rootLinkPrefix=/clerezza
- scp site<id>.zip people.apache.org:/www/incubator.apache.org/clerezza
- on people.apache.org: unzip -o site<id>.zip
Modified:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/architecture/index.html
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/architecture/index.html?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
---
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/architecture/index.html
(original)
+++
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/architecture/index.html
Mon Apr 18 16:20:51 2011
@@ -7,7 +7,7 @@
</head>
<body>
- <div class="header">
+ <div class="zz-header">
<div class="bar"></div>
<div class="logo">
<a href="../" style=""><img
src="../images/logo.png" alt="logo" /></a>
@@ -41,7 +41,7 @@
</li>
</ul>
</div>
- <div class="content">
+ <div class="zz-content">
<div class="column one-column">
<h1>The Apache Clerezza Stack</h1>
<p>The OSGi (Open Services Gateway initiative)
architecture is chosen as the underlying software architecture for the Apache
Clerezza to achieve a service oriented and modular design of software
components. The OSGi architecture is preferred compared to Service Component
Architecture (SCA) · due to its maturity in implementation and support.
Modified:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/downloads/index.html
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/downloads/index.html?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
---
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/downloads/index.html
(original)
+++
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/downloads/index.html
Mon Apr 18 16:20:51 2011
@@ -7,7 +7,7 @@
</head>
<body>
- <div class="header">
+ <div class="zz-header">
<div class="bar"></div>
<div class="logo">
<a href="../" style=""><img
src="../images/logo.png" alt="logo" /></a>
@@ -41,7 +41,7 @@
</li>
</ul>
</div>
- <div class="content">
+ <div class="zz-content">
<div class="column one-column">
<h1>Downloads</h1>
<p>To get the latest development of Apache
Clerezza, you can check out the <a
href="http://svn.apache.org/viewvc/incubator/clerezza/trunk/"
target="_blank">Source Code</a> and <a
href="../getting-started/building-clerezza/">building Clerezza yourself</a>:
Modified:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/building-clerezza/index.html
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/building-clerezza/index.html?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
---
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/building-clerezza/index.html
(original)
+++
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/building-clerezza/index.html
Mon Apr 18 16:20:51 2011
@@ -7,7 +7,7 @@
</head>
<body>
- <div class="header">
+ <div class="zz-header">
<div class="bar"></div>
<div class="logo">
<a href="../" style=""><img
src="../../images/logo.png" alt="logo" /></a>
@@ -41,7 +41,7 @@
</li>
</ul>
</div>
- <div class="content">
+ <div class="zz-content">
<div class="column one-column">
<h1>Building Clerezza</h1>
<p>The following instructions describes how to
build Clerezza. If you don't want to build Clerezza yourself, you can download
Modified:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/launching-clerezza/index.html
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/launching-clerezza/index.html?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
---
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/launching-clerezza/index.html
(original)
+++
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/getting-started/launching-clerezza/index.html
Mon Apr 18 16:20:51 2011
@@ -7,7 +7,7 @@
</head>
<body>
- <div class="header">
+ <div class="zz-header">
<div class="bar"></div>
<div class="logo">
<a href="../" style=""><img
src="../../images/logo.png" alt="logo" /></a>
@@ -41,7 +41,7 @@
</li>
</ul>
</div>
- <div class="content">
+ <div class="zz-content">
<div class="column one-column">
<h1>Launching Clerezza</h1>
<p>The following instructions describes how to
start Clerezza. If you don't have downloaded the launcher go to <a
href="../../downloads/" >Downloads</a>.
Modified:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/mailinglists/index.html
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/mailinglists/index.html?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
---
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/mailinglists/index.html
(original)
+++
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/mailinglists/index.html
Mon Apr 18 16:20:51 2011
@@ -7,7 +7,7 @@
</head>
<body>
- <div class="header">
+ <div class="zz-header">
<div class="bar"></div>
<div class="logo">
<a href="../" style=""><img
src="../images/logo.png" alt="logo" /></a>
@@ -41,7 +41,7 @@
</li>
</ul>
</div>
- <div class="content">
+ <div class="zz-content">
<div class="column one-column">
<h1>Mailing lists</h1>
The following mailing lists have been
established for Apache Clerezza. For each list, there is a subscribe,
unsubscribe, and archive link.
Added:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/images/logo-big.png
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/images/logo-big.png?rev=1094640&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/images/logo-big.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/style.css
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/style.css?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
---
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/style.css
(original)
+++
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/style/style.css
Mon Apr 18 16:20:51 2011
@@ -234,8 +234,21 @@ li div,span {
padding-bottom: 0.8em;
}
+.zz-control {
+ float: right;
+ margin-top:50px;
+}
-.content {
+.zz-control .actions {
+ margin-top:11em;
+ color: #666666
+}
+
+.zz-control .actions a {
+ color: #666666
+}
+
+.zz-content {
margin-top:11em;
margin-left:22.25em;
/*width:70%;*/
@@ -243,18 +256,18 @@ li div,span {
line-height: 1.5em;
}
-.content img {
+.zz-content img {
max-width: 600px;
/** border: 1px solid #666666; */
margin: 0.5em;
padding: 0.25em;
}
-.content ul {
+.zz-content ul {
padding-left: 1.3em;
}
-.content .figure-desc {
+.zz-content .figure-desc {
margin-left: 0.5em;
font-size: 0.85em;
font-style: italic;
@@ -265,7 +278,7 @@ li div,span {
padding-bottom: 3.125em;
}
-.content .column {
+.zz-content .column {
font-size: 0.85em;
}
@@ -391,5 +404,28 @@ li div,span {
width:22.25em;
}
+div .module-info {
+ /*margin-left:22.25em;*/
+ position: absolute;
+ left: 22.25em;
+}
+div .module-info div ol {
+ height: 2em;
+}
+
+div .module-info div ol li {
+ list-style: none outside none;
+ float: left;
+ margin: 0 0.15em;
+ padding: 0 0.15em;
+ border: 1px solid #9a9a9a;
+ border-top: none;
+ border-bottom: none;
+ vertical-align: top;
+}
+
+div .module-info div ol li a {
+ color: #a4a49c;
+}
/* Localized */
\ No newline at end of file
Modified:
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/thanks/index.html
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/thanks/index.html?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
---
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/thanks/index.html
(original)
+++
incubator/clerezza/site/trunk/src/main/resources/CLEREZZA-INF/web-resources/thanks/index.html
Mon Apr 18 16:20:51 2011
@@ -7,7 +7,7 @@
</head>
<body>
- <div class="header">
+ <div class="zz-header">
<div class="bar"></div>
<div class="logo">
<a href="../" style=""><img
src="../images/logo.png" alt="logo" /></a>
@@ -41,7 +41,7 @@
</li>
</ul>
</div>
- <div class="content">
+ <div class="zz-content">
<div class="column one-column">
<h1>Thanks</h1>
<p>To all who have helped to make Apache
Clerezza a reality. Specially we want to thank to:</p>
Modified: incubator/clerezza/site/trunk/src/main/scala/Activator.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/scala/Activator.scala?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
--- incubator/clerezza/site/trunk/src/main/scala/Activator.scala (original)
+++ incubator/clerezza/site/trunk/src/main/scala/Activator.scala Mon Apr 18
16:20:51 2011
@@ -16,7 +16,9 @@ import java.io.{FileOutputStream, FileIn
*/
class Activator extends BundleActivator {
- var renderletRegistration: ServiceRegistration = null
+ var renderletRegistration,
+ titledContentRenderletRegistration,
+ globalMenuRenderletRegistration: ServiceRegistration = null
var graphListenerOption: Option[GraphListener] = null
/**
@@ -29,6 +31,10 @@ class Activator extends BundleActivator
val renderlet = new HeadedPageRenderlet
renderletRegistration =
context.registerService(classOf[TypeRenderlet].getName,
renderlet, null)
+ titledContentRenderletRegistration =
context.registerService(classOf[TypeRenderlet].getName,
+
new TitledContentRenderlet, null)
+ globalMenuRenderletRegistration =
context.registerService(classOf[TypeRenderlet].getName,
+
new GlobalMenuRenderlet, null)
context.installBundle("mvn:org.apache.clerezza/rdf.stable.serializer").start();
context.installBundle("mvn:org.apache.clerezza/tools.offline").start();
val path = {
@@ -69,12 +75,15 @@ class Activator extends BundleActivator
*/
def stop(context: BundleContext) {
renderletRegistration.unregister()
+ titledContentRenderletRegistration.unregister()
+ globalMenuRenderletRegistration.unregister()
val servicesDsl = new ServicesDsl(context)
import servicesDsl._
val tcManager = $[TcManager]
val contentGraph =
tcManager.getMGraph(Constants.CONTENT_GRAPH_URI)
graphListenerOption match {
case Some(l) => contentGraph.removeGraphListener(l)
+ case None => ;
}
println("bye")
}
Added: incubator/clerezza/site/trunk/src/main/scala/GlobalMenuRenderlet.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/scala/GlobalMenuRenderlet.scala?rev=1094640&view=auto
==============================================================================
--- incubator/clerezza/site/trunk/src/main/scala/GlobalMenuRenderlet.scala
(added)
+++ incubator/clerezza/site/trunk/src/main/scala/GlobalMenuRenderlet.scala Mon
Apr 18 16:20:51 2011
@@ -0,0 +1,75 @@
+package org.apache.clerezza.site
+
+import javax.ws.rs.core.MediaType
+import org.apache.clerezza.platform.typerendering._
+import org.apache.clerezza.rdf.core.UriRef
+import org.apache.clerezza.rdf.utils.GraphNode
+import org.apache.clerezza.rdf.ontologies._
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.utils._
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import org.apache.clerezza.platform.typerendering.scala._
+import org.apache.clerezza.rdf.ontologies.DC
+
+/**
+ * A Renderlet for the menu
+ */
+class GlobalMenuRenderlet extends SRenderlet {
+
+ val getRdfType = RDFS.Resource
+
+ override def getModePattern = "menu"
+
+ override def renderedPage(arguments: XmlResult.Arguments) = {
+ new XmlResult(arguments) {
+ def menuLink(href: String, label: String) =
+ if ((res*).endsWith(href) ||
(res*).endsWith(href+"index")) {
+ <a href={href} class="active">{label}</a>
+ } else {
+ <a href={href}>{label}</a>
+ }
+ override def content = {
+ def menu(s: Any) = new
UriRef("http://clerezza.org/2009/11/global-menu#"+s)
+def rdfs(s: Any) = new UriRef("http://www.w3.org/2000/01/rdf-schema#"+s)
+def platform(s: Any) = new UriRef("http://clerezza.org/2009/08/platform#"+s)
+def dct(s: Any) = new UriRef("http://purl.org/dc/terms/"+s)
+
+resultDocModifier.addScriptReference("/style/scripts/login.js");
+
+
+<div class="column nav">
+ <ul>
+
+
+ {for (menuItem <- res/menu("globalMenu")!!) yield
+ <li class="top-nav-entry"><div class="title">
+ {
+ if ((menuItem/menu("path")).length > 0) {
+ <a
href={menuItem/menu("path")*}>{(menuItem/rdfs("label")*)}</a>
+ } else {
+ <a href="#" onclick="return
false">{(menuItem/rdfs("label")*)}</a>
+ }
+ }
+ </div>
+ {
+ ifx ((menuItem/menu("children")).length > 0) {
+ <div>
+ <ul class="nav-entries">
+ {
+ for (childMenuItem <-
menuItem/menu("children")!!) yield {
+ <li><a
href={childMenuItem/menu("path")*}>{childMenuItem/rdfs("label")*}</a><span>{childMenuItem/dct("description")*}</span></li>
+ }
+ }
+ </ul>
+ </div>
+ }
+ }
+ </li>
+ }
+ </ul>
+</div>
+ }
+ }
+ }
+
+}
Modified: incubator/clerezza/site/trunk/src/main/scala/HeadedPageRenderlet.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/scala/HeadedPageRenderlet.scala?rev=1094640&r1=1094639&r2=1094640&view=diff
==============================================================================
--- incubator/clerezza/site/trunk/src/main/scala/HeadedPageRenderlet.scala
(original)
+++ incubator/clerezza/site/trunk/src/main/scala/HeadedPageRenderlet.scala Mon
Apr 18 16:20:51 2011
@@ -16,9 +16,9 @@ import org.apache.clerezza.rdf.ontologie
*/
class HeadedPageRenderlet extends SRenderlet {
- val getRdfType = DISCOBITS.TitledContent
+ val getRdfType = PLATFORM.HeadedPage
- override def getModePattern = null
+ override def getModePattern = "(?!.*naked).*"
override def renderedPage(arguments: XmlResult.Arguments) = {
new XmlResult(arguments) {
@@ -29,107 +29,99 @@ class HeadedPageRenderlet extends SRende
<a href={href}>{label}</a>
}
override def content = {
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <link type="text/css"
href="/style/style.css" rel="stylesheet" />
-
{(res/DISCOBITS.contains).find(e => ((e/DISCOBITS.pos*) == "0")) match {
- case Some(e) =>
<title>{render(e/DISCOBITS.holds, "naked")}</title>
- case None =>
<title>An incomplete titled content {res/DISCOBITS.contains*}</title>
+
resultDocModifier.addStyleSheet("/style/style.css");
+resultDocModifier.addScriptReference("/jquery/jquery-1.3.2.min.js");
+/*resultDocModifier.addScriptReference("/jquery/jquery.menu.js");
+resultDocModifier.addScriptReference("/jquery/jquery.panel.js");
+resultDocModifier.addScriptReference("/style/scripts/panel.js");*/
+resultDocModifier.addScriptReference("/scripts/modification-status.js");
+resultDocModifier.addScriptReference("/scripts/status-message.js");
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ {(res/DISCOBITS.contains).find(e => ((e/DISCOBITS.pos*) ==
"0")) match {
+ case Some(e) =>
<title>{render(e/DISCOBITS.holds, "naked")}</title>
+ case None => <title>An incomplete titled
content {res/DISCOBITS.contains*}</title>
+ }
+ }
+ </head>
+ <body>
+ <div class="zz-header">
+ <div class="bar"></div>
+ <div class="logo">
+ <a href="http://incubator.apache.org/clerezza/"
style=""><img src="/images/logo.png" alt="logo" /></a>
+ </div>
+ <div class="module-info">
+ <span id="tx-module">
+ <div id="tx-page-actions">
+ <ol id="tx-page-actions-ol">
+ </ol>
+ </div>
+ </span>
+ <div id="tx-module-tabs">
+ <ol id="tx-module-tabs-ol">
+ </ol>
+
+ </div>
+ </div>
+
+ <div class="zz-control">
+ <div class="login">
+ {
+ def platform(s: Any) =
new UriRef("http://clerezza.org/2009/08/platform#"+s)
+ val username =
(context/platform("user")/platform("userName")*)
+
if((username).equals("anonymous")) {
+ <span>
+ <a
href="#" id="tx-login-button">login</a>
+ </span>
+ } else {
+ <span><a
href={"/user/" + username + "/control-panel"}>{username}</a>|<a
href="/logout">logout</a></span>
}
}
- </head>
- <body>
- <div class="header">
-
- <div class="bar"></div>
- <div class="logo">
- <a
href="http://incubator.apache.org/clerezza/" style=""><img
src="/images/logo.png" alt="logo" /></a>
- </div>
- </div>
- <div class="column nav">
- <ul>
- <li
class="top-nav-entry"><div class="title">Documentation</div>
-
- <ul
class="nav-entries">
-
<li>{menuLink("/getting-started/","Getting Started")}</li>
-
<li>{menuLink("/architecture/","The Apache Clerezza Stack")}</li>
-
<li><a href="http://incubator.apache.org/clerezza/mvn-site" target="_blank">API
docs</a></li>
-
<li>{menuLink("/faq/","FAQ")}</li>
- </ul>
- </li>
-
- <li
class="top-nav-entry"><div class="title">Project Infos</div>
- <ul
class="nav-entries">
-
<li>{menuLink("/downloads/","Downloads")}</li>
-
<li><a href="http://www.apache.org/licenses/" target="_blank">License</a></li>
-
<li>{menuLink("/mailinglists/","Mailing lists")}</li>
-
<li><a href="http://issues.apache.org/jira/browse/CLEREZZA"
target="_blank">Issue Tracker</a></li>
-
-
<li><a href="http://svn.apache.org/viewvc/incubator/clerezza/trunk/"
target="_blank">Source Repository</a></li>
- </ul>
- </li>
- <li
class="top-nav-entry"><div class="title">Sponsorship</div>
- <ul
class="nav-entries">
-
<li><a href="/thanks/">Thanks</a></li>
-
<li><a href="http://www.apache.org/foundation/sponsorship.html"
target="_blank">Become a Sponsor</a></li>
-
<li><a href="http://www.apache.org/foundation/buy_stuff.html"
target="_blank">Buy Stuff</a></li>
- </ul>
- </li>
- </ul>
- </div>
-
- <div class="content">
- {render(res, "naked")}
+ </div>
+ <div class="actions" id="tx-contextual-buttons">
+ <ol
id="tx-contextual-buttons-ol">
+ </ol>
+ </div>
+ <div id="tx-module-options">
+ <ol id="tx-module-options-ol">
+ </ol>
+ </div>
+
+
+ <div class="tx-panel" id="tx-panel">
+ <div id="tx-panel-title"><h3></h3></div>
+ <div class="tx-panel-window">
+ <div
class="tx-panel-tab-buttons" id="tx-panel-tab-buttons">
+ <ol
id="tx-panel-tab-buttons-ol">
+ </ol>
</div>
+ <div class="tx-panel-tabs"
id="tx-panel-tabs"></div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ {render(context,"menu")}
+ <div class="zz-content">
+ {
+ if (mode == null) {
+ render(res, "naked")
+ } else {
+ render(res, mode + "-naked")
+ }
+ }
+ </div>
<div class="footer">
<div class="logos"><img
src="/images/feather.png" /><img src="/images/sw-vert-w3c.png" /><img
src="/images/footer-logo.png" /></div>
<div
class="divider"></div>
<div class="dark">
- <div
class="sitemap">
- <div
class="sitemap-title">Sitemap</div>
- <div
class="sitemap-content">
-
<div class="sitemap-column">
-
<div class="title" >Documentation</div>
-
<ul>
-
-
<li><a href="/getting-started/">Getting Started</a></li>
-
<li><a href="/architecture/">The Apache Clerezza Stack</a></li>
-
<li><a href="http://incubator.apache.org/clerezza/mvn-site"
target="_blank">API docs</a></li>
-
<li><a href="/faq/">FAQ</a></li>
-
</ul>
-
-
</div>
-
<div class="sitemap-column">
-
-
<div class="title" >Project Infos</div>
-
<ul >
-
<li><a href="/downloads/">Downloads</a></li>
-
<li><a href="http://www.apache.org/licenses/"
target="_blank">License</a></li>
-
<li><a href="mailinglists/">Mailing lists</a></li>
-
<li><a href="http://issues.apache.org/jira/browse/CLEREZZA"
target="_blank">Issue Tracker</a></li>
-
-
<li><a
href="http://svn.apache.org/viewvc/incubator/clerezza/trunk/"
target="_blank">Source Repository</a></li>
-
</ul>
-
</div>
-
<div class="sitemap-column">
-
<div class="title" >Sponsorship</div>
-
<ul>
-
<li><a href="/thanks/">Thanks</a></li>
-
<li><a href="http://www.apache.org/foundation/sponsorship.html"
target="_blank">Become a Sponsor</a></li>
-
<li><a href="http://www.apache.org/foundation/buy_stuff.html"
target="_blank">Buy Stuff</a></li>
-
</ul>
-
</div>
- </div>
-
- </div>
<div
class="copyright">Apache Clerezza, Clerezza, Apache, the Apache feather logo,
and the Apache Clerezza project logo are trademarks of The Apache Software
Foundation. <br></br>© 2011 The Apache Software Foundation.</div>
</div>
</div>
-
-
- </body>
- </html>
+ </body>
+</html>
+
}
}
}
Added: incubator/clerezza/site/trunk/src/main/scala/TitledContentRenderlet.scala
URL:
http://svn.apache.org/viewvc/incubator/clerezza/site/trunk/src/main/scala/TitledContentRenderlet.scala?rev=1094640&view=auto
==============================================================================
--- incubator/clerezza/site/trunk/src/main/scala/TitledContentRenderlet.scala
(added)
+++ incubator/clerezza/site/trunk/src/main/scala/TitledContentRenderlet.scala
Mon Apr 18 16:20:51 2011
@@ -0,0 +1,137 @@
+package org.apache.clerezza.site
+
+import javax.ws.rs.core.MediaType
+import org.apache.clerezza.platform.typerendering._
+import org.apache.clerezza.rdf.core.UriRef
+import org.apache.clerezza.rdf.utils.GraphNode
+import org.apache.clerezza.rdf.ontologies._
+import org.apache.clerezza.rdf.core._
+import org.apache.clerezza.rdf.utils._
+import org.apache.clerezza.rdf.scala.utils.Preamble._
+import org.apache.clerezza.platform.typerendering.scala._
+import org.apache.clerezza.rdf.ontologies.DC
+
+/**
+ * A Renderlet for the menu
+ */
+class TitledContentRenderlet extends SRenderlet {
+
+ val getRdfType = DISCOBITS.TitledContent
+
+ override def getModePattern = null
+
+ override def renderedPage(arguments: XmlResult.Arguments) = {
+ new XmlResult(arguments) {
+ def menuLink(href: String, label: String) =
+ if ((res*).endsWith(href) ||
(res*).endsWith(href+"index")) {
+ <a href={href} class="active">{label}</a>
+ } else {
+ <a href={href}>{label}</a>
+ }
+ override def content = {
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <link type="text/css"
href="/style/style.css" rel="stylesheet" />
+
{(res/DISCOBITS.contains).find(e => ((e/DISCOBITS.pos*) == "0")) match {
+ case Some(e) =>
<title>{render(e/DISCOBITS.holds, "naked")}</title>
+ case None =>
<title>An incomplete titled content {res/DISCOBITS.contains*}</title>
+ }
+ }
+ </head>
+ <body>
+ <div class="zz-header">
+
+ <div class="bar"></div>
+ <div class="logo">
+ <a
href="http://incubator.apache.org/clerezza/" style=""><img
src="/images/logo.png" alt="logo" /></a>
+ </div>
+ </div>
+ <div class="column nav">
+ <ul>
+ <li
class="top-nav-entry"><div class="title">Documentation</div>
+
+ <ul
class="nav-entries">
+
<li>{menuLink("/getting-started/","Getting Started")}</li>
+
<li>{menuLink("/architecture/","The Apache Clerezza Stack")}</li>
+
<li><a href="http://incubator.apache.org/clerezza/mvn-site" target="_blank">API
docs</a></li>
+
<li>{menuLink("/faq/","FAQ")}</li>
+ </ul>
+ </li>
+
+ <li
class="top-nav-entry"><div class="title">Project Infos</div>
+ <ul
class="nav-entries">
+
<li>{menuLink("/downloads/","Downloads")}</li>
+
<li><a href="http://www.apache.org/licenses/" target="_blank">License</a></li>
+
<li>{menuLink("/mailinglists/","Mailing lists")}</li>
+
<li><a href="http://issues.apache.org/jira/browse/CLEREZZA"
target="_blank">Issue Tracker</a></li>
+
+
<li><a href="http://svn.apache.org/viewvc/incubator/clerezza/trunk/"
target="_blank">Source Repository</a></li>
+ </ul>
+ </li>
+ <li
class="top-nav-entry"><div class="title">Sponsorship</div>
+ <ul
class="nav-entries">
+
<li><a href="/thanks/">Thanks</a></li>
+
<li><a href="http://www.apache.org/foundation/sponsorship.html"
target="_blank">Become a Sponsor</a></li>
+
<li><a href="http://www.apache.org/foundation/buy_stuff.html"
target="_blank">Buy Stuff</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+
+ <div class="zz-content">
+ {render(res, "naked")}
+ </div>
+ <div class="footer">
+ <div class="logos"><img
src="/images/feather.png" /><img src="/images/sw-vert-w3c.png" /><img
src="/images/footer-logo.png" /></div>
+
+ <div
class="divider"></div>
+ <div class="dark">
+ <div
class="sitemap">
+ <div
class="sitemap-title">Sitemap</div>
+ <div
class="sitemap-content">
+
<div class="sitemap-column">
+
<div class="title" >Documentation</div>
+
<ul>
+
+
<li><a href="/getting-started/">Getting Started</a></li>
+
<li><a href="/architecture/">The Apache Clerezza Stack</a></li>
+
<li><a href="http://incubator.apache.org/clerezza/mvn-site"
target="_blank">API docs</a></li>
+
<li><a href="/faq/">FAQ</a></li>
+
</ul>
+
+
</div>
+
<div class="sitemap-column">
+
+
<div class="title" >Project Infos</div>
+
<ul >
+
<li><a href="/downloads/">Downloads</a></li>
+
<li><a href="http://www.apache.org/licenses/"
target="_blank">License</a></li>
+
<li><a href="mailinglists/">Mailing lists</a></li>
+
<li><a href="http://issues.apache.org/jira/browse/CLEREZZA"
target="_blank">Issue Tracker</a></li>
+
+
<li><a
href="http://svn.apache.org/viewvc/incubator/clerezza/trunk/"
target="_blank">Source Repository</a></li>
+
</ul>
+
</div>
+
<div class="sitemap-column">
+
<div class="title" >Sponsorship</div>
+
<ul>
+
<li><a href="/thanks/">Thanks</a></li>
+
<li><a href="http://www.apache.org/foundation/sponsorship.html"
target="_blank">Become a Sponsor</a></li>
+
<li><a href="http://www.apache.org/foundation/buy_stuff.html"
target="_blank">Buy Stuff</a></li>
+
</ul>
+
</div>
+ </div>
+
+ </div>
+ <div
class="copyright">Apache Clerezza, Clerezza, Apache, the Apache feather logo,
and the Apache Clerezza project logo are trademarks of The Apache Software
Foundation. <br></br>© 2011 The Apache Software Foundation.</div>
+ </div>
+ </div>
+
+
+ </body>
+ </html>
+ }
+ }
+ }
+
+}