Compare commits

...

9 Commits

Author SHA1 Message Date
b47f7c8e75 Merge branch 'main' into bugfix/escape_urls 2026-03-30 12:17:34 +02:00
692747abc5 divider style 2026-03-26 16:27:32 +01:00
cc62a54571 style tweaks 2026-03-26 16:15:24 +01:00
3165996d6e remove extra slash 2026-03-26 14:54:02 +01:00
e9d4163a5d refactor url+path generation 2026-03-26 14:43:50 +01:00
52cca8eef2 tweak content_type 2026-03-26 14:37:47 +01:00
d88674fe40 tweak content_type 2026-03-26 14:37:19 +01:00
42ebff2c7c rss tweaks 2026-03-26 14:36:26 +01:00
5c7626db66 add rss endpoint 2026-03-26 14:32:42 +01:00
7 changed files with 279 additions and 80 deletions

View File

@ -49,6 +49,11 @@ app:get("/latest.json", function(self)
return handlers.Latesthandler(self) return handlers.Latesthandler(self)
end) end)
app:get("/latest.xml", function(self)
self.titles = page_titles
return handlers.RSShandler(self)
end)
app:get("/*", function(self) app:get("/*", function(self)
self.titles = page_titles self.titles = page_titles
return handlers.Roothandler(self) return handlers.Roothandler(self)

View File

@ -0,0 +1,20 @@
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
self.datapath = host .. '/data/' .. self.titles.url .. '/'
self.latestpath = latest_path
self.latestname = latest_name
return { content_type = "application/rss+xml", layout = require "views.rss" }
end
return RSShandler

View File

@ -11,6 +11,7 @@
.h1 .h1
{ {
font-family: Helvetica; font-family: Helvetica;
font-size: 16px;
color: var(--ifm-white); color: var(--ifm-white);
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
@ -22,9 +23,9 @@
.p .p
{ {
font-family: Helvetica; font-family: Helvetica;
font-size: 6px;
color: var(--ifm-grey); color: var(--ifm-grey);
margin-bottom: 45px; margin-bottom: 45px;
font-size: 10px;
} }
.href .href
@ -37,7 +38,7 @@
{ {
line-height: 16px; line-height: 16px;
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 10px;
margin-bottom: 0; margin-bottom: 0;
margin-top: 0; margin-top: 0;
font-family: Helvetica; font-family: Helvetica;
@ -49,7 +50,7 @@
color: var(--ifm-grey); color: var(--ifm-grey);
line-height: 1.6em; line-height: 1.6em;
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 10px;
text-decoration: none; text-decoration: none;
background: var(--ifm-deep-black); background: var(--ifm-deep-black);
display: inline-flex; display: inline-flex;
@ -61,19 +62,13 @@
.amixlink:hover .amixlink:hover
{ {
font-family: Helvetica;
color: #000; color: #000;
line-height: 1.6em;
font-weight: 600;
font-size: 14px;
background: var(--ifm-red); background: var(--ifm-red);
} }
.body .body
{ {
width: 80%; width: 100%;
padding-left: 10%;
padding-right: 10%;
background-color: var(--ifm-black); background-color: var(--ifm-black);
} }
@ -81,7 +76,7 @@
{ {
font-family: Helvetica; font-family: Helvetica;
font-weight: 900; font-weight: 900;
font-size: 16px; font-size: 12px;
color: var(--ifm-grey); color: var(--ifm-grey);
padding: 5px; padding: 5px;
margin-top: 2%; margin-top: 2%;
@ -93,7 +88,15 @@
.prclogo .prclogo
{ {
width: 1440px; height: 120px;
padding-bottom: 10px;
padding-left: 10px;
padding-top: 10px;
}
.divider
{
height: 23px;
padding-bottom: 10px; padding-bottom: 10px;
padding-left: 10px; padding-left: 10px;
padding-top: 10px; padding-top: 10px;
@ -112,7 +115,7 @@
.header .header
{ {
width: 100%; width: 100%;
max-height: 220px; max-height: 120px;
} }
.footer .footer
@ -124,18 +127,10 @@
clear: both; clear: both;
} }
.djsection
{
font-family: Helvetica;
font-size: 18px;
text-decoration: inherit;
color: var(--ifm-red);
}
.djsectionmenu .djsectionmenu
{ {
font-family: Helvetica; font-family: Helvetica;
font-size: 33px; font-size: 18px;
color: var(--ifm-red); color: var(--ifm-red);
line-height: 1em; line-height: 1em;
z-index: 100; z-index: 100;
@ -156,15 +151,9 @@
.djsection .djsection
{ {
font-family: Helvetica; font-family: Helvetica;
font-size: 33px; font-size: 18px;
text-decoration: inherit;
color: var(--ifm-red); 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 .djsection:hover
@ -176,7 +165,7 @@
{ {
font-family: Helvetica; font-family: Helvetica;
color: var(--ifm-red); color: var(--ifm-red);
font-size: 24px; font-size: 16px;
padding-top: 5px; padding-top: 5px;
border-bottom: 2px solid var(--ifm-red); border-bottom: 2px solid var(--ifm-red);
} }
@ -232,10 +221,7 @@
padding-right: 5%; padding-right: 5%;
width: 40%; width: 40%;
} }
.h2
{
font-size: 14px;
}
.footer .footer
{ {
margin-top: 15%; margin-top: 15%;
@ -324,6 +310,13 @@
} }
} }
.content
{
width: 80%;
padding-left: 10%;
padding-right: 10%;
}
.latest .latest
{ {
position: relative; position: relative;
@ -361,10 +354,115 @@
} }
} }
@media (max-width:767px) @media screen and (min-width: 600px) {
.h1{
font-size: 18px;
}
.p
{ {
.h1mobile font-size: 8px;
}
.mixlink
{
font-size: 12px;
}
.amixlink
{
font-size: 12px;
}
.mixsections
{
font-size: 14px;
}
.h2
{ {
font-size: 18px; font-size: 18px;
} }
.header
{
max-height: 180px;
}
.prclogo
{
height: 180px;
}
.divider
{
height: 35px;
}
.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;
}
.divider
{
height: 43px;
}
.djsectionmenu
{
font-size: 33px;
}
.djsection
{
font-size: 33px;
}
} }

View File

@ -16,6 +16,7 @@
.h1 .h1
{ {
font-family: ArcadeFont; font-family: ArcadeFont;
font-size: 16px;
color: var(--ifm-red); color: var(--ifm-red);
border-top: 3px solid var(--ifm-red); border-top: 3px solid var(--ifm-red);
border-bottom: 3px solid var(--ifm-red); border-bottom: 3px solid var(--ifm-red);
@ -29,9 +30,9 @@
.p .p
{ {
font-family: ArcadeFont; font-family: ArcadeFont;
font-size: 6px;
color: var(--ifm-grey); color: var(--ifm-grey);
margin-bottom: 45px; margin-bottom: 45px;
font-size: 10px;
} }
.href .href
@ -44,7 +45,7 @@
{ {
line-height: 16px; line-height: 16px;
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 10px;
margin-bottom: 0; margin-bottom: 0;
margin-top: 0; margin-top: 0;
font-family: ArcadeFont; font-family: ArcadeFont;
@ -56,7 +57,7 @@
color: var(--ifm-grey); color: var(--ifm-grey);
line-height: 1.6em; line-height: 1.6em;
font-weight: 600; font-weight: 600;
font-size: 14px; font-size: 10px;
text-decoration: none; text-decoration: none;
background: var(--ifm-deep-black); background: var(--ifm-deep-black);
display: inline-flex; display: inline-flex;
@ -68,11 +69,7 @@
.amixlink:hover .amixlink:hover
{ {
font-family: ArcadeFont;
color: #000; color: #000;
line-height: 1.6em;
font-weight: 600;
font-size: 14px;
background: var(--ifm-red); background: var(--ifm-red);
} }
@ -88,7 +85,7 @@
{ {
font-family: ArcadeFont; font-family: ArcadeFont;
font-weight: 900; font-weight: 900;
font-size: 16px; font-size: 12px;
color: var(--ifm-grey); color: var(--ifm-grey);
padding: 5px; padding: 5px;
margin-top: 2%; margin-top: 2%;
@ -109,7 +106,7 @@
.h2 .h2
{ {
font-family: ArcadeFont; font-family: ArcadeFont;
font-size: 24px; font-size: 16px;
color: var(--ifm-grey); color: var(--ifm-grey);
font-weight: 200; font-weight: 200;
border-bottom: 2px solid var(--ifm-grey); border-bottom: 2px solid var(--ifm-grey);
@ -132,18 +129,10 @@
clear: both; clear: both;
} }
.djsection
{
font-family: ArcadeFont;
font-size: 18px;
text-decoration: inherit;
color: var(--ifm-red);
}
.djsectionmenu .djsectionmenu
{ {
font-family: ArcadeFont; font-family: ArcadeFont;
font-size: 33px; font-size: 18px;
color: var(--ifm-red); color: var(--ifm-red);
line-height: 1em; line-height: 1em;
z-index: 100; z-index: 100;
@ -164,15 +153,9 @@
.djsection .djsection
{ {
font-family: ArcadeFont; font-family: ArcadeFont;
font-size: 33px; font-size: 18px;
text-decoration: inherit;
color: var(--ifm-red); 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 .djsection:hover
@ -184,7 +167,7 @@
{ {
font-family: ArcadeFont; font-family: ArcadeFont;
color: var(--ifm-red); color: var(--ifm-red);
font-size: 24px; font-size: 16px;
padding-top: 5px; padding-top: 5px;
border-bottom: 2px solid var(--ifm-red); border-bottom: 2px solid var(--ifm-red);
} }
@ -240,10 +223,7 @@
padding-right: 5%; padding-right: 5%;
width: 40%; width: 40%;
} }
.h2
{
font-size: 14px;
}
.footer .footer
{ {
margin-top: 15%; margin-top: 15%;
@ -369,10 +349,85 @@
} }
} }
@media (max-width:767px) @media screen and (min-width: 600px) {
.h1{
font-size: 18px;
}
.p
{ {
.h1mobile font-size: 8px;
}
.mixlink
{
font-size: 12px;
}
.amixlink
{
font-size: 12px;
}
.mixsections
{
font-size: 14px;
}
.h2
{ {
font-size: 18px; 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;
}
} }

View File

@ -19,7 +19,7 @@
<header class="header"> <header class="header">
<a href="/"><img src="/static/<%= titles['header'] %>" alt="videohotmix logo" class="hotmixlogo"/></a> <a href="/"><img src="/static/<%= titles['header'] %>" alt="videohotmix logo" class="hotmixlogo"/></a>
</header> </header>
<h1 class="h1 h1mobile">Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)<br> <h1 class="h1">Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)<br>
<%= titles.name %><br> <%= titles.name %><br>
Sharing <%= total[0] %> files</h1> Sharing <%= total[0] %> files</h1>

View File

@ -15,18 +15,20 @@
<header class="header"> <header class="header">
<a href="/"><img src="/static/<%= titles['header'] %>" alt="prc logo" class="prclogo"/></a> <a href="/"><img src="/static/<%= titles['header'] %>" alt="prc logo" class="prclogo"/></a>
</header> </header>
<h1 class="h1 h1mobile">Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)<br> <div class="content">
<h1 class="h1">Tons Of Mix - Downloads & Streams (right click + Save link as... for downloads)<br>
<%= titles.name %><br> <%= titles.name %><br>
Sharing <%= total[0] %> files Sharing <%= total[0] %> files
</h1> </h1>
<img src="/static/panamaracing.club_divider.png"> </div>
<img class="divider" src="/static/panamaracing.club_divider.png">
<div class="content">
<% content_for("inner") %> <% content_for("inner") %>
</div>
<img class="divider" src="/static/panamaracing.club_divider.png">
<div class="content">
<section class="latest"> <section class="latest">
<div class="latest_files"> <div class="latest_files">
<br>
<br>
<h1 class="h1">Latest uploads:</h1> <h1 class="h1">Latest uploads:</h1>
<% for i, file in ipairs(latestpath) do %> <% for i, file in ipairs(latestpath) do %>
<a class="amixlink" href="<%= '/data/' .. titles.url .. '/' .. file:gsub("#", "%%23") %>"> <a class="amixlink" href="<%= '/data/' .. titles.url .. '/' .. file:gsub("#", "%%23") %>">
@ -36,6 +38,7 @@
<% end %> <% end %>
</div> </div>
</section> </section>
</div>
<img class="divider" src="/static/panamaracing.club_divider.png">
</body> </body>
</html> </html>

18
code/views/rss.etlua Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="https://<%= titles['url'] %>/latest.xml" rel="self" type="application/rss+xml" />
<title><%= titles['name'] %></title>
<link>https://<%= titles['url'] %></link>
<description>Latest uploads</description>
<% for i, file in ipairs(latestpath) do %>
<item>
<title><%= latestname[i] %></title>
<link><%= datapath .. file:gsub("#", "%%23") %></link>
<description><![CDATA[<%= latestname[i] %>]]></description>
<guid><%= datapath .. file:gsub("#", "%%23") %></guid>
</item>
<% end %>
</channel>
</rss>