From b13c133c3a7ac100123c2fc0c9ea2f2424d5bd16 Mon Sep 17 00:00:00 2001 From: d3netxer Date: Fri, 12 Jan 2024 18:41:11 +0300 Subject: [PATCH] decoding more fields --- _layouts/post.html | 2 +- _layouts/project.html | 24 +++++++++++++++++++++++- assets/js/custom/project-filter.js | 14 ++++++++++---- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/_layouts/post.html b/_layouts/post.html index a556be04..7f355fbd 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -6,7 +6,7 @@ {% include navbar.html %}
- {{ page.title}} + {{ page.title }}
{% if page.author %}
-
+ + +
+

Tags: 

+
+ {% for tag in page.tags %} + {{ tag | url_decode }} + {% endfor %} +
{% if page.video_link %} @@ -225,10 +234,23 @@

Education Activity Duration:

let decodedDescription = decodeURIComponent(encodedDescription); //console.log(decodedDescription) + //console.log('lets decode') // Insert the decoded string into the HTML document.getElementById('project-description').innerHTML = decodedDescription; + // Decode the fields + let decodedTitle = decodeURIComponent("{{ page.title }}"); + let decodedSubtitle = decodeURIComponent("{{ page.subtitle }}"); + let decodedAuthor = decodeURIComponent("{{ page.author }}"); + + //console.log('lets decode title') + //console.log(decodedTitle) + // Set the decoded strings into the HTML + document.querySelector('.project-title h1').textContent = decodedTitle; + document.querySelector('.project-title h3').textContent = decodedSubtitle; + document.querySelector('.project-title p').textContent = decodedAuthor; +