Revert "automatic question scaling"

This reverts commit b8b33ab63a.
This commit is contained in:
Astro 2011-04-23 22:34:25 +02:00
parent 6ce29d8f87
commit 48f6b35491
2 changed files with 8 additions and 51 deletions

View File

@ -19,10 +19,6 @@ p {
padding: 0; padding: 0;
} }
#game {
margin-top: 1em;
}
#players { #players {
margin-bottom: 2em; margin-bottom: 2em;
} }
@ -32,8 +28,8 @@ p {
#players li span { #players li span {
margin: 0 0.2em; margin: 0 0.2em;
} }
#players .name { .name {
color: #ddd; color: #7f7f7f;
} }
#players .score { #players .score {
font-size: 88%; font-size: 88%;
@ -52,22 +48,10 @@ p {
} }
#question { #question {
font-size: 250%; font-size: 250%;
max-width: 80%; max-width: 20em;
margin: 0 auto; margin: 0 auto;
} }
#question p.size1 {
font-size: 50%;
}
#question p.size2 {
font-size: 100%;
}
#question p.size3 {
font-size: 200%;
}
#question img { #question img {
display: inline; display: inline;
} }
@ -93,7 +77,7 @@ p {
#answers { #answers {
position: absolute; position: absolute;
bottom: 1em; bottom: 0px;
width: 100%; width: 100%;
} }
#answers ul { #answers ul {
@ -102,23 +86,10 @@ p {
} }
#answers ul li { #answers ul li {
color: #ddd; color: #ddd;
width: 40%; width: 30%;
padding: 0.1em 0.5em; padding: 0.1em 0.5em;
border: 0.15em solid #ddd; border: 0.15em solid #ddd;
border-radius: 0.85em 0.85em 1em 1em; border-radius: 0.85em 0.85em 1em 1em;
font-size: 125%;
}
#answers ul li.size1 {
font-size: 85%;
}
#answers ul li.size2 {
font-size: 125%;
}
#answers ul li.size3 {
font-size: 150%;
} }
#answers ul li.selected { #answers ul li.selected {
@ -145,26 +116,17 @@ input {
color: white; color: white;
background-color: #00003f; background-color: #00003f;
font-size: 100%; font-size: 100%;
margin: 2px 0px;
}
input#start {
margin-top: 1em;
width: 4em;
} }
ul#tiers { ul#tiers {
text-align: right; text-align: right;
float: right; float: right;
margin: 2em auto; margin: 2em auto;
padding-right: 1em;
} }
ul#tiers li { ul#tiers li {
display: list-item; display: list-item;
color: #777; color: #777;
} }
ul#tiers li.done { ul#tiers li.done {
font-weight: bold; font-weight: bold;
color: white; color: white;
@ -193,7 +155,7 @@ ul#tiers li.done {
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
margin: 0.2em 0.2em; margin: 0.05em 0.2em;
padding: 0px; padding: 0px;
width: 1.6em; width: 1.6em;
border: 0.1em solid #ddd; border: 0.1em solid #ddd;

View File

@ -313,27 +313,21 @@ function takeJoker(activePlayer, joker) {
function setQuestionContents(q) { function setQuestionContents(q) {
$('#question').empty(); $('#question').empty();
if (q.text) { if (q.text) {
TEXTSIZE = parseInt(q.text.length / 100, 10) ? "size1" : false;
TEXTSIZE = !TEXTSIZE && parseInt(q.text.length / 50, 10) ? "size2" : "size3";
$('#question').append('<p></p>'); $('#question').append('<p></p>');
$('#question p').text(q.text); $('#question p').text(q.text);
} }
if (q.image) { if (q.image) {
TEXTSIZE = "size1";
$('#question').append('<img>'); $('#question').append('<img>');
$('#question img').attr('src', q.image); $('#question img').attr('src', q.image);
} }
if (q.video) { if (q.video) {
TEXTSIZE = "size1";
$('#question').append('<video controls autoplay>'); $('#question').append('<video controls autoplay>');
$('#question video').attr('src', q.video); $('#question video').attr('src', q.video);
} }
$('#question p').removeClass().addClass(TEXTSIZE);
} }
var PLAYER_KEYS = 'abc'; var PLAYER_KEYS = 'abc';
var ANSWER_KEYS = '1234'; var ANSWER_KEYS = '1234';
var TEXTSIZE; //pretty uncool to do it global
// Game screen is the one with the question in question // Game screen is the one with the question in question
function switchToGame() { function switchToGame() {
@ -354,7 +348,8 @@ function switchToGame() {
var answer = q.answers[i]; var answer = q.answers[i];
var liEl = $('#answers li').eq(i); var liEl = $('#answers li').eq(i);
liEl.text(answer.text); liEl.text(answer.text);
liEl.removeClass().addClass(TEXTSIZE).fadeTo(0, 1); liEl.removeClass('selected right wrong');
liEl.fadeTo(0, 1);
} }
var switchToAnswer = function(isTimeout) { var switchToAnswer = function(isTimeout) {