You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2013/03/27 13:41:47 UTC
git commit: allowed to push custom css through the configuration
Updated Branches:
refs/heads/master 20f81cf92 -> 44b66a19a
allowed to push custom css through the configuration
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/44b66a19
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/44b66a19
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/44b66a19
Branch: refs/heads/master
Commit: 44b66a19ad6ab26849c9c6c88f637c28b0662c75
Parents: 20f81cf
Author: Sergio Fernández <wi...@apache.org>
Authored: Wed Mar 27 13:25:40 2013 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Wed Mar 27 13:25:40 2013 +0100
----------------------------------------------------------------------
.../platform/core/rio/RDFHtmlWriterImpl.java | 1 +
.../services/templating/TemplatingServiceImpl.java | 3 +-
.../resource/ResourceWebServiceHelper.java | 1 +
.../src/main/resources/templates/404.ftl | 3 +-
.../src/main/resources/templates/admin.ftl | 1 +
.../src/main/resources/templates/rdfhtml.ftl | 1 +
.../main/resources/web/public/style/marmotta.css | 18 +++++++++++++++
.../src/main/resources/web/public/style/style.css | 1 +
8 files changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
index a5f419d..321dd22 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/rio/RDFHtmlWriterImpl.java
@@ -219,6 +219,7 @@ public class RDFHtmlWriterImpl implements RDFHtmlWriter {
String project = configurationService.getStringConfiguration("kiwi.pages.project", "marmotta");
data.put("PROJECT", project);
data.put("LOGO", configurationService.getStringConfiguration("kiwi.pages.project."+project+".logo", project+".png"));
+ data.put("CSS", configurationService.getStringConfiguration("kiwi.pages.project."+project+".css", "core/public/style/"+project+".css"));
data.put("FOOTER", configurationService.getStringConfiguration("kiwi.pages.project."+project+".footer", "(footer not properly configured for project "+project+")"));
data.put("DEFAULT_STYLE", configurationService.getStringConfiguration("kiwi.pages.style", "marmotta"));
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
index 01aa8db..09f0e2e 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/templating/TemplatingServiceImpl.java
@@ -123,7 +123,7 @@ public class TemplatingServiceImpl implements TemplatingService {
datamodel.put("MODULE_MENU",menu.menuItems);
datamodel.put("DEFAULT_STYLE", configurationService.getStringConfiguration("kiwi.pages.style", DEFAULT_STYLE));
datamodel.put("CURRENT_TITLE", getNameFromPath(path));
- datamodel.put("CURRENT_MODULE",module);
+ datamodel.put("CURRENT_MODULE", module);
try {
String s = new String(bytes);
Matcher m = PATTERN.matcher(s);
@@ -162,6 +162,7 @@ public class TemplatingServiceImpl implements TemplatingService {
String project = configurationService.getStringConfiguration("kiwi.pages.project", DEFAULT_PROJECT);
basic_map.put("PROJECT", project);
basic_map.put("LOGO", configurationService.getStringConfiguration("kiwi.pages.project."+project+".logo", project+".png"));
+ basic_map.put("CSS", configurationService.getStringConfiguration("kiwi.pages.project."+project+".css", "core/public/style/"+project+".css"));
basic_map.put("FOOTER", configurationService.getStringConfiguration("kiwi.pages.project."+project+".footer", "(footer not properly configured for project "+project+")"));
menu = new Menu();
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
index a56a667..cf23571 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/webservices/resource/ResourceWebServiceHelper.java
@@ -146,6 +146,7 @@ public class ResourceWebServiceHelper {
String project = configurationService.getStringConfiguration("kiwi.pages.project", "marmotta");
data.put("PROJECT", project);
data.put("LOGO", configurationService.getStringConfiguration("kiwi.pages.project."+project+".logo", project+".png"));
+ data.put("CSS", configurationService.getStringConfiguration("kiwi.pages.project."+project+".css", "core/public/style/"+project+".css"));
data.put("FOOTER", configurationService.getStringConfiguration("kiwi.pages.project."+project+".footer", "(footer not properly configured for project "+project+")"));
data.put("DEFAULT_STYLE", configurationService.getStringConfiguration("kiwi.pages.style", "marmotta"));
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/resources/templates/404.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/404.ftl b/platform/marmotta-core/src/main/resources/templates/404.ftl
index a81d1ba..fd65ca4 100644
--- a/platform/marmotta-core/src/main/resources/templates/404.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/404.ftl
@@ -29,7 +29,8 @@
<script src="${SERVER_URL}core/public/js/lib/jquery-1.7.2.js" type="text/javascript" ></script>
<link href="${SERVER_URL}core/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/scheme/blue.css" title="blue" rel="stylesheet" type="text/css" />
- <link href="${SERVER_URL}core/public/style/scheme/dark.css" title="dark" rel="alternate stylesheet" type="text/css" />
+ <link href="${SERVER_URL}core/public/style/scheme/dark.css" title="dark" rel="alternate stylesheet" type="text/css" />
+ <link href="${SERVER_URL}${CSS}" title="${DEFAULT_STYLE}" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/rdfhtml.css" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/404.css" rel="stylesheet" type="text/css" />
</head>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/resources/templates/admin.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/admin.ftl b/platform/marmotta-core/src/main/resources/templates/admin.ftl
index 6be7d6b..75c06b7 100644
--- a/platform/marmotta-core/src/main/resources/templates/admin.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/admin.ftl
@@ -30,6 +30,7 @@
<link href="${SERVER_URL}core/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/scheme/blue.css" title="blue" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/scheme/dark.css" title="dark" rel="alternate stylesheet" type="text/css" />
+ <link href="${SERVER_URL}${CSS}" title="${DEFAULT_STYLE}" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/img/icon/lmf.ico" rel="SHORTCUT ICON">
<script type="text/javascript">
var _BASIC_URL = "${BASIC_URL}";
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl b/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
index 0c00297..cffe4cd 100644
--- a/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
+++ b/platform/marmotta-core/src/main/resources/templates/rdfhtml.ftl
@@ -28,6 +28,7 @@
<link href="${SERVER_URL}core/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/scheme/blue.css" title="blue" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/scheme/dark.css" title="dark" rel="alternate stylesheet" type="text/css" />
+ <link href="${SERVER_URL}${CSS}" title="${DEFAULT_STYLE}" rel="stylesheet" type="text/css" />
<link href="${SERVER_URL}core/public/style/rdfhtml.css" rel="stylesheet" type="text/css" />
<script>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/resources/web/public/style/marmotta.css
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/public/style/marmotta.css b/platform/marmotta-core/src/main/resources/web/public/style/marmotta.css
new file mode 100644
index 0000000..ff1ca81
--- /dev/null
+++ b/platform/marmotta-core/src/main/resources/web/public/style/marmotta.css
@@ -0,0 +1,18 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed 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.
+ */
+
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/44b66a19/platform/marmotta-core/src/main/resources/web/public/style/style.css
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/web/public/style/style.css b/platform/marmotta-core/src/main/resources/web/public/style/style.css
index 8ce81a3..e9b0254 100644
--- a/platform/marmotta-core/src/main/resources/web/public/style/style.css
+++ b/platform/marmotta-core/src/main/resources/web/public/style/style.css
@@ -15,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
/* main */
html,body {
margin:0;