Generalize CSS for listSelectors and move it to the right place

This commit is contained in:
Tissevert 2019-12-12 22:20:28 +01:00
parent d496bca168
commit 932a7db389
3 changed files with 27 additions and 49 deletions

View file

@ -20,7 +20,7 @@
<script src="screen/login.js"></script>
<script src="main.js"></script>
<link rel="stylesheet" href="screen.css" type="text/css"/>
<link rel="stylesheet" href="login.css" type="text/css"/>
<link rel="stylesheet" href="screen/hall.css" type="text/css"/>
<link rel="stylesheet" href="game.css" type="text/css"/>
</head>
<body>
@ -41,15 +41,15 @@
<label for="them"></label><input type="text" name="them"/>
<input type="submit" name="invite" disabled/>
</p>
<div id="players">
<span class="message"></span>
<ul class="list"></ul>
</div>
<div id="games">
<div class="listSelector" id="players">
<span class="message"></span>
<ul class="list"></ul>
</div>
</form>
<div class="listSelector" id="games">
<span class="message"></span>
<ul class="list"></ul>
</div>
</div>
<div id="game">
<div id="them">

View file

@ -1,43 +0,0 @@
/*
#join, #invite {
display: none;
}
#join.on, #invite.on {
display: block;
}
#leave {
display: none;
}
#login.on #join {
display: none;
}
#login.on #leave {
display: inline;
}
*/
#players {
min-height: 4em;
border: 1px solid #ccc;
}
#players .message {
display: block;
text-align: center;
margin: 1em;
color: #555;
}
#players .message:empty {
display: none;
}
#players .list {
list-style: none;
margin: 0;
padding-left: 0;
}

21
www/screen/hall.css Normal file
View file

@ -0,0 +1,21 @@
.listSelector {
min-height: 4em;
border: 1px solid #ccc;
}
.listSelector .message {
display: block;
text-align: center;
margin: 1em;
color: #555;
}
.listSelector .message:empty {
display: none;
}
.listSelector .list {
list-style: none;
margin: 0;
padding-left: 0;
}