From 5c7626db662ddb99c862e0c0294987c6527c7f63 Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 14:32:42 +0100 Subject: [PATCH 1/8] add rss endpoint --- code/app.lua | 5 +++++ code/handlers/RSShandler.lua | 23 +++++++++++++++++++++++ code/views/rss.etlua | 18 ++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 code/handlers/RSShandler.lua create mode 100644 code/views/rss.etlua diff --git a/code/app.lua b/code/app.lua index cfa3606..c2cd8f2 100644 --- a/code/app.lua +++ b/code/app.lua @@ -49,6 +49,11 @@ app:get("/latest.json", function(self) return handlers.Latesthandler(self) end) +app:get("/latest.rss", function(self) + self.titles = page_titles + return handlers.RSShandler(self) +end) + app:get("/*", function(self) self.titles = page_titles return handlers.Roothandler(self) diff --git a/code/handlers/RSShandler.lua b/code/handlers/RSShandler.lua new file mode 100644 index 0000000..d9fdf08 --- /dev/null +++ b/code/handlers/RSShandler.lua @@ -0,0 +1,23 @@ +local to_json = require("lapis.util").to_json +local escape = require("lapis.util").escape +local autoload = require("lapis.util").autoload +local config = require("lapis.config") +local hotmixes = autoload("hotmixes") + +local function RSShandler(self) + + local path = config.get().mount .. self.titles.url + local latest_path, latest_name = hotmixes.utils.these_latest( path ) + + local host = self.req.parsed_url.scheme .. '://' .. self.req.parsed_url.host + local data_path = host .. '/data/' .. self.titles.url .. '/' + local latest_json = {} + latest_json["files"] = {} + + self.latestpath = latest_path + self.latestname = latest_name + + return { content_type = "text/rss", layout = require "views.rss" } +end + +return RSShandler diff --git a/code/views/rss.etlua b/code/views/rss.etlua new file mode 100644 index 0000000..5f76c1e --- /dev/null +++ b/code/views/rss.etlua @@ -0,0 +1,18 @@ + + + + + + Hotmixes + <%= titles['url'] %> + Latest uploads + <% for i, file in ipairs(latestpath) do %> + + <%= latestname[i] %> + <%= 'https://' .. titles.url .. '/data/' .. titles.url .. '/' .. file:gsub("#", "%%23") %> + ]]> + <%= 'https://' .. titles.url .. '/data/' .. titles.url .. '/' .. file:gsub("#", "%%23") %> + + <% end %> + + From 42ebff2c7caa65e7d219baed2a60c7ad693f8bab Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 14:36:26 +0100 Subject: [PATCH 2/8] rss tweaks --- code/app.lua | 2 +- code/views/rss.etlua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/code/app.lua b/code/app.lua index c2cd8f2..fb5209b 100644 --- a/code/app.lua +++ b/code/app.lua @@ -49,7 +49,7 @@ app:get("/latest.json", function(self) return handlers.Latesthandler(self) end) -app:get("/latest.rss", function(self) +app:get("/latest.xml", function(self) self.titles = page_titles return handlers.RSShandler(self) end) diff --git a/code/views/rss.etlua b/code/views/rss.etlua index 5f76c1e..8ba2bc3 100644 --- a/code/views/rss.etlua +++ b/code/views/rss.etlua @@ -3,8 +3,8 @@ - Hotmixes - <%= titles['url'] %> + <%= titles['name'] %> + https://<%= titles['url'] %> Latest uploads <% for i, file in ipairs(latestpath) do %> From d88674fe4032e573bc08c3175d8caef2de664039 Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 14:37:19 +0100 Subject: [PATCH 3/8] tweak content_type --- code/handlers/RSShandler.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/handlers/RSShandler.lua b/code/handlers/RSShandler.lua index d9fdf08..c08543b 100644 --- a/code/handlers/RSShandler.lua +++ b/code/handlers/RSShandler.lua @@ -17,7 +17,7 @@ local function RSShandler(self) self.latestpath = latest_path self.latestname = latest_name - return { content_type = "text/rss", layout = require "views.rss" } + return { content_type = "text/rss+xml", layout = require "views.rss" } end return RSShandler From 52cca8eef22ffbe493bf111d9a3e4c92b4cc23e1 Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 14:37:47 +0100 Subject: [PATCH 4/8] tweak content_type --- code/handlers/RSShandler.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/handlers/RSShandler.lua b/code/handlers/RSShandler.lua index c08543b..41e4764 100644 --- a/code/handlers/RSShandler.lua +++ b/code/handlers/RSShandler.lua @@ -17,7 +17,7 @@ local function RSShandler(self) self.latestpath = latest_path self.latestname = latest_name - return { content_type = "text/rss+xml", layout = require "views.rss" } + return { content_type = "application/rss+xml", layout = require "views.rss" } end return RSShandler From e9d4163a5da684343c10843f2dff440771c9fd15 Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 14:43:50 +0100 Subject: [PATCH 5/8] refactor url+path generation --- code/handlers/RSShandler.lua | 5 +---- code/views/rss.etlua | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/code/handlers/RSShandler.lua b/code/handlers/RSShandler.lua index 41e4764..1d4279d 100644 --- a/code/handlers/RSShandler.lua +++ b/code/handlers/RSShandler.lua @@ -10,10 +10,7 @@ local function RSShandler(self) local latest_path, latest_name = hotmixes.utils.these_latest( path ) local host = self.req.parsed_url.scheme .. '://' .. self.req.parsed_url.host - local data_path = host .. '/data/' .. self.titles.url .. '/' - local latest_json = {} - latest_json["files"] = {} - + self.datapath = host .. '/data/' .. self.titles.url .. '/' self.latestpath = latest_path self.latestname = latest_name diff --git a/code/views/rss.etlua b/code/views/rss.etlua index 8ba2bc3..f639fc8 100644 --- a/code/views/rss.etlua +++ b/code/views/rss.etlua @@ -9,9 +9,9 @@ <% for i, file in ipairs(latestpath) do %> <%= latestname[i] %> - <%= 'https://' .. titles.url .. '/data/' .. titles.url .. '/' .. file:gsub("#", "%%23") %> + <%= datapath .. '/' .. file:gsub("#", "%%23") %> ]]> - <%= 'https://' .. titles.url .. '/data/' .. titles.url .. '/' .. file:gsub("#", "%%23") %> + <%= datapath .. '/' .. file:gsub("#", "%%23") %> <% end %> From 3165996d6e64d6b41096cc82ad792ab4e728bc1b Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 14:54:02 +0100 Subject: [PATCH 6/8] remove extra slash --- code/views/rss.etlua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/views/rss.etlua b/code/views/rss.etlua index f639fc8..75ce4aa 100644 --- a/code/views/rss.etlua +++ b/code/views/rss.etlua @@ -9,9 +9,9 @@ <% for i, file in ipairs(latestpath) do %> <%= latestname[i] %> - <%= datapath .. '/' .. file:gsub("#", "%%23") %> + <%= datapath .. file:gsub("#", "%%23") %> ]]> - <%= datapath .. '/' .. file:gsub("#", "%%23") %> + <%= datapath .. file:gsub("#", "%%23") %> <% end %> From cc62a545710a03a9c8ffdb1898f4c2c7db8b8eaa Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 16:15:24 +0100 Subject: [PATCH 7/8] style tweaks --- code/static/panamaracing.css | 153 ++++++++++++++++++++++++++--------- code/static/videohotmix.css | 123 ++++++++++++++++++++-------- code/views/layout.etlua | 2 +- code/views/prc_layout.etlua | 17 ++-- 4 files changed, 216 insertions(+), 79 deletions(-) diff --git a/code/static/panamaracing.css b/code/static/panamaracing.css index f0ddc04..a0c093c 100644 --- a/code/static/panamaracing.css +++ b/code/static/panamaracing.css @@ -11,6 +11,7 @@ .h1 { font-family: Helvetica; + font-size: 16px; color: var(--ifm-white); padding-top: 5px; padding-bottom: 5px; @@ -22,9 +23,9 @@ .p { font-family: Helvetica; + font-size: 6px; color: var(--ifm-grey); margin-bottom: 45px; - font-size: 10px; } .href @@ -37,7 +38,7 @@ { line-height: 16px; font-weight: 600; - font-size: 14px; + font-size: 10px; margin-bottom: 0; margin-top: 0; font-family: Helvetica; @@ -49,7 +50,7 @@ color: var(--ifm-grey); line-height: 1.6em; font-weight: 600; - font-size: 14px; + font-size: 10px; text-decoration: none; background: var(--ifm-deep-black); display: inline-flex; @@ -61,19 +62,13 @@ .amixlink:hover { - font-family: Helvetica; color: #000; - line-height: 1.6em; - font-weight: 600; - font-size: 14px; background: var(--ifm-red); } .body { - width: 80%; - padding-left: 10%; - padding-right: 10%; + width: 100%; background-color: var(--ifm-black); } @@ -81,7 +76,7 @@ { font-family: Helvetica; font-weight: 900; - font-size: 16px; + font-size: 12px; color: var(--ifm-grey); padding: 5px; margin-top: 2%; @@ -93,7 +88,7 @@ .prclogo { - width: 1440px; + height: 120px; padding-bottom: 10px; padding-left: 10px; padding-top: 10px; @@ -112,7 +107,7 @@ .header { width: 100%; - max-height: 220px; + max-height: 120px; } .footer @@ -124,14 +119,6 @@ clear: both; } -.djsection -{ - font-family: Helvetica; - font-size: 18px; - text-decoration: inherit; - color: var(--ifm-red); -} - .djsectionmenu { font-family: Helvetica; @@ -156,15 +143,9 @@ .djsection { font-family: Helvetica; - font-size: 33px; + font-size: 18px; + text-decoration: inherit; color: var(--ifm-red); - line-height: 1em; - margin-bottom: 0px; - margin-top: 0px; - padding-top: 5px; - padding-left: 10px; - padding-right: 10px; - padding-bottom: 5px; } .djsection:hover @@ -176,7 +157,7 @@ { font-family: Helvetica; color: var(--ifm-red); - font-size: 24px; + font-size: 16px; padding-top: 5px; border-bottom: 2px solid var(--ifm-red); } @@ -232,10 +213,7 @@ padding-right: 5%; width: 40%; } - .h2 - { - font-size: 14px; - } + .footer { margin-top: 15%; @@ -323,6 +301,12 @@ column-count: 1; } } +.content +{ + width: 80%; + padding-left: 10%; + padding-right: 10%; +} .latest { @@ -361,10 +345,105 @@ } } -@media (max-width:767px) -{ - .h1mobile +@media screen and (min-width: 600px) { + + .h1{ + font-size: 18px; + } + + .p + { + font-size: 8px; + } + + .mixlink + { + font-size: 12px; + } + + .amixlink + { + font-size: 12px; + } + + .mixsections + { + font-size: 14px; + } + + .h2 { font-size: 18px; } + + .header + { + max-height: 180px; + } + + .prclogo + { + height: 180px; + } + + .djsectionmenu + { + font-size: 25px; + } + + .djsection + { + font-size: 28px; + } +} + +@media screen and (min-width: 768px) { + .h1{ + font-size: 26px; + } + + .p + { + font-size: 10px; + } + + .mixlink + { + font-size: 14px; + } + + .amixlink + { + font-size: 14px; + } + + .mixsections + { + font-size: 16px; + } + + .h2 + { + font-size: 24px; + } + + .header + { + max-height: 220px; + } + + .prclogo + { + height: 220px; + } + + .djsectionmenu + { + font-size: 33px; + } + + .djsection + { + font-size: 33px; + } } diff --git a/code/static/videohotmix.css b/code/static/videohotmix.css index c25d4ca..5ac8211 100644 --- a/code/static/videohotmix.css +++ b/code/static/videohotmix.css @@ -16,6 +16,7 @@ .h1 { font-family: ArcadeFont; + font-size: 16px; color: var(--ifm-red); border-top: 3px solid var(--ifm-red); border-bottom: 3px solid var(--ifm-red); @@ -29,9 +30,9 @@ .p { font-family: ArcadeFont; + font-size: 6px; color: var(--ifm-grey); margin-bottom: 45px; - font-size: 10px; } .href @@ -44,7 +45,7 @@ { line-height: 16px; font-weight: 600; - font-size: 14px; + font-size: 10px; margin-bottom: 0; margin-top: 0; font-family: ArcadeFont; @@ -56,7 +57,7 @@ color: var(--ifm-grey); line-height: 1.6em; font-weight: 600; - font-size: 14px; + font-size: 10px; text-decoration: none; background: var(--ifm-deep-black); display: inline-flex; @@ -68,11 +69,7 @@ .amixlink:hover { - font-family: ArcadeFont; color: #000; - line-height: 1.6em; - font-weight: 600; - font-size: 14px; background: var(--ifm-red); } @@ -88,7 +85,7 @@ { font-family: ArcadeFont; font-weight: 900; - font-size: 16px; + font-size: 12px; color: var(--ifm-grey); padding: 5px; margin-top: 2%; @@ -109,7 +106,7 @@ .h2 { font-family: ArcadeFont; - font-size: 24px; + font-size: 16px; color: var(--ifm-grey); font-weight: 200; border-bottom: 2px solid var(--ifm-grey); @@ -132,18 +129,10 @@ clear: both; } -.djsection -{ - font-family: ArcadeFont; - font-size: 18px; - text-decoration: inherit; - color: var(--ifm-red); -} - .djsectionmenu { font-family: ArcadeFont; - font-size: 33px; + font-size: 18px; color: var(--ifm-red); line-height: 1em; z-index: 100; @@ -164,15 +153,9 @@ .djsection { font-family: ArcadeFont; - font-size: 33px; + font-size: 18px; + text-decoration: inherit; color: var(--ifm-red); - line-height: 1em; - margin-bottom: 0px; - margin-top: 0px; - padding-top: 5px; - padding-left: 10px; - padding-right: 10px; - padding-bottom: 5px; } .djsection:hover @@ -184,7 +167,7 @@ { font-family: ArcadeFont; color: var(--ifm-red); - font-size: 24px; + font-size: 16px; padding-top: 5px; border-bottom: 2px solid var(--ifm-red); } @@ -240,10 +223,7 @@ padding-right: 5%; width: 40%; } - .h2 - { - font-size: 14px; - } + .footer { margin-top: 15%; @@ -369,10 +349,85 @@ } } -@media (max-width:767px) -{ - .h1mobile +@media screen and (min-width: 600px) { + + .h1{ + font-size: 18px; + } + + .p + { + font-size: 8px; + } + + .mixlink + { + font-size: 12px; + } + + .amixlink + { + font-size: 12px; + } + + .mixsections + { + font-size: 14px; + } + + .h2 { font-size: 18px; } + + .djsectionmenu + { + font-size: 25px; + } + + .djsection + { + font-size: 28px; + } +} + +@media screen and (min-width: 768px) { + .h1{ + font-size: 26px; + } + + .p + { + font-size: 10px; + } + + .mixlink + { + font-size: 14px; + } + + .amixlink + { + font-size: 14px; + } + + .mixsections + { + font-size: 16px; + } + + .h2 + { + font-size: 24px; + } + + .djsectionmenu + { + font-size: 33px; + } + + .djsection + { + font-size: 33px; + } } diff --git a/code/views/layout.etlua b/code/views/layout.etlua index e419a41..6006044 100644 --- a/code/views/layout.etlua +++ b/code/views/layout.etlua @@ -19,7 +19,7 @@
-

Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)
+

Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)
<%= titles.name %>
Sharing <%= total[0] %> files

diff --git a/code/views/prc_layout.etlua b/code/views/prc_layout.etlua index e0239bd..6b5087b 100644 --- a/code/views/prc_layout.etlua +++ b/code/views/prc_layout.etlua @@ -15,18 +15,20 @@
-

Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)
+
+

Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)
<%= titles.name %>
Sharing <%= total[0] %> files

- - +
+ +
<% content_for("inner") %> - +
+ +
-
-

Latest uploads:

<% for i, file in ipairs(latestpath) do %> "> @@ -36,6 +38,7 @@ <% end %>
- +
+ From 692747abc5e17601ae8543504b244292d9f7c6cd Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 26 Mar 2026 16:27:32 +0100 Subject: [PATCH 8/8] divider style --- code/static/panamaracing.css | 21 ++++++++++++++++++++- code/views/prc_layout.etlua | 6 +++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/code/static/panamaracing.css b/code/static/panamaracing.css index a0c093c..cbcd9a4 100644 --- a/code/static/panamaracing.css +++ b/code/static/panamaracing.css @@ -94,6 +94,14 @@ padding-top: 10px; } +.divider +{ + height: 23px; + padding-bottom: 10px; + padding-left: 10px; + padding-top: 10px; +} + .h2 { font-family: Helvetica; @@ -122,7 +130,7 @@ .djsectionmenu { font-family: Helvetica; - font-size: 33px; + font-size: 18px; color: var(--ifm-red); line-height: 1em; z-index: 100; @@ -301,6 +309,7 @@ column-count: 1; } } + .content { width: 80%; @@ -386,6 +395,11 @@ height: 180px; } + .divider + { + height: 35px; + } + .djsectionmenu { font-size: 25px; @@ -437,6 +451,11 @@ height: 220px; } + .divider + { + height: 43px; + } + .djsectionmenu { font-size: 33px; diff --git a/code/views/prc_layout.etlua b/code/views/prc_layout.etlua index 6b5087b..2c84f92 100644 --- a/code/views/prc_layout.etlua +++ b/code/views/prc_layout.etlua @@ -21,11 +21,11 @@ Sharing <%= total[0] %> files

- +
<% content_for("inner") %>
- +
@@ -39,6 +39,6 @@
- +