serverless front-end, style optimize

This commit is contained in:
Evert Prants 2020-02-08 11:17:13 +02:00
parent f2be64cdb7
commit 25e83a7c30
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
6 changed files with 14 additions and 42 deletions

View File

@ -13,7 +13,7 @@
<section class="ircclient"> <section class="ircclient">
<div class="coverwindow" id="authdialog"> <div class="coverwindow" id="authdialog">
<div class="wrapper"> <div class="wrapper">
<h1 class="grade1" title="Teemant"><img src="/image/diamond.svg" alt="Teemant"/></h1> <h1 class="grade1" title="Teemant"><img src="static/image/diamond.svg" alt="Teemant"/></h1>
<i class="grade3" id="connmsg">Think of a nickname</i> <i class="grade3" id="connmsg">Think of a nickname</i>
<form action="" id="IRCConnector"> <form action="" id="IRCConnector">
<label for="nickname">Nickname</label> <label for="nickname">Nickname</label>

View File

@ -100,9 +100,7 @@ async function createSocket (address, port, ssl, useTranslator) {
if (!useTranslator) { if (!useTranslator) {
let conn = address let conn = address
if (port && (port < 6000 || port > 7000)) { if (port) conn = address + ':' + port
conn = address + ':' + port
}
let tSock = new WebSocket(proto + '://' + conn) let tSock = new WebSocket(proto + '://' + conn)
try { try {
await waitForSocketOpen(tSock) await waitForSocketOpen(tSock)

View File

@ -11,23 +11,8 @@ const pubdir = path.join(__dirname, 'public')
const port = config.server.port || 8080 const port = config.server.port || 8080
const cacheAge = 365 * 24 * 60 * 60 * 1000 const cacheAge = 365 * 24 * 60 * 60 * 1000
process.stdin.resume()
router.get('/', function (req, res) {
res.sendFile(path.join(pubdir, '/index.html'))
})
router.get('/:server?*', function (req, res) {
res.sendFile(path.join(pubdir, '/index.html'))
})
app.use('/', express.static(pubdir, { maxAge: cacheAge })) app.use('/', express.static(pubdir, { maxAge: cacheAge }))
app.use('/', express.static(path.join(pubdir, 'icons'), { maxAge: cacheAge }))
app.use('/', express.static(path.join(pubdir, 'static'), { maxAge: cacheAge }))
app.use('/:server', express.static(pubdir, { maxAge: cacheAge })) app.use('/:server', express.static(pubdir, { maxAge: cacheAge }))
app.use('/:server', express.static(path.join(pubdir, 'icons'), { maxAge: cacheAge }))
app.use('/:server', express.static(path.join(pubdir, 'static'), { maxAge: cacheAge }))
app.use('/', router) app.use('/', router)
app.listen(port, function () { app.listen(port, function () {

View File

@ -1,4 +1,3 @@
// Run `stylus -w styl -o css` to compile
props(prop, args) props(prop, args)
-webkit-{prop} args -webkit-{prop} args
-moz-{prop} args -moz-{prop} args
@ -99,6 +98,10 @@ body
transition transform 0.2s linear transition transform 0.2s linear
&:hover &:hover
transform: rotateZ(-90deg); transform: rotateZ(-90deg);
.open_settings
background-image: url(../static/image/settings.svg)
background-repeat: no-repeat
background-size: contain
.tabby .tabby
display: inline-block display: inline-block
height: 56px height: 56px
@ -152,6 +155,10 @@ body
display: none; display: none;
opacity: 0.5; opacity: 0.5;
cursor: pointer; cursor: pointer;
.smsc-nicklistbtn
background-image: url(../static/image/users.svg)
background-repeat: no-repeat
background-size: contain
.topicbar .topicbar
position: absolute; position: absolute;
top: 0; top: 0;
@ -299,6 +306,10 @@ body
top: 5px; top: 5px;
right: 5px; right: 5px;
cursor: pointer; cursor: pointer;
.sendbutton
background-image: url(../static/image/send.svg)
background-repeat: no-repeat
background-size: contain
@media all and (max-width: 600px) @media all and (max-width: 600px)
.vnicks .vnicks

View File

@ -59,10 +59,6 @@ box-shadow()
.toolbar .toolbar
background-color: #00c7e0 background-color: #00c7e0
box-shadow 2px 2px 4px #cecece box-shadow 2px 2px 4px #cecece
.open_settings
background-image: url(/image/settings.svg)
background-repeat: no-repeat
background-size: contain
.tabby .tabby
.tab .tab
background-color: #29e1ff background-color: #29e1ff
@ -87,9 +83,6 @@ box-shadow()
background-color: #00c7e8 background-color: #00c7e8
.chatarea .chatarea
.smsc-nicklistbtn .smsc-nicklistbtn
background-image: url(/image/users.svg)
background-repeat: no-repeat
background-size: contain
background-color: #00bcd4 background-color: #00bcd4
border: 5px solid #389dbb border: 5px solid #389dbb
.topicbar .topicbar
@ -125,10 +118,6 @@ box-shadow()
input input
border: 1px solid #929292 border: 1px solid #929292
box-shadow inset 4px 4px 8px #d8d8d8 box-shadow inset 4px 4px 8px #d8d8d8
.sendbutton
background-image: url(/image/send.svg)
background-repeat: no-repeat
background-size: contain
.message .message
&.type_simple &.type_simple

View File

@ -62,10 +62,6 @@ a:hover
.toolbar .toolbar
background-color: #008e8e background-color: #008e8e
box-shadow 2px 2px 4px #585858 box-shadow 2px 2px 4px #585858
.open_settings
background-image: url(/image/settings.svg)
background-repeat: no-repeat
background-size: contain
.tabby .tabby
.tab .tab
&.hot &.hot
@ -92,9 +88,6 @@ a:hover
background-color: #00859a background-color: #00859a
.chatarea .chatarea
.smsc-nicklistbtn .smsc-nicklistbtn
background-image: url(/image/users.svg)
background-repeat: no-repeat
background-size: contain
background-color: #00bcd4 background-color: #00bcd4
border: 5px solid #389dbb border: 5px solid #389dbb
.topicbar .topicbar
@ -136,10 +129,6 @@ a:hover
background-color: #002b36 background-color: #002b36
border: 1px solid #008e8e border: 1px solid #008e8e
color: white color: white
.sendbutton
background-image: url(/image/send.svg)
background-repeat: no-repeat
background-size: contain
.message .message
color: white color: white