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">
<div class="coverwindow" id="authdialog">
<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>
<form action="" id="IRCConnector">
<label for="nickname">Nickname</label>

View File

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

View File

@ -11,23 +11,8 @@ const pubdir = path.join(__dirname, 'public')
const port = config.server.port || 8080
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(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(path.join(pubdir, 'icons'), { maxAge: cacheAge }))
app.use('/:server', express.static(path.join(pubdir, 'static'), { maxAge: cacheAge }))
app.use('/', router)
app.listen(port, function () {

View File

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

View File

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

View File

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