Skip to content

Commit

Permalink
adds share_link.ftl and share_news.ftl to separate news posts (with s…
Browse files Browse the repository at this point in the history
…ocial networks) from regular page actions (copy-url/print)
  • Loading branch information
mawiesne committed Nov 17, 2024
1 parent 9e323cb commit 665803e
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 19 deletions.
36 changes: 19 additions & 17 deletions src/main/jbake/templates/news.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,25 @@

<div class="container">

<div class="row-fluid marketing">
<div class="span9">
<h1>News</h1>
<ul>
<#list posts as post>
<#if (post.status == "published") && (post.category??) && (post.category == "news")>
<li><p>${post.date?string("yyyy-MM-dd")}: <a href="/${post.uri}">${post.title}</a></p></li>
</#if>
</#list>
</ul>
<p></p>
<p>Subscribe to Apache OpenNLP updates using the <a href="/${config.feed_file}">feed</a>.</p>
</div>
</div>

<hr>

<div class="row-fluid marketing">
<div class="span9">
<h1>News</h1>
<p>Subscribe to Apache OpenNLP updates using the <a href="/${config.feed_file}">feed</a>.</p>
<ul>
<#list posts as post>
<#if (post.status == "published") && (post.category??) && (post.category == "news")>
<li><p>${post.date?string("yyyy-MM-dd")}: <a href="/${post.uri}">${post.title}</a></p></li>
</#if>
</#list>
</ul>
<p></p>
</div>
</div>

<hr>

<div id="share"><#include "share_link.ftl"></div>
</div>


<#include "footer.ftl">
1 change: 1 addition & 0 deletions src/main/jbake/templates/page.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

${content.body}

<div id="share"><#include "share_link.ftl"></div>
</div>

<#include "footer.ftl">
2 changes: 1 addition & 1 deletion src/main/jbake/templates/post.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
${content.body}

<p><em>${content.date?string("dd MMMM yyyy")}</em></p>
<div id="share"><#include "share_links.ftl"></div>
<div id="share"><#include "share_news.ftl"></div>
</div>

<#include "footer.ftl">
23 changes: 23 additions & 0 deletions src/main/jbake/templates/share_link.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<#--
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.
-->

<div class="shareon">
<a class="copy-url"></a>
<a class="print"></a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
under the License.
-->

<div class="shareon" style="margin-top: 30px";>
<div class="shareon" style="margin-top: 30px;">
<a class="reddit"></a>
<a class="linkedin"></a>
<a class="mastodon"></a>
Expand Down

0 comments on commit 665803e

Please sign in to comment.