Anonymous avatar Anonymous committed b3100d1

Updating templates to work with generic skins

Comments (0)

Files changed (6)

chempound-webapi/src/main/java/net/chempound/webapp/output/AbstractSplashPageWriter.java

         final Class<? extends Resource> type = getResourceType();
         final Resource item = model.getResource(aggregationUri.toString()).as(type);
         page.addParam("aggregation", item);
-        page.addParam("_", item);
+        page.addParam("__", item);
     }
 
 }

chempound-webapp/src/main/java/net/chempound/webapp/search/SearchResource.java

         final List<SearchProvider> providers = searchProviderRegistry.getSearchProviderList();
         model.put("providers", providers);
         model.put("headers", Arrays.asList(
-                "<script src='/plugins/jquery/jquery-1.4.2.js' type='text/javascript'></script>",
-                "<script src='/plugins/jquery/jquery-ui-1.8.14.min.js' type='text/javascript'></script>",
-                "<link href='/plugins/jquery/smoothness/jquery-ui-1.8.14.css' rel='stylesheet' type='text/css' />"
+                "    <script src='/plugins/jquery/jquery-1.4.2.js' type='text/javascript'></script>\n",
+                "    <script src='/plugins/jquery/jquery-ui-1.8.14.min.js' type='text/javascript'></script>\n",
+                "    <link href='/plugins/jquery/smoothness/jquery-ui-1.8.14.css' rel='stylesheet' type='text/css'/>\n"
         ));
         final Template template = freemarker.getTemplate("search-form.ftl");
         return new TemplateRepresentation(template, model, MediaType.TEXT_HTML);

chempound-webapp/src/main/resources/net/chempound/skin/default/resources/default.css

     border-color: gray;
     background-color: white;
     /*-moz-border-radius: ;*/
-}
+}

chempound-webapp/src/main/resources/net/chempound/templates/search-form.ftl

 
 <h1>Search Data</h1>
 
-<div id="tabs">
+<div id="search-tabs">
 
     <ul>
 <#list providers as provider>
 </div>
 
 <script type="text/javascript">
+(function($){
     $(function() {
-		$("#tabs").tabs();
-	});
+        $("#search-tabs").tabs();
+    });
+})(jQuery);
 </script>
 
 </@layout.page>

chempound-webapp/src/main/resources/net/chempound/templates/sparql-form.ftl

 >
 
 <h1>SPARQL Query</h1>
-<form action="${URI_BASE}/sparql/" method="get">
+<form action="${URI_BASE}/sparql/" method="get" class="sparql">
 <textarea name="query" rows="20" cols="120">PREFIX rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt;
 PREFIX dct: &lt;http://purl.org/dc/terms/&gt;
 PREFIX foaf: &lt;http://xmlns.com/foaf/0.1/&gt;

chempound-webapp/src/main/resources/net/chempound/web/css/chempound.css

-a {
-    text-decoration: none;
-}
-a:hover {
-    text-decoration: underline;
-}
-
-.content {
-    max-width: 980px;
-    margin-left: auto;
-    margin-right: auto;
-}
-
-html, body {
-    margin: 0;
-    padding: 0;
-    background-color: #464646;
-}
-h1 {
-    margin: 0;
-}
-
-body {
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-}
-
-html header {
-    background-color: #464646;
-    color: #ffffff;
-    height: 80px;
-}
-html header h1 {
-    margin: 0;
-    padding: 15px;
-    font-size: 24pt;
-}
-
-article {
-    background-color: #ffffff;
-    color: #444444;
-    padding: 1em 1em 2em 1em;
-    clear: both;
-}
-article h1 {
-    font-size: 18pt;
-    padding: 10px 10px 30px 10px;
-}
-
-footer {
-    clear: both;
-}
-
-dl.bib dt {
-    clear: left;
-    float: left;
-    font-weight: bold;
-    width: 140px;
-    margin: 0;
-    padding: 5px;
-}
-dl.bib dd {
-    float: left;
-    width: 360px;
-    margin: 0;
-    padding: 5px;
-}
-
-ul.files {
-    padding: 0;
-}
-ul.files li {
-    background-color: #c0ffc0;
-    width: 420px;
-    padding: 4px 8px;
-    margin: 2px;
-    list-style: none;
-}
 
 .clear {
     clear: both;
 }
 
-article h2 {
-    font-size: 16pt;
-    padding-top: 1em;
+form.sparql textarea {
+    width: 100%;
 }
 
-nav {
-    background-color: #888888;
-    font-weight: bold;
-	margin: 0;
-	padding: 0;
-}
 
-nav a.first {
-    border: none;
-}
-
-nav ul {
-    float: left;
-    list-style: none outside none;
-    line-height: 1.5em;
-	margin: 0;
-	padding: 0.2em 1em;
-}
-
-nav ul li {
-    float: left;
-    display: block;
-}
-
-nav ul li a {
-    display: block;
-    color: #222266;
-    padding: 4px 10px;
-    border-left: 2px solid black;
-}
-
-
-
-div.right {
-    float: right;
-    width: 400px;
-    height: 400px;
-    background: #d0d0d0;
-    padding: 0;
-    margin: 0;
-}
-
-div#image {
-    height: 400px;
-    background: #e0e0e0;
-}
-
-article div.result h2 {
+div.result h2 {
     font-size: 13pt;
+    line-height: 20px;
     margin: 0;
     padding: 4px;
 }
     background: #f0f0f0;
     margin: 3px;
 }
+
 div.result {
 
 }
     padding: 4px;
     border: none;
 }
-
-div.sparql-results table {
-    background: white;
-}
-
-div.resource {
-    background: #c0f0c0;
-    margin: 3px;
-}
-
-div.resource h2, div.resource p {
-    margin: 4px;
-    padding: 2px;
-}
-
-    dl.identifier dt {
-        clear: left;
-        float: left;
-        font-weight: bold;
-        width: 100px;
-        margin: 0;
-        padding: 5px;
-    }
-    dl.identifier dd {
-        float: left;
-        width: 800px;
-        margin: 0;
-        padding: 5px;
-        word-wrap: break-word;
-    }
-    dl.identifier dt {
-        color: #808080;
-        font-size: small;
-    }
-
-    dl.identifier dd {
-        color: #a0a0a0;
-        font-size: small;
-    }
-
-a img {
-    border: none;
-    vertical-align: middle;
-}
-
-
-div.license h3 {
-    font-size: 13pt;
-}
-
-div.license p {
-    font-size: 10pt;
-}
-
-
-p.uri {
-    color: #606060;
-    font-size: small;
-    margin-top: 0;
-    margin-bottom: 0;
-    padding-top: 6px;
-    padding-botton: 12px;
-}
-
-p.uri b {
-    color: #808080;
-}
-
-p.uri a {
-    color: inherit;
-}
-
-
-div.search p label {
-    text-align: right;
-    float: left;
-    width: 250px;
-}
-div.search p input {
-    margin-left: 12px;
-    width: 350px;
-}
-
-
-table.sparql-results {
-    border-width: 1px;
-    border-spacing: 2px;
-    border-style: outset;
-    border-color: gray;
-    border-collapse: collapse;
-    background-color: white;
-}
-table.sparql-results th {
-    border-width: 1px;
-    padding: 2px;
-    border-style: outset;
-    border-color: gray;
-    background-color: white;
-    /*-moz-border-radius: ;*/
-}
-table.sparql-results td {
-    border-width: 1px;
-    padding: 2px;
-    border-style: outset;
-    border-color: gray;
-    background-color: white;
-    /*-moz-border-radius: ;*/
-}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.