some layout stuff

This commit is contained in:
dreamer 2020-10-16 14:08:38 +02:00
parent d88e0c6d35
commit 1dd6538ae7
4 changed files with 30 additions and 4 deletions

View File

@ -4,6 +4,7 @@ local json_params = require("lapis.application").json_params
local app = lapis.Application()
app:enable("etlua")
app.layout = require "views.layout"
local autoload = require("lapis.util").autoload
local handlers = autoload("handlers")

21
code/views/layout.etlua Normal file
View File

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Previously On Intergalactic FM</title>
<meta charset="UTF-8">
<style>
body {
background-color: #808080;
}
.nav_bar {
font-size: 20px;
margin: auto;
text-align:center;
}
</style>
</head>
<body>
<% content_for("inner") %>
</body>
</html>

View File

@ -0,0 +1,5 @@
<div class="nav_bar">
<a href="<%= url_for("station")..1 %>"><span style="color:#ffffff !important;">CBS</span></a> |
<a href="<%= url_for("station")..2 %>"><span style="color:#ffffff !important;">Fetish</span></a> |
<a href="<%= url_for("station")..3 %>"><span style="color:#ffffff !important;">TDM</span></a>
</div>

View File

@ -1,13 +1,12 @@
<meta charset="UTF-8">
<div class="airtimes" style="background-color: black;">
<% render("views.navigation") %>
<div class="airtimes" style="background-color: black; width: 900px; margin:0 auto;">
<% for i, item in ipairs(airtimes) do %>
<div style="clear:both;height:5px;"></div>
<div id="playingnowpic">
<% if string.len(item.img_url) == 0 then %>
<% item.img_url = "blanco.png" %>
<% end %>
<a href="https://www.intergalactic.fm/images/covers/<%= item.img_url or "blanco.png" %>" rel="ia_lightbox">
<img style="float:left;margin-right:10px;margin-bottom:0px;height:100px;" src="https://www.intergalactic.fm/images/covers/<%= item.img_url or "blanco.png" %>">
</a>