diff --git a/src/document/index.html b/src/document/index.html index e28be7f..e8dc7a8 100644 --- a/src/document/index.html +++ b/src/document/index.html @@ -13,7 +13,7 @@ - + Think of a nickname Nickname diff --git a/src/js/irc.js b/src/js/irc.js index 234d1d1..2eb6d27 100644 --- a/src/js/irc.js +++ b/src/js/irc.js @@ -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) diff --git a/src/server/index.js b/src/server/index.js index 377a344..99b7b98 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -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 () { diff --git a/src/style/layout.styl b/src/style/layout.styl index 0289e89..0fbb980 100644 --- a/src/style/layout.styl +++ b/src/style/layout.styl @@ -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 diff --git a/src/style/theme_default.styl b/src/style/theme_default.styl index 32d955a..d698d17 100644 --- a/src/style/theme_default.styl +++ b/src/style/theme_default.styl @@ -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 diff --git a/src/style/theme_night.styl b/src/style/theme_night.styl index 95f4522..4524f36 100644 --- a/src/style/theme_night.styl +++ b/src/style/theme_night.styl @@ -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