Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
niltor committed May 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents b3dfee9 + 8ff79b3 commit 6e85050
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion WebApp/js/index.js
Original file line number Diff line number Diff line change
@@ -92,6 +92,7 @@ class Index {
renderBlogs() {
let blogList = document.getElementById('blogList');
if (blogList) {
const pathName = window.location.pathname;
blogList.innerHTML = '';
this.blogs.forEach(blog => {
let blogDiv = document.createElement('div');
@@ -101,7 +102,7 @@ class Index {
let blogTitleDiv = document.createElement('div');
blogTitleDiv.className = 'font-bold text-xl mb-2';
let blogLink = document.createElement('a');
blogLink.href = './blogs' + blog.Path;
blogLink.href = pathName + 'blogs' + blog.Path;
blogLink.target = '_blank';
blogLink.className = 'block text-lg py-2 text-neutral-600 hover:text-neutral-800 dark:text-neutral-300 dark:hover:text-neutral-100';
blogLink.innerText = "📑 " + blog.Title;
6 changes: 3 additions & 3 deletions WebApp/ts/index.ts
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ class Index {
document.addEventListener('DOMContentLoaded', () => this.init());
}

init(){
init() {
this.getData();
this.addEvent();
}
@@ -119,8 +119,8 @@ class Index {

renderBlogs(): void {
let blogList = document.getElementById('blogList');

if (blogList) {
const pathName = window.location.pathname;
blogList.innerHTML = '';
this.blogs.forEach(blog => {
let blogDiv = document.createElement('div');
@@ -130,7 +130,7 @@ class Index {
let blogTitleDiv = document.createElement('div');
blogTitleDiv.className = 'font-bold text-xl mb-2';
let blogLink = document.createElement('a');
blogLink.href = './blogs' + blog.Path;
blogLink.href = pathName + 'blogs' + blog.Path;
blogLink.target = '_blank';
blogLink.className = 'block text-lg py-2 text-neutral-600 hover:text-neutral-800 dark:text-neutral-300 dark:hover:text-neutral-100';
blogLink.innerText = "📑 " + blog.Title;

0 comments on commit 6e85050

Please sign in to comment.