From f899f2af2178de136b75580b70e3fe3ba97ab221 Mon Sep 17 00:00:00 2001
From: tposejank <81495861+tposejank@users.noreply.github.com>
Date: Fri, 14 Jun 2024 00:15:31 -0400
Subject: [PATCH] broadcast!
---
broadcast/index.html | 41 +++++++++++++++++++++++++++
broadcast/js/blog.js | 23 ++++++++++++++++
broadcast/read/index.html | 43 +++++++++++++++++++++++++++++
broadcast/read/js/blog.js | 25 +++++++++++++++++
css/style.css | 58 +++++++++++++++++++++++++++++++++++++++
items/view/js/item.js | 2 +-
js/script.js | 3 +-
7 files changed, 193 insertions(+), 2 deletions(-)
create mode 100644 broadcast/index.html
create mode 100644 broadcast/js/blog.js
create mode 100644 broadcast/read/index.html
create mode 100644 broadcast/read/js/blog.js
diff --git a/broadcast/index.html b/broadcast/index.html
new file mode 100644
index 0000000..d1fbdb1
--- /dev/null
+++ b/broadcast/index.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+ Broadcast - FNLookup
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/broadcast/js/blog.js b/broadcast/js/blog.js
new file mode 100644
index 0000000..ab54db1
--- /dev/null
+++ b/broadcast/js/blog.js
@@ -0,0 +1,23 @@
+function loadBlog() {
+ fetch('https://raw.githubusercontent.com/FNLookup/fnlookup-blog/main/manifest.json')
+ .then(response => response.json())
+ .then(json => {
+ for (blog of json.directory) {
+ async function createBlog() {
+ let information = await fetch('https://raw.githubusercontent.com/FNLookup/fnlookup-blog/main/' + blog.id + '/info.json')
+ let infofile = await information.json()
+
+ document.getElementById('blog-entries').innerHTML += `
+
+
+
+
+
+ `
+ }
+
+ createBlog()
+ }
+ })
+ .catch(error => console.error(error));
+}
\ No newline at end of file
diff --git a/broadcast/read/index.html b/broadcast/read/index.html
new file mode 100644
index 0000000..9050ca1
--- /dev/null
+++ b/broadcast/read/index.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+ Broadcast - FNLookup
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/broadcast/read/js/blog.js b/broadcast/read/js/blog.js
new file mode 100644
index 0000000..040ca4f
--- /dev/null
+++ b/broadcast/read/js/blog.js
@@ -0,0 +1,25 @@
+function loadBlogData() {
+ let params = new URLSearchParams(window.location.search)
+
+ let blogId = params.get('id')
+
+ fetch('https://raw.githubusercontent.com/FNLookup/fnlookup-blog/main/' + blogId + '/BLOG_DATA.md')
+ .then(response => response.text())
+ .then(text => {
+ const content = document.getElementById('blog-data');
+ content.innerHTML = marked.parse(text);
+
+ for (let child of content.children) {
+ for (let childrenofthechild of child.children) {
+ let nodename = childrenofthechild.nodeName
+
+ if (nodename == 'IMG') {
+ let stupidSplit = childrenofthechild.src.split('/')
+ childrenofthechild.src = 'https://raw.githubusercontent.com/FNLookup/fnlookup-blog/main/' + blogId + '/' + stupidSplit[stupidSplit.length - 1]
+ }
+ }
+
+ }
+ })
+ .catch(error => console.error(error));
+}
\ No newline at end of file
diff --git a/css/style.css b/css/style.css
index b67e871..d829142 100644
--- a/css/style.css
+++ b/css/style.css
@@ -263,6 +263,16 @@ a.link-underline:hover {
position: relative;
}
+.navigation-part popup {
+ position: absolute;
+ right: 5rem;
+ background-color: #101C40;
+ padding: 1rem;
+ border-radius: 15px;
+ font-family: headings-squash;
+ width: 150px;
+}
+
.navbar-button,
.part-button {
padding: .8rem 1rem;
@@ -3586,6 +3596,54 @@ jam-track {
padding-left: 1rem;
}
+.fnlookup-blog-posts {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+.blog-post {
+ margin: 0.5rem;
+ background-color: var(--card-background-color);
+ overflow: hidden;
+ border-radius: 15px;
+}
+
+.blog-post .information {
+ padding: 1rem;
+}
+
+.blog-post img {
+ width: 100%;
+ display: block;
+}
+
+.blog-post-big-image-container {
+ max-height: 300px;
+ overflow: hidden;
+ border-radius: 15px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.blog-post-big-image-container img {
+ width: 100%;
+ display: block;
+}
+
+.blog-data {
+ font-family: headings-squash;
+}
+
+.blog-data * {
+ margin: 0.5rem 0;
+}
+
+.blog-data img {
+ width: 50%;
+ height: 50%;
+}
+
.cookie-container {
width: 100%;
height: 100%;
diff --git a/items/view/js/item.js b/items/view/js/item.js
index eebe9a5..83518d8 100644
--- a/items/view/js/item.js
+++ b/items/view/js/item.js
@@ -373,7 +373,7 @@ function init() {
let ds = gne('a');
ds.innerText = rSince;
- if (dsince == 0) ds.innerHTML = 'Today';
+ if (dsince == 0) ds.innerHTML = 'Today';
right.append(ds);
diff --git a/js/script.js b/js/script.js
index 71c70be..b2ca60d 100644
--- a/js/script.js
+++ b/js/script.js
@@ -49,7 +49,8 @@ function i() {
-
+
+ ${(localStorage.popupVersion != '0.1' || localStorage.popupVersion == undefined ? `
>>>> NEW! >>>> Broadcast!` : '')}