You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by sk...@apache.org on 2023/07/18 12:54:37 UTC
[netbeans-website] branch master updated: bit more human looking page for blog
This is an automated email from the ASF dual-hosted git repository.
skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-website.git
The following commit(s) were added to refs/heads/master by this push:
new 788105ec6 bit more human looking page for blog
new cf52329d5 Merge pull request #661 from ebarboni/formerblog
788105ec6 is described below
commit 788105ec67517e3734f7082b88109177ad7911f1
Author: Eric Barboni <sk...@apache.org>
AuthorDate: Tue Jul 18 14:17:35 2023 +0200
bit more human looking page for blog
---
.../src/content/scss/common/_netbeans.scss | 16 ++++
.../src/content/templates/blogentry.gsp | 2 +-
.../src/content/templates/blogindex.gsp | 99 +++++++++++-----------
3 files changed, 66 insertions(+), 51 deletions(-)
diff --git a/netbeans.apache.org/src/content/scss/common/_netbeans.scss b/netbeans.apache.org/src/content/scss/common/_netbeans.scss
index 410e603fd..ceb8b8a14 100644
--- a/netbeans.apache.org/src/content/scss/common/_netbeans.scss
+++ b/netbeans.apache.org/src/content/scss/common/_netbeans.scss
@@ -351,3 +351,19 @@ kbd {
box-shadow: 0 1px 3px rgb(0, 0, 0),0 1px 2px rgba(0,0,0,0.24);
font-size: 95%;
}
+
+.blogdate {
+ margin-top:20px;
+ border-bottom: black 1px dashed;
+}
+
+.blogtitle {
+ color:black;
+ font-weight:bold;
+ font-size:25px;
+}
+
+.blogbody {
+ font-size:12px;
+}
+
diff --git a/netbeans.apache.org/src/content/templates/blogentry.gsp b/netbeans.apache.org/src/content/templates/blogentry.gsp
index fcafa8831..a8ffd5d7f 100644
--- a/netbeans.apache.org/src/content/templates/blogentry.gsp
+++ b/netbeans.apache.org/src/content/templates/blogentry.gsp
@@ -31,7 +31,7 @@
<%include "templatesparts/news.gsp"%>
<div class='grid-container main-content'>
<h1 class="sect1">${content.title}</h1>
- <time>${content.date}</time>
+ <div class="blogdate"><% out.print(content.date.format('EEEEE MMMM dd, YYYY')); %></div>
${content.body}
<%include "templatesparts/tools.gsp"%>
</div>
diff --git a/netbeans.apache.org/src/content/templates/blogindex.gsp b/netbeans.apache.org/src/content/templates/blogindex.gsp
index 814e76b77..b58817713 100644
--- a/netbeans.apache.org/src/content/templates/blogindex.gsp
+++ b/netbeans.apache.org/src/content/templates/blogindex.gsp
@@ -1,61 +1,60 @@
<%/*
- 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
+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
+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.
+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.
-*/%>
+ */%>
<%/*
- page_noaside.gsp: A main area with no aside.
+page_noaside.gsp: A main area with no aside.
-*/%>
+ */%>
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
- <body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
- <div class='grid-container main-content'>
- <h1 class="sect1">${content.title}</h1>
- <%
-// content by aggregation
- TreeMap sectionsubitm = [:]
- for ( atag in tags ) {
- if ( atag.name=="blogentry") {
- for ( mydoc in atag.tagged_documents ) {
- sectionsubitm.put(mydoc.date,mydoc);
- }
- }
- }
- sectionsubitm.sort();
- out.println('<div class="ulist">');
- out.println('<ul>');
- for (adoc in sectionsubitm) {
- out.println('<li><p>');
- out.println('<a href="'+content.rootpath+adoc.value.uri+'">'+adoc.value.title+' '+adoc.value.date+'</a>');
- out.println('</p></li>');
- }
- out.println('</ul>');
- out.println('</div>');
- %>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
- </div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
- </body>
+ <%include "templatesparts/head.gsp"%>
+ <body>
+ <%include "templatesparts/menu.gsp"%>
+ <%include "templatesparts/news.gsp"%>
+ <div class='grid-container main-content'>
+ <h1 class="sect1">${content.title}</h1>
+ <%
+ // content by aggregation
+ TreeMap sectionsubitm = [:]
+ for ( atag in tags ) {
+ if ( atag.name=="blogentry") {
+ for ( mydoc in atag.tagged_documents ) {
+ sectionsubitm.put(mydoc.date.format('YYYY-MM-DD').toString(),mydoc);
+ }
+ }
+ }
+ TreeMap desc = sectionsubitm.descendingMap();
+ for (adoc in desc) {
+ out.println('<div class="blogdate">'+adoc.value.date.format('EEEEE MMMM dd, YYYY')+'</div>');
+ out.println('<div class="blogtitle"><a href="'+content.rootpath+adoc.value.uri+'">'+adoc.value.title+'</a></div>');
+ out.println('<div class="blogbody">');
+ out.println(adoc.value.body);
+ out.println('</div>');
+ }
+
+%>
+ ${content.body}
+ <%include "templatesparts/tools.gsp"%>
+ </div>
+ <%include "templatesparts/footer.gsp"%>
+ <%include "templatesparts/scripts.gsp"%>
+ </body>
</html>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists