Style fixes

- fixed image and linebreaks in chat
- changed ids for messages and words to bigserial
pull/15/head
Julius 6 years ago
parent 6943719c7c
commit 73ff02be67

@ -59,7 +59,7 @@ async function init() {
app.use('/sass', compileSass({ app.use('/sass', compileSass({
root: './public/stylesheets/sass', root: './public/stylesheets/sass',
sourceMap: true, sourceMap: true,
watchFiles: true, watchFiles: (process.env.NODE_ENV !== 'development'),
logToConsole: true logToConsole: true
})); }));
app.use(express.static(path.join(__dirname, 'public'))); app.use(express.static(path.join(__dirname, 'public')));

@ -54,6 +54,7 @@
.chatMessage .chatMessage
display: block display: block
padding: 0.2em padding: 0.2em
word-break: break-word
.INFO .INFO
font-style: italic font-style: italic
@ -66,12 +67,18 @@
.chatUsername .chatUsername
color: $inactive color: $inactive
img
width: 100%
height: auto
border-radius: 0.2em
#container-chat #container-chat
height: calc(100% - 2px) height: calc(100% - 2px)
#chat-content #chat-content
height: calc(100% - 3rem) height: calc(100% - 3rem)
width: calc(100% - 2px) width: calc(100% - 2px)
overflow-y: auto overflow-y: auto
overflow-x: hide
border: 1px solid $inactive border: 1px solid $inactive
box-shadow: inset 0 0 1rem $primary box-shadow: inset 0 0 1rem $primary
#chat-input #chat-input

@ -24,7 +24,7 @@ CREATE TABLE IF NOT EXISTS bingo.lobby_players (
-- words table -- words table
CREATE TABLE IF NOT EXISTS bingo.words ( CREATE TABLE IF NOT EXISTS bingo.words (
id serial UNIQUE PRIMARY KEY, id bigserial UNIQUE PRIMARY KEY,
lobby_id serial references bingo.lobbys(id) ON DELETE CASCADE, lobby_id serial references bingo.lobbys(id) ON DELETE CASCADE,
heared integer DEFAULT 0 NOT NULL, heared integer DEFAULT 0 NOT NULL,
content varchar(254) NOT NULL content varchar(254) NOT NULL
@ -32,7 +32,7 @@ CREATE TABLE IF NOT EXISTS bingo.words (
-- messages table -- messages table
CREATE TABLE IF NOT EXISTS bingo.messages ( CREATE TABLE IF NOT EXISTS bingo.messages (
id serial UNIQUE PRIMARY KEY, id bigserial UNIQUE PRIMARY KEY,
content varchar(255) NOT NULL, content varchar(255) NOT NULL,
player_id integer, player_id integer,
lobby_id serial references bingo.lobbys(id) ON DELETE CASCADE, lobby_id serial references bingo.lobbys(id) ON DELETE CASCADE,

Loading…
Cancel
Save