This is an automated email from the ASF dual-hosted git repository.
snoopdave pushed a commit to branch bootstrap-ui
in repository https://gitbox.apache.org/repos/asf/roller.git
The following commit(s) were added to refs/heads/bootstrap-ui by this push:
new 38f9568 More UI polish, also updated theme previews.
38f9568 is described below
commit 38f956848eda286d21a03d1a496533e99dfb984f
Author: Dave Johnson <[email protected]>
AuthorDate: Sun Jan 20 16:52:24 2019 -0500
More UI polish, also updated theme previews.
---
.../business/themes/SharedThemeFromDir.java | 3 +--
.../business/themes/ThemeManagerImpl.java | 6 ++----
app/src/main/resources/struts.xml | 2 +-
app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp | 2 ++
.../main/webapp/WEB-INF/jsps/editor/ThemeEdit.jsp | 5 +++--
app/src/main/webapp/WEB-INF/jsps/tiles/head.jsp | 1 +
app/src/main/webapp/themes/basic/basic-preview.png | Bin 85441 -> 263513 bytes
app/src/main/webapp/themes/basic/theme.xml | 19 +++++++++++++++-
.../webapp/themes/basicmobile/basic-preview.png | Bin 86498 -> 0 bytes
.../themes/basicmobile/basicmobile-preview.png | Bin 0 -> 263910 bytes
app/src/main/webapp/themes/basicmobile/theme.xml | 21 ++++++++++++++++--
.../webapp/themes/fauxcoly/fauxcoly-preview.png | Bin 0 -> 264191 bytes
.../themes/fauxcoly/images/fauxcoly-preview.png | Bin 83656 -> 0 bytes
app/src/main/webapp/themes/fauxcoly/theme.xml | 19 +++++++++++++++-
.../webapp/themes/frontpage/frontpage-preview.png | Bin 0 -> 361014 bytes
app/src/main/webapp/themes/frontpage/theme.xml | 21 ++++++++++++++++--
app/src/main/webapp/themes/gaurav/entry.vm | 5 -----
.../main/webapp/themes/gaurav/gaurav-preview.png | Bin 0 -> 222735 bytes
.../webapp/themes/gaurav/images/theme-gaurav.png | Bin 75585 -> 0 bytes
app/src/main/webapp/themes/gaurav/theme.xml | 19 +++++++++++++++-
app/src/main/webapp/themes/gaurav/weblog.vm | 24 +++++++++++----------
.../examples/rollerapi/roller-custom.properties | 6 ++++--
22 files changed, 119 insertions(+), 34 deletions(-)
diff --git
a/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
b/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
index 061f17b..cc872d1 100644
---
a/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
+++
b/app/src/main/java/org/apache/roller/weblogger/business/themes/SharedThemeFromDir.java
@@ -194,8 +194,7 @@ public class SharedThemeFromDir extends SharedTheme {
setEnabled(true);
// load resource representing preview image
- File previewFile = new File(this.themeDir + File.separator
- + themeMetadata.getPreviewImage());
+ File previewFile = new File(this.themeDir + File.separator +
themeMetadata.getPreviewImage());
if (!previewFile.exists() || !previewFile.canRead()) {
log.warn("Couldn't read theme [" + this.getName()
+ "] preview image file ["
diff --git
a/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
b/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
index 4f6367c..a90ec10 100644
---
a/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
+++
b/app/src/main/java/org/apache/roller/weblogger/business/themes/ThemeManagerImpl.java
@@ -157,8 +157,7 @@ public class ThemeManagerImpl implements ThemeManager {
// otherwise we are returning a WeblogSharedTheme
} else {
- SharedTheme staticTheme = (SharedTheme)
this.themes.get(weblog
- .getEditorTheme());
+ SharedTheme staticTheme = (SharedTheme)
this.themes.get(weblog.getEditorTheme());
if (staticTheme != null) {
weblogTheme = new WeblogSharedTheme(weblog,
staticTheme);
} else {
@@ -394,8 +393,7 @@ public class ThemeManagerImpl implements ThemeManager {
// now go through each theme and load it into a Theme object
for (String themeName : themenames) {
try {
- SharedTheme theme = new SharedThemeFromDir(this.themeDir
- + File.separator + themeName);
+ SharedTheme theme = new SharedThemeFromDir(this.themeDir +
File.separator + themeName);
themeMap.put(theme.getId(), theme);
log.info("Loaded theme '" + themeName + "'");
} catch (Exception unexpected) {
diff --git a/app/src/main/resources/struts.xml
b/app/src/main/resources/struts.xml
index 24e3530..fa333e3 100644
--- a/app/src/main/resources/struts.xml
+++ b/app/src/main/resources/struts.xml
@@ -137,7 +137,7 @@
class="org.apache.roller.weblogger.ui.struts2.core.Profile">
<result name="input" type="tiles">.Profile</result>
<result name="cancel" type="redirectAction">menu</result>
- <result name="success" type="tiles">.Profile</result>
+ <result name="success" type="tiles">.MainMenu</result>
</action>
<action name="oauthKeys"
diff --git a/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
b/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
index 7d9b9f9..2f91d01 100644
--- a/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/core/Profile.jsp
@@ -86,6 +86,8 @@
</s:form>
+<%-- -------------------------------------------------------- --%>
+
<script type="text/javascript">
var saveButton;
diff --git a/app/src/main/webapp/WEB-INF/jsps/editor/ThemeEdit.jsp
b/app/src/main/webapp/WEB-INF/jsps/editor/ThemeEdit.jsp
index 8623cc7..dac1ec8 100644
--- a/app/src/main/webapp/WEB-INF/jsps/editor/ThemeEdit.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/editor/ThemeEdit.jsp
@@ -89,7 +89,7 @@
onchange="proposeSharedThemeChange(this[selectedIndex].value)"/>
</p>
<p><s:text name="themeEditor.thisTheme"/> <p id="themeDescription"></p>
- <p><img id="themeThumbnail" src=""/></p>
+ <p><img id="themeThumbnail" src="" class="img-responsive
img-thumbnail" style="max-width: 30em" /></p>
</div>
@@ -247,7 +247,8 @@
url: "<s:url value='themedata'/>",
data: {theme: themeId}, success: function (data) {
$('#themeDescription').html(data.description);
- $('#themeThumbnail').attr('src', '<s:property value="siteURL"
/>' + data.previewPath);
+ thumbnail = $('#themeThumbnail');
+ thumbnail.attr('src', '<s:property value="siteURL" />' +
data.previewPath);
}
});
}
diff --git a/app/src/main/webapp/WEB-INF/jsps/tiles/head.jsp
b/app/src/main/webapp/WEB-INF/jsps/tiles/head.jsp
index 4c2b22d..8d10e2d 100644
--- a/app/src/main/webapp/WEB-INF/jsps/tiles/head.jsp
+++ b/app/src/main/webapp/WEB-INF/jsps/tiles/head.jsp
@@ -20,5 +20,6 @@ You can override it with your own file via
WEB-INF/tiles-def.xml
<link href="<s:url value='/webjars/summernote/0.8.11/dist/summernote.css' />"
rel="stylesheet" />
<link rel="stylesheet" media="all" href='<s:url
value="/roller-ui/styles/roller.css"/>' />
+
<script src="<s:url value="/theme/scripts/roller.js"/>"></script>
diff --git a/app/src/main/webapp/themes/basic/basic-preview.png
b/app/src/main/webapp/themes/basic/basic-preview.png
index c7e0335..b062dd5 100644
Binary files a/app/src/main/webapp/themes/basic/basic-preview.png and
b/app/src/main/webapp/themes/basic/basic-preview.png differ
diff --git a/app/src/main/webapp/themes/basic/theme.xml
b/app/src/main/webapp/themes/basic/theme.xml
index 3300988..5dbf55f 100644
--- a/app/src/main/webapp/themes/basic/theme.xml
+++ b/app/src/main/webapp/themes/basic/theme.xml
@@ -1,9 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. 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. For additional information regarding
+ copyright in this work, please see the NOTICE file in the top level
+ directory of this distribution.
+-->
<weblogtheme>
<id>basic</id>
<name>Basic</name>
- <description>Offers wide margins for blogging programming language source
code.</description>
+ <description>Super-simple blog theme useful for understanding Roller
templates.</description>
<author>Roller Weblogger</author>
<!-- theme preview image -->
diff --git a/app/src/main/webapp/themes/basicmobile/basic-preview.png
b/app/src/main/webapp/themes/basicmobile/basic-preview.png
deleted file mode 100644
index d705687..0000000
Binary files a/app/src/main/webapp/themes/basicmobile/basic-preview.png and
/dev/null differ
diff --git a/app/src/main/webapp/themes/basicmobile/basicmobile-preview.png
b/app/src/main/webapp/themes/basicmobile/basicmobile-preview.png
new file mode 100644
index 0000000..a86bd22
Binary files /dev/null and
b/app/src/main/webapp/themes/basicmobile/basicmobile-preview.png differ
diff --git a/app/src/main/webapp/themes/basicmobile/theme.xml
b/app/src/main/webapp/themes/basicmobile/theme.xml
index 59451f5..210ffe9 100644
--- a/app/src/main/webapp/themes/basicmobile/theme.xml
+++ b/app/src/main/webapp/themes/basicmobile/theme.xml
@@ -1,16 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. 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. For additional information regarding
+ copyright in this work, please see the NOTICE file in the top level
+ directory of this distribution.
+-->
<weblogtheme>
<id>basicmobile</id>
<name>Basic Mobile</name>
- <description>Offers wide margins for blogging programming language source
code and a separate button for mobile viewing.</description>
+ <description>Sample as Basic theme but with mobile blogging
built-in.</description>
<author>Roller Weblogger</author>
<!-- dualTheme: Maintain separate mobile & standard templates and
stylesheets, default false,
not needed with responsive themes or where multi-device support is
not a concern. -->
<dualTheme>true</dualTheme>
<!-- theme preview image -->
- <preview-image path="basic-preview.png" />
+ <preview-image path="basicmobile-preview.png" />
<!-- stylesheet -->
<stylesheet>
diff --git a/app/src/main/webapp/themes/fauxcoly/fauxcoly-preview.png
b/app/src/main/webapp/themes/fauxcoly/fauxcoly-preview.png
new file mode 100644
index 0000000..bba1b3d
Binary files /dev/null and
b/app/src/main/webapp/themes/fauxcoly/fauxcoly-preview.png differ
diff --git a/app/src/main/webapp/themes/fauxcoly/images/fauxcoly-preview.png
b/app/src/main/webapp/themes/fauxcoly/images/fauxcoly-preview.png
deleted file mode 100644
index e703259..0000000
Binary files a/app/src/main/webapp/themes/fauxcoly/images/fauxcoly-preview.png
and /dev/null differ
diff --git a/app/src/main/webapp/themes/fauxcoly/theme.xml
b/app/src/main/webapp/themes/fauxcoly/theme.xml
index 0748bbc..b92069c 100644
--- a/app/src/main/webapp/themes/fauxcoly/theme.xml
+++ b/app/src/main/webapp/themes/fauxcoly/theme.xml
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. 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. For additional information regarding
+ copyright in this work, please see the NOTICE file in the top level
+ directory of this distribution.
+-->
<weblogtheme>
<!-- YUI Grid based Roller theme -->
@@ -9,7 +26,7 @@
<description>Theme built on the Yahoo! User Interface (YUI)
library.</description>
<!-- theme preview image -->
- <preview-image path="images/fauxcoly-preview.png" />
+ <preview-image path="fauxcoly-preview.png" />
<!-- stylesheet -->
<stylesheet>
diff --git a/app/src/main/webapp/themes/frontpage/frontpage-preview.png
b/app/src/main/webapp/themes/frontpage/frontpage-preview.png
new file mode 100644
index 0000000..42a8348
Binary files /dev/null and
b/app/src/main/webapp/themes/frontpage/frontpage-preview.png differ
diff --git a/app/src/main/webapp/themes/frontpage/theme.xml
b/app/src/main/webapp/themes/frontpage/theme.xml
index 1ac183a..03ab8ee 100644
--- a/app/src/main/webapp/themes/frontpage/theme.xml
+++ b/app/src/main/webapp/themes/frontpage/theme.xml
@@ -1,13 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. 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. For additional information regarding
+ copyright in this work, please see the NOTICE file in the top level
+ directory of this distribution.
+-->
<weblogtheme>
<id>frontpage</id>
<name>Frontpage</name>
- <description>Not a standard blog template; meant only as a front page
accumulator of all blogs hosted by this server.</description>
+ <description>Theme for aggregated front-page of large multi-blog
site.</description>
<author>Dave Johnson</author>
<!-- theme preview image -->
- <preview-image path="sm-theme-frontpage.png" />
+ <preview-image path="frontpage-preview.png" />
<!-- templates -->
<template action="weblog">
diff --git a/app/src/main/webapp/themes/gaurav/entry.vm
b/app/src/main/webapp/themes/gaurav/entry.vm
index a71a157..28cd54f 100755
--- a/app/src/main/webapp/themes/gaurav/entry.vm
+++ b/app/src/main/webapp/themes/gaurav/entry.vm
@@ -249,11 +249,6 @@
</tbody></table>
</div>
<div class="well">
- <p class="details">
- This is just one entry in the weblog
<b>$model.weblog.name</b>.
- Why don't you <a href="$url.home">visit
the main page</a> of the weblog?</p>
- </div>
- <div class="well">
<h3>Related entries</h3>
#set($recentInCat =
$model.weblog.getRecentWeblogEntries($model.weblogEntry.category.name, 20))
<ul>#foreach($recentEntry in
$recentInCat)
diff --git a/app/src/main/webapp/themes/gaurav/gaurav-preview.png
b/app/src/main/webapp/themes/gaurav/gaurav-preview.png
new file mode 100644
index 0000000..ffd840d
Binary files /dev/null and
b/app/src/main/webapp/themes/gaurav/gaurav-preview.png differ
diff --git a/app/src/main/webapp/themes/gaurav/images/theme-gaurav.png
b/app/src/main/webapp/themes/gaurav/images/theme-gaurav.png
deleted file mode 100644
index 0e3b062..0000000
Binary files a/app/src/main/webapp/themes/gaurav/images/theme-gaurav.png and
/dev/null differ
diff --git a/app/src/main/webapp/themes/gaurav/theme.xml
b/app/src/main/webapp/themes/gaurav/theme.xml
index 0853e3a..7588cb6 100755
--- a/app/src/main/webapp/themes/gaurav/theme.xml
+++ b/app/src/main/webapp/themes/gaurav/theme.xml
@@ -1,4 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. 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. For additional information regarding
+ copyright in this work, please see the NOTICE file in the top level
+ directory of this distribution.
+-->
<weblogtheme>
<!-- Bootstrap based Roller theme -->
@@ -9,7 +26,7 @@
<author>Gaurav Saini</author>
<!-- theme preview image -->
- <preview-image path="images/theme-gaurav.png" />
+ <preview-image path="gaurav-preview.png" />
<!-- stylesheet -->
<stylesheet>
diff --git a/app/src/main/webapp/themes/gaurav/weblog.vm
b/app/src/main/webapp/themes/gaurav/weblog.vm
index 5dec80b..bb85c4e 100755
--- a/app/src/main/webapp/themes/gaurav/weblog.vm
+++ b/app/src/main/webapp/themes/gaurav/weblog.vm
@@ -60,18 +60,20 @@
<a
href="$url.feed.entries.atom">Subscribe to this blog</a>
</div>
</div>
- <div class="well">
- #set($mytags = $model.weblog.getPopularTags(-1, 30))
- #if ($mytags && $mytags.size() > 4)
- <h3>Hot tags</h3>
- <p class="details">Below are the most often used tags
in the blog. Hover over a tag to see a count of entries, click a tag to see the
most recent posts with the tag.</p>
- <div id="tagcloud">
- #foreach ($tag in $mytags)
- <a class="tag s${tag.intensity}"
href="$url.tag($tag.name)" title="$tag.count">$tag.name</a>
- #end
- </div>
- #end
+ #if ($mytags && $mytags.size() > 4)
+ <div class="well">
+ #set($mytags = $model.weblog.getPopularTags(-1, 30))
+ <h3>Hot tags</h3>
+ <p class="details">Below are the most often used
tags in the blog.
+ Hover over a tag to
see a count of entries, click a tag to see
+ the most recent
posts with the tag.</p>
+ <div id="tagcloud">
+ #foreach ($tag in $mytags)
+ <a class="tag s${tag.intensity}"
href="$url.tag($tag.name)" title="$tag.count">$tag.name</a>
+ #end
+ </div>
</div>
+ #end
</div> <!-- close sidebar_content -->
</div> <!-- /.row -->
</div> <!-- /.container -->
diff --git
a/docs/examples/scripting/groovy/examples/rollerapi/roller-custom.properties
b/docs/examples/scripting/groovy/examples/rollerapi/roller-custom.properties
index 202603d..924f7a8 100644
--- a/docs/examples/scripting/groovy/examples/rollerapi/roller-custom.properties
+++ b/docs/examples/scripting/groovy/examples/rollerapi/roller-custom.properties
@@ -1,10 +1,12 @@
database.configurationType=jdbc
-database.jdbc.driverClass=com.mysql.jdbc.Driver
-database.jdbc.connectionURL=jdbc:mysql://localhost/roller520new?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf&useFastDateParsing=false
+database.jdbc.driverClass=org.postgresql.Driver
+database.jdbc.connectionURL=jdbc:postgresql://localhost/rollerdb
database.jdbc.username=scott
database.jdbc.password=tiger
log4j.category.org.apache.roller=DEBUG
+log4j.appender.roller.File=./logs/roller.log
+
themes.dir=.
\ No newline at end of file