mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-10 02:27:29 +00:00
Add JavaScript licenses page
This commit is contained in:
parent
998bd3d7cb
commit
6f8e03e506
@ -7,5 +7,10 @@ module.exports = [
|
||||
const mobile = userAgent.toLowerCase().includes("mobile")
|
||||
return render(200, "pug/home.pug", {mobile})
|
||||
}
|
||||
},
|
||||
{
|
||||
route: "/js-licenses", methods: ["GET"], code: async () => {
|
||||
return render(200, "pug/js-licenses.pug")
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -43,4 +43,4 @@ html
|
||||
h3.footer__colhead About
|
||||
ul.footer__list
|
||||
li: a(href="/privacy") Privacy policy
|
||||
// li: a(href="/js-licenses") JavaScript licenses
|
||||
li: a(href="/js-licenses" data-jslicense=1) JavaScript licenses
|
||||
|
22
pug/js-licenses.pug
Normal file
22
pug/js-licenses.pug
Normal file
@ -0,0 +1,22 @@
|
||||
extends includes/layout.pug
|
||||
|
||||
block head
|
||||
title JavaScript license information
|
||||
|
||||
block content
|
||||
main.js-licenses-page
|
||||
h1 JavaScript license information
|
||||
table#jslicense-labels1
|
||||
thead
|
||||
tr
|
||||
th(scope="col") File
|
||||
th(scope="col") License
|
||||
th(scope="col") Source
|
||||
tbody
|
||||
each path of static.keys()
|
||||
if path.match(/^html\/static\/js\/.*\.js$/)
|
||||
- const file = path.replace(/^html/, "")
|
||||
tr
|
||||
td: a(href=file)= file
|
||||
td: a(href="http://www.gnu.org/licenses/agpl-3.0.html") GNU-AGPL-3.0-or-later
|
||||
td: a(href=file)= file
|
@ -66,3 +66,16 @@ details
|
||||
|
||||
&[open] summary
|
||||
margin-bottom: 16px
|
||||
|
||||
table
|
||||
background-color: c.$bg-darker
|
||||
|
||||
table, td, th
|
||||
border: 1px solid c.$edge-grey
|
||||
border-collapse: collapse
|
||||
|
||||
td, th
|
||||
padding: 4px 8px
|
||||
|
||||
thead, tr:nth-child(even)
|
||||
background-color: c.$bg-darkest
|
||||
|
3
sass/includes/js-licenses-page.sass
Normal file
3
sass/includes/js-licenses-page.sass
Normal file
@ -0,0 +1,3 @@
|
||||
.js-licenses-page
|
||||
max-width: 600px
|
||||
margin: 0 auto
|
@ -9,6 +9,7 @@
|
||||
@use "includes/settings-page.sass"
|
||||
@use "includes/cant-think-page.sass"
|
||||
@use "includes/privacy-page.sass"
|
||||
@use "includes/js-licenses-page.sass"
|
||||
@use "includes/forms.sass"
|
||||
@use "includes/nav.sass"
|
||||
@use "includes/footer.sass"
|
||||
|
@ -18,6 +18,7 @@ const {setInstance} = require("pinski/plugins")
|
||||
server.addPugDir("pug", ["pug/includes"])
|
||||
server.addRoute("/cant-think", "pug/cant-think.pug", "pug")
|
||||
server.addRoute("/privacy", "pug/privacy.pug", "pug")
|
||||
server.addRoute("/js-licenses", "pug/js-licenses.pug", "pug")
|
||||
|
||||
server.addStaticHashTableDir("html/static/js")
|
||||
server.addStaticHashTableDir("html/static/js/elemjs")
|
||||
|
Loading…
Reference in New Issue
Block a user