This is an automated email from the ASF dual-hosted git repository.

mawiesne pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opennlp-site.git


The following commit(s) were added to refs/heads/main by this push:
     new b8944a84 incorporates 'shareon' (https://github.com/kytta/shareon) 
into share_links.ftl adding relevant, working social media share buttons, 
including copy-url, email, print buttons
b8944a84 is described below

commit b8944a84d05b08c7c5284a96da0c6d9fbd45cf57
Author: Martin Wiesner <[email protected]>
AuthorDate: Sun Nov 17 16:00:26 2024 +0100

    incorporates 'shareon' (https://github.com/kytta/shareon) into 
share_links.ftl adding relevant, working social media share buttons, including 
copy-url, email, print buttons
---
 src/main/jbake/assets/css/shareon-2.5.0.min.css |  1 +
 src/main/jbake/assets/js/shareon-2.5.0.iife.js  |  1 +
 src/main/jbake/templates/footer.ftl             |  9 +++++----
 src/main/jbake/templates/header.ftl             | 15 ++++++++-------
 src/main/jbake/templates/share_links.ftl        | 20 ++++++++++----------
 5 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/src/main/jbake/assets/css/shareon-2.5.0.min.css 
b/src/main/jbake/assets/css/shareon-2.5.0.min.css
new file mode 100644
index 00000000..a50cb83a
--- /dev/null
+++ b/src/main/jbake/assets/css/shareon-2.5.0.min.css
@@ -0,0 +1 @@
+.shareon{font-size:0!important}.shareon>*{display:inline-block;position:relative;height:24px;min-width:16px;margin:3px;padding:6px
 
10px;background-color:#333;border-radius:3.33333px;border:0;box-sizing:content-box;color:#fff;line-height:1.5;transition:opacity
 .3s 
ease;vertical-align:middle}.shareon>:hover{border:0;cursor:pointer;opacity:.7}.shareon>:not(:empty){font-size:16px;text-decoration:none}.shareon>:not(:empty):before{position:relative;height:100%;width:28px;top:0;left:0;backgroun
 [...]
diff --git a/src/main/jbake/assets/js/shareon-2.5.0.iife.js 
b/src/main/jbake/assets/js/shareon-2.5.0.iife.js
new file mode 100644
index 00000000..b7ac7a8c
--- /dev/null
+++ b/src/main/jbake/assets/js/shareon-2.5.0.iife.js
@@ -0,0 +1 @@
+var Shareon=function(r){"use strict";const 
o={facebook:t=>`https://www.facebook.com/sharer/sharer.php?u=${t.url}${t.hashtags?`&hashtag=%23${t.hashtags.split("%2C")[0]}`:""}`,fediverse:t=>`https://${t.s2fInstance}/?text=${t.title}%0D%0A${t.url}${t.text?`%0D%0A%0D%0A${t.text}`:""}${t.via?`%0D%0A%0D%0A${t.via}`:""}`,email:t=>`mailto:?subject=${t.title}&body=${t.url}`,linkedin:t=>`https://www.linkedin.com/sharing/share-offsite/?url=${t.url}`,mastodon:t=>`https://toot.kytta.dev/?text=${t.titl
 [...]
diff --git a/src/main/jbake/templates/footer.ftl 
b/src/main/jbake/templates/footer.ftl
index 5bab5d24..1327b115 100755
--- a/src/main/jbake/templates/footer.ftl
+++ b/src/main/jbake/templates/footer.ftl
@@ -29,13 +29,14 @@
     <!-- Le javascript
     ================================================== -->
     <!-- Placed at the end of the document so the pages load faster -->
-    <script src="https://www.apachecon.com/event-images/snippet.js";></script>
     <script src="/js/jquery-3.7.1.min.js"></script>
     <script src="/js/bootstrap.min.js"></script>
-    <script src="/js/prettify.js"></script>
-    
-    <script type="text/javascript">
+    <script src="/js/prettify.js" defer></script>
+    <script src="/js/shareon-2.5.0.iife.js" defer init></script>
+    <-- Include most recent Apache Con events
+    <script src="https://www.apachecon.com/event-images/snippet.js"; 
defer></script>
 
+    <script type="text/javascript">
       var link = $('a[href="' + this.location.pathname + '"]');
       if (link != undefined)
          link.parents('li,ul').addClass('active');
diff --git a/src/main/jbake/templates/header.ftl 
b/src/main/jbake/templates/header.ftl
index 7434ca37..679c85bb 100755
--- a/src/main/jbake/templates/header.ftl
+++ b/src/main/jbake/templates/header.ftl
@@ -55,13 +55,14 @@
     <meta name="theme-color" content="#ffffff">
 
     <!-- The styles -->
-    <link href="/css/bootstrap.min.css" rel="stylesheet">
-    <link href="/css/font-awesome.min.css" rel="stylesheet">
-    <link href="/css/asciidoctor.css" rel="stylesheet">
-    <link href="/css/prettify.css" rel="stylesheet">
-    <link href="/css/custom-style.css" rel="stylesheet">
-    <link href="/css/scheme-light.css" rel="stylesheet">
-    <link href="/css/scheme-dark.css" rel="stylesheet">
+    <link href="/css/bootstrap.min.css" rel="stylesheet"/>
+    <link href="/css/font-awesome.min.css" rel="stylesheet"/>
+    <link href="/css/asciidoctor.css" rel="stylesheet"/>
+    <link href="/css/prettify.css" rel="stylesheet"/>
+    <link href="/css/custom-style.css" rel="stylesheet"/>
+    <link href="/css/scheme-light.css" rel="stylesheet"/>
+    <link href="/css/scheme-dark.css" rel="stylesheet"/>
+    <link href="/css/shareon-2.5.0.min.css" rel="stylesheet"/>
 
     <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
     <!--[if lt IE 9]>
diff --git a/src/main/jbake/templates/share_links.ftl 
b/src/main/jbake/templates/share_links.ftl
index 7aa64d0e..0c4420e6 100755
--- a/src/main/jbake/templates/share_links.ftl
+++ b/src/main/jbake/templates/share_links.ftl
@@ -17,13 +17,13 @@
    under the License. 
 -->
 
-<!-- Facebook -->
-<div class="fb-like" data-send="false" data-layout="button_count" 
data-width="100" data-show-faces="true"></div>
-<div id="fb-root"></div>
-<script>(function(d, s, id) {
-  var js, fjs = d.getElementsByTagName(s)[0];
-  if (d.getElementById(id)) return;
-  js = d.createElement(s); js.id = id;
-  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
-  fjs.parentNode.insertBefore(js, fjs);
-}(document, 'script', 'facebook-jssdk'));</script>
\ No newline at end of file
+<div class="shareon" style="margin-top: 30px";>
+  <a class="reddit"></a>
+  <a class="linkedin"></a>
+  <a class="mastodon"></a>
+  <a class="twitter"></a>
+  <a class="telegram"></a>
+  <a class="copy-url"></a>
+  <a class="email"></a>
+  <a class="print"></a>
+</div>
\ No newline at end of file

Reply via email to