Kaynağa Gözat

Rename layouts, improve json content, disable RSS, better footer, add christmas js

Riccardo Balbo 4 yıl önce
ebeveyn
işleme
2152abbbe4
38 değiştirilmiş dosya ile 458 ekleme ve 98 silme
  1. 37 0
      archetypes/showcase.md
  2. 2 2
      config.toml
  3. 1 1
      content/blog/interview-danielp.md
  4. 1 1
      content/blog/interview-jayfella.md
  5. 1 1
      content/blog/minie14.md
  6. 1 1
      content/communitylog/community-update-donations.md
  7. 1 1
      content/communitylog/new-store.md
  8. 21 5
      content/communitylog/new-website.md
  9. 1 1
      content/communitylog/update-in-the-wake-of-recent-events.md
  10. 1 1
      content/contribute.md
  11. 1 1
      content/devlog/jme332.md
  12. 1 1
      content/docs.md
  13. 1 1
      content/features.md
  14. 1 1
      content/license.md
  15. 5 2
      content/showcase/ls_frontier/index.md
  16. 5 2
      content/showcase/mythruna/index.md
  17. 7 2
      content/showcase/skullstone/index.md
  18. 4 3
      content/showcase/spoxel/index.md
  19. 1 1
      content/start.md
  20. 1 1
      content/tutorials/greg-tutorials/greg-tutorials-first-scene.md
  21. 1 1
      content/tutorials/greg-tutorials/greg-tutorials-getting-started.md
  22. 1 1
      content/tutorials/grizeldi-pbr-tutorials/pbr_tutorial.md
  23. 1 1
      content/tutorials/grizeldi-pbr-tutorials/pbr_tutorial2.md
  24. 44 24
      layouts/_default/baseof.html
  25. 0 0
      layouts/_default/post_layout_default.html
  26. 3 6
      layouts/_default/post_layout_default.json
  27. 0 0
      layouts/_default/post_layout_showcase.html
  28. 3 8
      layouts/_default/post_layout_showcase.json
  29. 3 0
      layouts/_default/section.json
  30. 0 0
      layouts/_default/taxonomy.html
  31. 17 3
      layouts/partials/articlePreview.html
  32. 1 1
      layouts/partials/showCaseCommon.html
  33. 6 12
      layouts/taxonomy/author.json
  34. 9 12
      layouts/taxonomy/tag.json
  35. 4 0
      static/css/style.less
  36. 84 0
      static/js/christmas/christmas.js
  37. BIN
      static/js/christmas/hats/hat1.png
  38. 187 0
      static/js/christmas/snow.js

+ 37 - 0
archetypes/showcase.md

@@ -0,0 +1,37 @@
+---
+title: "XXX"
+date: 2019-10-16T08:00:00+00:00
+draft: false
+type: "default"
+layout: "post_layout_showcase"
+#description: "Summary" (optional)
+
+authors:
+    - "xxx"
+tags:
+    - "showcase"
+
+publisher_link: "xxx"
+steam_link: "xxx"
+itch_link: "xxx"
+
+images: [
+    "image.jpg",
+    "img.webp",
+    "img.png"
+]
+
+
+
+gallery: [
+    "img.jpg",
+    "img.webp",
+    "img.png",
+    "video.webm",
+    "youtube:XXXXXXXX"
+ ]
+
+---
+
+
+

+ 2 - 2
config.toml

@@ -1,4 +1,4 @@
-baseURL = "/"
+baseURL = "https://jmonkeyengine.org"
 languageCode = "en-us"
 title = "jMonkeyEngine"
 paginate=9
@@ -6,7 +6,7 @@ summarylength = 60
 enableRobotsTXT = true
 ignoreErrors = ["error-output-taxonomy"]
 pygmentsCodeFences=false
-
+disableKinds = ["RSS"]
 [markup.goldmark.renderer]
   hardWraps = true
   unsafe= true

+ 1 - 1
content/blog/interview-danielp.md

@@ -3,7 +3,7 @@ title: "Sgold interviews Daniel Perano"
 date: 2020-02-25T18:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 enable_comments: true
 
 authors:

+ 1 - 1
content/blog/interview-jayfella.md

@@ -3,7 +3,7 @@ title: "Sgold interviews Jayfella"
 date: 2020-02-15T12:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 authors:
     - "stephengold"
 enable_comments: true

+ 1 - 1
content/blog/minie14.md

@@ -3,7 +3,7 @@ title: "Minie Physics Library Version 1.4 Released!"
 date: 2020-02-09T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 enable_comments: true
 
 authors:

+ 1 - 1
content/communitylog/community-update-donations.md

@@ -3,7 +3,7 @@ title: "Donations Update"
 date: 2020-11-09T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 
 authors:
     - "riccardobl"

+ 1 - 1
content/communitylog/new-store.md

@@ -3,7 +3,7 @@ title: "jMonkeyStore is Now Open!"
 date: 2019-10-08T06:27:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 enable_comments: true
 
 authors:

+ 21 - 5
content/communitylog/new-website.md

@@ -3,11 +3,12 @@ title: "New Website"
 date: 2020-12-13T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 enable_comments: true
 authors:
     - "riccardobl"
-
+images:
+    - "/uploads/Screenshot_2020-12-13-jMonkeyEngine-partial.webp"
 tags:
     - "communitylog"
     - "website"
@@ -117,7 +118,7 @@ title: "Your post"
 date: 2019-10-08T06:27:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 enable_comments: true
 authors:
     - "your github handle"
@@ -126,6 +127,13 @@ tags:
     - "tag1"
     - "tag2"
     - "tag3"
+
+# Images that will be used when creating the social networks previews (optional)
+# images: [ 
+#     "img.png",
+#     "img.jpg',
+#     "img.jpg"
+# ]
 ---
 ```
 
@@ -143,7 +151,7 @@ title: "Your project name"
 date: 2019-10-15T06:27:00+00:00
 draft: false
 type: "default"
-layout: "showcase"
+layout: "post_layout_showcase"
 enable_comments: false
 
 authors:
@@ -159,6 +167,14 @@ steam_link: "wwwww"
 itch_link: "wwww"
 publisher_link: "wwww"
 
+# Images that will be used when creating the social networks previews (optional)
+# images: [ 
+#     "img.png",
+#     "img.jpg',
+#     "img.jpg"
+# ]
+
+# Showcase gallery
 gallery: [
     "image.jpg",
     "image.png",
@@ -169,7 +185,7 @@ gallery: [
 
 ---
 ```
-As you can see, the name of the layout is **showcase** instead of **default** : **layout: "showcase"**
+As you can see, the name of the layout is **post_layout_showcase** instead of **post_layout_default** : **layout: "post_layout_showcase"**
 
 There are also new properties for external links
 

+ 1 - 1
content/communitylog/update-in-the-wake-of-recent-events.md

@@ -3,7 +3,7 @@ title: "Update in the wake of recent events"
 date: 2020-10-29T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 
 authors:
     - "riccardobl"

+ 1 - 1
content/contribute.md

@@ -1,6 +1,6 @@
 ---
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 ---
 
 # Contributing to jMonkeyEngine

+ 1 - 1
content/devlog/jme332.md

@@ -3,7 +3,7 @@ title: "JMonkeyEngine version 3.3.2 is here!"
 date: 2020-05-10T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 enable_comments: true
 authors:
     - "ItsMike54"

+ 1 - 1
content/docs.md

@@ -2,7 +2,7 @@
 menu: "main"
 title: "Documentation"
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 ---
 
 Browse through our various forms of information to help you better understand the engine.

+ 1 - 1
content/features.md

@@ -2,7 +2,7 @@
 menu: "main"
 title: "Features"
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 ---
 
 

+ 1 - 1
content/license.md

@@ -2,7 +2,7 @@
 menu: "main"
 title: "License"
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 ---
 
 jMonkeyEngine is licensed under the very permissive [BSD 3-Clause License](https://choosealicense.com/licenses/bsd-3-clause/), giving you the freedom to publish your game and modify the engine without limitation completely free! There are **no requirements** to use our engine. No splash screens, no fees and no requirement to mention jMonkeyEngine in your game at all.

+ 5 - 2
content/showcase/ls_frontier/index.md

@@ -3,7 +3,7 @@ title: "Lightspeed Frontier"
 date: 2019-10-15T06:27:00+00:00
 draft: false
 type: "default"
-layout: "showcase"
+layout: "post_layout_showcase"
 
 authors:
     - "moffkalast"
@@ -17,12 +17,15 @@ tags:
 
 steam_link: "https://store.steampowered.com/app/548650/Lightspeed_Frontier/"
 
+images: [
+        "/images/showcase/ls_frontier/5.jpg",
+]
+
 gallery: [
     "/images/showcase/ls_frontier/1.jpg",
     "/images/showcase/ls_frontier/2.jpg",
     "/images/showcase/ls_frontier/3.jpg",
     "/images/showcase/ls_frontier/4.jpg",
-    "/images/showcase/ls_frontier/5.jpg",
     "/images/showcase/ls_frontier/6.jpg",
     "/images/showcase/ls_frontier/7.jpg",
     "/images/showcase/ls_frontier/8.jpg",

+ 5 - 2
content/showcase/mythruna/index.md

@@ -3,7 +3,7 @@ title: "Mythruna"
 date: 2019-10-16T08:27:00+00:00
 draft: false
 type: "default"
-layout: "showcase"
+layout: "post_layout_showcase"
 
 authors:
     - "pspeed42"
@@ -13,6 +13,10 @@ tags:
 
 publisher_link: "http://mythruna.com/"
 
+images: [
+        "/images/showcase/mythruna/11.jpg",
+]
+
 gallery: [
     "/images/showcase/mythruna/1.jpg",
     "/images/showcase/mythruna/2.png",
@@ -24,7 +28,6 @@ gallery: [
     "/images/showcase/mythruna/8.jpg",
     "/images/showcase/mythruna/9.jpg",
     "/images/showcase/mythruna/10.jpg",
-    "/images/showcase/mythruna/11.jpg",
     "/images/showcase/mythruna/12.jpg",
     "/images/showcase/mythruna/13.jpg",
     "/images/showcase/mythruna/14.jpg",

+ 7 - 2
content/showcase/skullstone/index.md

@@ -3,7 +3,7 @@ title: "Skullstone"
 date: 2019-10-16T08:00:00+00:00
 draft: false
 type: "default"
-layout: "showcase"
+layout: "post_layout_showcase"
 
 authors:
     - "FrozenShade666"
@@ -13,6 +13,12 @@ tags:
 
 publisher_link: "http://skullstonegame.com/"
 
+images: [
+    "/images/showcase/skullstone/7.jpg"
+]
+
+
+
 gallery: [
     "/images/showcase/skullstone/2.jpg",
     "/images/showcase/skullstone/1.jpg",
@@ -20,7 +26,6 @@ gallery: [
     "/images/showcase/skullstone/4.jpg",
     "/images/showcase/skullstone/5.jpg",
     "/images/showcase/skullstone/6.jpg",
-    "/images/showcase/skullstone/7.jpg",
     "/images/showcase/skullstone/8.jpg",
     "/images/showcase/skullstone/9.jpg",
     "/images/showcase/skullstone/10.jpg",

+ 4 - 3
content/showcase/spoxel/index.md

@@ -3,7 +3,7 @@ title: "Spoxel"
 date: 2019-10-15T06:27:00+00:00
 draft: false
 type: "default"
-layout: "showcase"
+layout: "post_layout_showcase"
 
 authors:
     - "Jeddic"
@@ -16,7 +16,9 @@ tags:
 publisher_link: "http://epagagames.com/spoxel/"
 steam_link: "https://store.steampowered.com/app/746880/Spoxel/"
 
-
+images: [
+        "/images/showcase/spoxel/7.jpg",
+]
 gallery: [
     "/images/showcase/spoxel/1.jpg",
     "/images/showcase/spoxel/2.jpg",
@@ -24,7 +26,6 @@ gallery: [
     "/images/showcase/spoxel/4.jpg",
     "/images/showcase/spoxel/5.jpg",
     "/images/showcase/spoxel/6.jpg",
-    "/images/showcase/spoxel/7.jpg",
     "/images/showcase/spoxel/8.jpg",
      "https://steamcdn-a.akamaihd.net/steam/apps/256746524/movie480.webm",
     "https://steamcdn-a.akamaihd.net/steam/apps/256746530/movie480.webm"

+ 1 - 1
content/start.md

@@ -1,6 +1,6 @@
 ---
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 title: "Quick Start"
 ---
 

+ 1 - 1
content/tutorials/greg-tutorials/greg-tutorials-first-scene.md

@@ -3,7 +3,7 @@ title: "Greg's Tutorial 02 - First Scene"
 date: 2020-12-12T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 
 authors:
     - "XIII-code"

+ 1 - 1
content/tutorials/greg-tutorials/greg-tutorials-getting-started.md

@@ -3,7 +3,7 @@ title: "Greg's Tutorial 01 - Getting Started"
 date: 2020-12-04T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 
 authors:
     - "XIII-code"

+ 1 - 1
content/tutorials/grizeldi-pbr-tutorials/pbr_tutorial.md

@@ -3,7 +3,7 @@ title: "Grizeldi's PBR Tutorial #1 - The Basics"
 date: 2019-01-18T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 
 authors:
     - "grizeldi"

+ 1 - 1
content/tutorials/grizeldi-pbr-tutorials/pbr_tutorial2.md

@@ -3,7 +3,7 @@ title: "Grizeldi's PBR Tutorial #2 - What are Light Probes?"
 date: 2019-10-16T08:00:00+00:00
 draft: false
 type: "default"
-layout: "default"
+layout: "post_layout_default"
 
 authors:
     - "grizeldi"

+ 44 - 24
layouts/_default/baseof.html

@@ -1,39 +1,51 @@
 <!DOCTYPE html>
-<html lang="{{ $.Site.LanguageCode | default "en" }}">
+<html lang="{{ $.Site.LanguageCode | default " en" }}">
 
 <head>
 
   <title>{{ block "title" . }}{{ .Site.Title }} {{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}</title>
   <meta name="viewport" content="width=device-width,minimum-scale=1">
-  <meta name="description" content="jMonkeyEngine is a modern developer friendly game engine written primarily in Java.  ">
-  
-  <link rel="stylesheet" href="/css/style.css"> 
+  <meta name="description"
+    content="jMonkeyEngine is a modern developer friendly game engine written primarily in Java.  ">
+  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+
+  <link rel="stylesheet" href="/css/style.css">
+
+  <!-- Autogenerated Meta -->
+  {{ template "_internal/twitter_cards.html" . }}
+  {{ template "_internal/opengraph.html" . }}
+  {{ template "_internal/schema.html" . }}
+  <!-- / Autogenerated Meta -->
+
 
+
+  <!-- Old browser warning -->
   <script src="/js/old-browser.js"></script>
-  <link rel="stylesheet" href="/css/old-browser.css"> 
+  <link rel="stylesheet" href="/css/old-browser.css">
+  <!-- / Old browser warning -->
 
-  
   <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.1.9/p5.min.js" integrity="sha512-WIklPM6qPCIp6d3fSSr90j+1unQHUOoWDS4sdTiR8gxUTnyZ8S2Mr8e10sKKJ/bhJgpAa/qG068RDkg6fIlNFA==" crossorigin="anonymous"></script> -->
 
+  <!-- Code highlight -->
   <script src="/highlight/highlight.pack.js"></script>
-  <script src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
+  <script
+    src="//cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
   <link rel="stylesheet" href="/highlight/styles/railscasts.css">
   <script type="text/javascript">
     hljs.initHighlightingOnLoad();
     hljs.initLineNumbersOnLoad();
   </script>
+  <!-- / Code highlight -->
 
+  <!-- App -->
   <script src="/js/utils.js"></script>
   <script src="/js/showcase.js"></script>
   <script type="module" src="/js/Main.js"></script>
-  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+  <!-- /App -->
+
+  <script src="/js/christmas/christmas.js"></script>
+
 
-  {{ if .OutputFormats.Get "RSS" }}
-  {{ with .OutputFormats.Get "RSS" }}
-  <link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
-  <link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
-  {{ end }}
-  {{ end }}
 </head>
 
 <body>
@@ -42,19 +54,27 @@
   <main>
     {{ block "main" . }}{{ end }}
   </main>
-  <footer> 
-    © 2020 jMonkeyEngine  |  <a title="Github repo"  rel='noopener nofollow noreferrer' target="_blank" href="https://github.com/jMonkeyEngine/jmonkeyengine-website">
-      <i class="fab fa-github"></i>
-    </a>
-    <a title="Report issue"  rel='noopener nofollow noreferrer' target="_blank" href="https://github.com/jMonkeyEngine/jmonkeyengine-website/issues">
-      <i class="fas fa-bug"></i>
-    </a>
-    <br />
+  <footer>
+    © 2020 jMonkeyEngine.
     All other trademarks, logos and featured content are property of their respective owners.
     <br />
-    Website designed and developed by <a href="https://rblb.it">Riccardo Balbo</a>
+    <a title="Github repo" rel='noopener nofollow noreferrer' target="_blank"
+      href="https://github.com/jMonkeyEngine/jmonkeyengine-website">
+      <i class="fab fa-github"></i> Source on Github
+    </a> 
+    |
+    <a title="Report issue" rel='noopener nofollow noreferrer' target="_blank"
+      href="https://github.com/jMonkeyEngine/jmonkeyengine-website/issues">
+      <i class="fas fa-bug"></i> Report an issue
+    </a> 
+    <br />
+    <br />
+    Website designed and developed by 
+    <a href="https://github.com/riccardobl">Riccardo Balbo</a>
+    for the jMonkeyEngine's Community.
+
 
-    
   </footer>
 </body>
+
 </html>

+ 0 - 0
layouts/_default/default.html → layouts/_default/post_layout_default.html


+ 3 - 6
layouts/_default/default.json → layouts/_default/post_layout_default.json

@@ -2,15 +2,12 @@
     "responseTitle":"{{ block "title" . }}{{ .Site.Title }} {{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}",
     "apiVersion":"1.0",
     "response":"defaultEntry",
-  
+    "uid":{{ .File.UniqueID | jsonify }},
+
     "title":{{.Title | jsonify}},
     "content":{{ .Content | jsonify}},
     "contentPlain":{{ .Content| plainify | jsonify}} ,
-    {{ if .Params.summarytitle }}
-    "summaryTitle":{{ .Params.summarytitle | plainify  | jsonify  }},
-    {{ else }}
-    "summaryTitle":{{ .Title | plainify  | jsonify }},
-    {{ end }}
+    "url":{{ .Permalink  | absURL | jsonify }},
 
 
     {{ if .Params.summary }}

+ 0 - 0
layouts/_default/showcase.html → layouts/_default/post_layout_showcase.html


+ 3 - 8
layouts/_default/showcase.json → layouts/_default/post_layout_showcase.json

@@ -2,16 +2,11 @@
     "responseTitle":"{{ block "title" . }}{{ .Site.Title }} {{ with .Params.Title }} | {{ . }}{{ end }}{{ end }}",
     "apiVersion":"1.0",
     "response":"showcaseEntry",
-  
+    "uid":{{ .File.UniqueID | jsonify }},
     "title":{{.Title | jsonify}},
     "content":{{ .Content | jsonify}},
     "contentPlain":{{ .Content| plainify | jsonify}} ,
-    {{ if .Params.summarytitle }}
-    "summaryTitle":{{ .Params.summarytitle | plainify  | jsonify  }},
-    {{ else }}
-    "summaryTitle":{{ .Title | plainify  | jsonify }},
-    {{ end }}
-    
+    "url":{{ .Permalink  | absURL | jsonify }},
 
 
     {{ if .Params.summary }}
@@ -38,7 +33,7 @@
     {{end}}
  
     "media":[
-        {{ range  $i, $e :=    .Params.gallery  }}{{ if $i }} , {{end}}{{ $e | absURL | jsonify}}{{end}}
+        {{ range  $i, $e :=   (union .Params.images .Params.gallery)  }}{{ if $i }} , {{end}}{{ $e | absURL | jsonify}}{{end}}
     ],
 
 

+ 3 - 0
layouts/_default/section.json

@@ -0,0 +1,3 @@
+{
+    "follow":"/tags/{{.Section}}"
+}

+ 0 - 0
content/_index.md → layouts/_default/taxonomy.html


+ 17 - 3
layouts/partials/articlePreview.html

@@ -1,5 +1,8 @@
 <article>
-  <h1>
+
+  <h1 >
+
+    
     {{ partial "postIcon.html" . }}
     {{ if .Params.summarytitle }}
     <a href="{{ .RelPermalink }}">{{ .Params.summarytitle }}</a>
@@ -7,8 +10,19 @@
     {{ if .Title }} <a href="{{ .RelPermalink }}">{{ .Title }}</a> {{ end }}
     {{ end }}
   </h1>
-  <div class="content">
-    <span>
+  <!-- {{ if .Params.images }} -->
+
+
+  <!-- {{ range first 1 (shuffle .Params.images) }}
+  <img style="float:left;max-width:30%;margin-right:1rem;border-radius:1vmin" style="max-width:50%" src="{{.}}"  />
+
+  {{ end }} -->
+
+  <!-- {{ end }} -->
+  <div class="content" >
+
+    <span >
+     
       {{ if .Params.summary }}
       {{ .Params.summary   |  safeHTML}}
       {{ else }}

+ 1 - 1
layouts/partials/showCaseCommon.html

@@ -1,7 +1,7 @@
 
 {{ if   .Params.gallery }}
 <i id="playButton" class=" fas fa-play"></i>
-{{ range  $index, $value :=  (shuffle  .Params.gallery ) }}
+{{ range  $index, $value :=  (shuffle  (union .Params.images .Params.gallery) ) }}
 
 
 

+ 6 - 12
layouts/taxonomy/author.json

@@ -6,12 +6,12 @@
 {{ $paginator := .Paginator }}
 
 {{ if $paginator.HasPrev }}
-    "prev":"{{ .Paginator.Prev.URL }}",
+    "prev":{{ .Paginator.Prev.URL | absURL | jsonify }},
 {{ else}}
     "prev":"",
 {{ end }}
 {{ if $paginator.HasNext }}
-    "next":"{{ .Paginator.Next.URL }}",
+    "next":{{ .Paginator.Next.URL  | absURL | jsonify}},
 {{ else}}
     "next":"",
 {{ end }}
@@ -21,18 +21,12 @@
 {{ range $i,$e := $paginator.Pages }}
     {{ if $i }} , {{end}}
     {
-     
         "date":"{{ .Date}}",
-        
-        "url":{{ .Permalink  | jsonify }},
+        "url":{{ .Permalink  | absURL | jsonify }},
+        "jsonUrl":{{ (print .Permalink   "index.json") | absURL  | jsonify }},
+        "title":{{ .Title | jsonify }},
+        "uid":{{ .File.UniqueID | jsonify }},
 
-        {{ if .Params.summarytitle }}
-        "title":{{ .Params.summarytitle | plainify  | jsonify  }},
-        {{ else }}
-        "title":{{ .Title | plainify  | jsonify }},
-        {{ end }}
-
-   
         {{ if .Params.summary }}
         "summary":{{ .Params.summary | plainify  | jsonify }},
         {{else}}

+ 9 - 12
layouts/taxonomy/tag.json

@@ -5,13 +5,14 @@
   
 {{ $paginator := .Paginator }}
 
+
 {{ if $paginator.HasPrev }}
-    "prev":"{{ .Paginator.Prev.URL }}",
+    "prev":{{ .Paginator.Prev.URL | absURL | jsonify }},
 {{ else}}
     "prev":"",
 {{ end }}
 {{ if $paginator.HasNext }}
-    "next":"{{ .Paginator.Next.URL }}",
+    "next":{{ .Paginator.Next.URL  | absURL | jsonify}},
 {{ else}}
     "next":"",
 {{ end }}
@@ -24,17 +25,13 @@
      
         "date":"{{ .Date}}",
         
-        "url":{{ .Permalink  | jsonify }},
-
-        {{ if .Params.summarytitle }}
-        "title":{{ .Params.summarytitle | plainify  | jsonify  }},
-        {{ else }}
-        "title":{{ .Title | plainify  | jsonify }},
-        {{ end }}
+        "url":{{ .Permalink  | absURL | jsonify }},
+        "jsonUrl":{{(print .Permalink   "index.json") | absURL  | jsonify }},
+        "title":{{ .Title   | jsonify }},
+        "uid":{{ .File.UniqueID | jsonify }},
 
-   
-        {{ if .Params.summary }}
-        "summary":{{ .Params.summary | plainify  | jsonify }},
+       {{ if .Params.description }}
+        "summary":{{ .Params.description | plainify  | jsonify }},
         {{else}}
         "summary":{{.Summary | plainify | jsonify }}   ,
         {{ end }}

+ 4 - 0
static/css/style.less

@@ -1280,6 +1280,10 @@ button#startbtn {
     font-size: 1.6rem;
 }
 
+button#featuresbtn{
+    font-size: 1.2rem;
+
+}
 
 section#showcase {
     text-align: center;

+ 84 - 0
static/js/christmas/christmas.js

@@ -0,0 +1,84 @@
+
+(function () {
+    const date = new Date();
+    if ((date.getMonth()+1) != 12) return;
+    if (date.getDate() < 6) return;
+
+    document.addEventListener("DOMContentLoaded", () => {
+        const christmasRoot = "https://jmonkeyengine.org/js/christmas/";
+
+        function loadSnow() {
+            console.log("Load snow...");
+            const snowScript = document.createElement("script");
+            snowScript.src = christmasRoot + "/snow.js"
+            document.head.appendChild(snowScript);
+            snowScript.onload = function () {
+                console.log("Snow Loaded. Starting...");
+                snow.start({
+                    "stickingRatio": 0.7,
+                    "wind": 5,
+                    "flakeCount": 210,
+                    "maxRadius": 1.9,
+                    "maxSpeed": 3,
+                    "minSpeed": 0.4
+                });
+            }
+        }
+        function loadHats(selectors) {
+            console.log("Load hats... for", selectors);
+
+            const hats = [
+                christmasRoot + 'hats/hat1.png'
+            ];
+
+            selectors.forEach(selector => {
+                document.querySelectorAll(selector).forEach(avatar => {
+                    if (avatar.getAttribute("christmas25550-hasHat")) return;
+                    console.log("Add hat to", avatar);
+
+                    const parent = avatar.parentNode;
+
+                    const parentPosMode = window.getComputedStyle(parent).position;
+                    if (parentPosMode != "absolute" && parentPosMode != "fixed" && parentPosMode != "relative") parent.style.position = "relative";
+
+                    const avatarBound = avatar.getBoundingClientRect();
+                    if (avatarBound.width == 0 || avatarBound.height == 0) return;
+                    const parentBound = parent.getBoundingClientRect();
+
+
+                    const hat = document.createElement("div");
+                    hat.classList.add("christmas25550-hat");
+
+                    const hatImg = hats[Math.floor(Math.random() * hats.length)];
+                    hat.style.pointerEvents = "none";
+                    hat.style.backgroundImage = "url('" + hatImg + "')";
+                    hat.style.backgroundPosition = "right bottom";
+                    hat.style.filter = "hue-rotate(" + (Math.random() * 2. - 1.) + "turn)";
+                    hat.style.transform = "rotate(" + Math.floor((Math.random() * 2. - 1.) * 4) + "deg)";
+                    hat.style.backgroundRepeat = "no-repeat";
+                    hat.style.backgroundSize = "contain";
+                    hat.style.display = "block";
+                    hat.style.position = "absolute";
+                    hat.style.width = avatarBound.width + "px";
+                    hat.style.height = avatarBound.height + "px";
+                    hat.style.zIndex = "99";
+                    hat.style.left = (avatarBound.left - parentBound.left - avatarBound.width * 0.3) + "px";
+
+                    hat.style.top = (avatarBound.top - parentBound.top - avatarBound.height * 0.8) + "px";
+
+                    parent.appendChild(hat);
+                    avatar.setAttribute("christmas25550-hasHat", "true");
+
+
+                })
+            });
+        }
+        loadSnow();
+        const hatLoadInt = function () {
+            loadHats(["figure.githubUser img", 'img.avatar']);
+        };
+        setInterval(hatLoadInt, 2000);
+        hatLoadInt();
+    });
+
+})();

BIN
static/js/christmas/hats/hat1.png


+ 187 - 0
static/js/christmas/snow.js

@@ -0,0 +1,187 @@
+// Make it snow in your site
+// See https://github.com/Canop/snow
+window.snow = (function(){
+
+	var	ctx,
+		canvas,
+		W,
+		H,
+		heights = [],
+		n = 0,
+		timer,
+		fall;
+
+	function resetScreen(){
+		if (!canvas) {
+			window.addEventListener("resize", resetScreen);
+			canvas = document.createElement("canvas");
+			document.body.appendChild(canvas);
+		}
+		W = window.innerWidth;
+		H = window.innerHeight;
+		canvas.id = "snow-canvas";
+		canvas.style.pointerEvents = "none";
+		canvas.style.position = "fixed";
+		canvas.style.zIndex = 5000; // todo make it modifiable
+		canvas.style.left = 0;
+		canvas.style.right = 0;
+		canvas.style.top = 0;
+		canvas.style.bottom = 0;
+		canvas.width = W;
+		canvas.height = H;
+		ctx = canvas.getContext("2d");
+		if (heights.length<W) {
+			var	i = 0,
+				nh = new Array(W);
+			for (;i<heights.length; i++) nh[i] = heights[i];
+			for (;i<W; i++) nh[i] = 0;
+			heights = nh;
+		}
+	}
+
+	function rnd(min, max){
+		if (max === undefined) {
+			max = min;
+			min = 0;
+		}
+		return min + Math.random()*(max-min);
+	}
+
+	function Fall(options){
+		this.flakes = new Array(Math.ceil(options.flakeCount) || 400);
+		this.maxRadius = options.maxRadius || 1.7;
+		this.wind = options.wind || 0;
+		this.color = options.color || "#fff";
+		this.minSpeed = options.minSpeed || 1;
+		this.maxSpeed = options.maxSpeed || 4.2;
+		this.stickingRatio = options.stickingRatio || .4;
+		this.maxHeightRatio = options.maxHeightRatio || .25;
+		this.dying = false;
+		for (var i=0; i<this.flakes.length; i++) this.flakes[i] = new Flake(this);
+	}
+	Fall.prototype.draw = function(){
+		ctx.fillStyle = this.color;
+		ctx.strokeStyle = this.color;
+		for (var i=0; i<this.flakes.length; i++) {
+			this.flakes[i].draw();
+		}
+	}
+	Fall.prototype.update = function(){
+		for (var i=0; i<this.flakes.length; i++) {
+			if (this.flakes[i].update(this)) {
+				this.flakes[i] = null;
+			}
+		}
+		if (this.dying) {
+			this.flakes = this.flakes.filter(function(v){
+				return v;
+			});
+			if (!this.flakes.length) fall = null;
+		}
+		if (n%2) {
+			for (var i=1; i<W; i++) {
+				var d = heights[i]-heights[i-1];
+				if (d>1) {
+					heights[i] -=.7*d;
+					heights[i-1] +=.3*d;
+					if (i>1) heights[i-2] +=.2*d;
+					if (i>2) heights[i-3] +=.1*d;
+				}
+			}
+		} else {
+			for (var i=0; i<W-1; i++) {
+				var d = heights[i]-heights[i+1];
+				if (d>1) {
+					heights[i] -=.7*d;
+					heights[i+1] +=.3*d;
+					if (i<W-2) heights[i+2] +=.2*d;
+					if (i<W-3) heights[i+3] +=.1*d;
+				}
+			}
+		}
+		n++;
+	}
+	Fall.prototype.rndX = function(){
+		var windRange = this.wind*H/this.minSpeed;
+		return rnd(Math.min(0, -windRange)-10, Math.max(W, W-windRange)+10);
+	}
+
+	function Flake(fall){
+		this.y = rnd(-H, 0);
+		this.x = fall.rndX();
+		this.radius = rnd(1, fall.maxRadius);
+		if (fall.maxRadius>1) {
+			this.speed = fall.minSpeed + (fall.maxSpeed-fall.minSpeed)*(this.radius-1)/(fall.maxRadius-1);
+		} else {
+			this.speed = rnd(fall.minSpeed, fall.maxSpeed);
+		}
+		this.omega = rnd(.02, .13);
+	}
+	Flake.prototype.draw = function(){
+		ctx.beginPath();
+		ctx.arc(this.x, this.y, this.radius, 0, 2*Math.PI, false);
+		ctx.fill();
+	}
+	Flake.prototype.update = function(fall){
+		this.y += this.speed;
+		var	i = Math.round(this.x),
+			h;
+		if (i<0) h = heights[0];
+		else if (i>=W) h = heights[W-1];
+		else h = heights[i];
+		if (this.y >= H-h) {
+			if (i>=0 && i<W) {
+				if (h<H*fall.maxHeightRatio) {
+					heights[i] += this.radius * fall.stickingRatio;
+				}
+			}
+			if (fall.dying && Math.random()<.7) {
+				return true; // flake disapears
+			}
+			this.y = rnd(-30, 1);
+			this.x = fall.rndX();
+			return;
+		}
+		this.x += fall.wind;
+		this.x += Math.cos(this.y*this.omega/this.speed);
+	}
+
+	function drawGround(){
+		ctx.beginPath();
+		ctx.moveTo(0, H);
+		for (var i=0; i<heights.length; i++) {
+			ctx.lineTo(i, H-heights[i]);
+		}
+		ctx.lineTo(W+1, H-heights[heights.length-1]);
+		ctx.lineTo(W+1, H);
+		ctx.lineTo(0, H);
+		ctx.fill();
+	}
+
+	function draw(){
+		ctx.clearRect(0, 0, W, H);
+		drawGround();
+		if (fall) {
+			fall.draw();
+			fall.update();
+			clearTimeout(timer);
+			timer = setTimeout(draw, 25);
+		}
+	}
+
+	return {
+		start: function(options){
+			if (!ctx) resetScreen();
+			fall = new Fall(options||{});
+			running = true;
+			draw();
+		},
+		stop: function(){
+			if (fall) fall.dying = true;
+		},
+		ground: function(){
+			return heights;
+		}
+	}
+
+})();