diff --git a/code/app.lua b/code/app.lua index cfa3606..fb5209b 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.xml", 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..1d4279d --- /dev/null +++ b/code/handlers/RSShandler.lua @@ -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 diff --git a/code/static/panamaracing.css b/code/static/panamaracing.css index f0ddc04..cbcd9a4 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,15 @@ .prclogo { - width: 1440px; + height: 120px; + padding-bottom: 10px; + padding-left: 10px; + padding-top: 10px; +} + +.divider +{ + height: 23px; padding-bottom: 10px; padding-left: 10px; padding-top: 10px; @@ -112,7 +115,7 @@ .header { width: 100%; - max-height: 220px; + max-height: 120px; } .footer @@ -124,18 +127,10 @@ clear: both; } -.djsection -{ - font-family: Helvetica; - font-size: 18px; - text-decoration: inherit; - color: var(--ifm-red); -} - .djsectionmenu { font-family: Helvetica; - font-size: 33px; + font-size: 18px; color: var(--ifm-red); line-height: 1em; z-index: 100; @@ -156,15 +151,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 +165,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 +221,7 @@ padding-right: 5%; width: 40%; } - .h2 - { - font-size: 14px; - } + .footer { margin-top: 15%; @@ -324,6 +310,13 @@ } } +.content +{ + width: 80%; + padding-left: 10%; + padding-right: 10%; +} + .latest { position: relative; @@ -361,10 +354,115 @@ } } -@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; + } + + .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; + } } 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 d9aba37..45d7e88 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..2c84f92 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 %>
- +
+ diff --git a/code/views/rss.etlua b/code/views/rss.etlua new file mode 100644 index 0000000..75ce4aa --- /dev/null +++ b/code/views/rss.etlua @@ -0,0 +1,18 @@ + + + + + + <%= titles['name'] %> + https://<%= titles['url'] %> + Latest uploads + <% for i, file in ipairs(latestpath) do %> + + <%= latestname[i] %> + <%= datapath .. file:gsub("#", "%%23") %> + ]]> + <%= datapath .. file:gsub("#", "%%23") %> + + <% end %> + +