mirror of
https://github.com/ysoftdevs/pf2015.git
synced 2026-03-26 11:02:17 +01:00
fix font size for text cards
This commit is contained in:
@@ -66,7 +66,6 @@ flippy.fancy {
|
|||||||
float: left;
|
float: left;
|
||||||
margin: 0 10px 10px 0;
|
margin: 0 10px 10px 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: .8em;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ body {
|
|||||||
|
|
||||||
#mainContent {
|
#mainContent {
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
font-size: xx-large;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
@@ -58,3 +57,11 @@ body {
|
|||||||
#levelTitle {
|
#levelTitle {
|
||||||
float:right;
|
float:right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.textCard {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.textCardLabel {
|
||||||
|
margin-top: 15%;
|
||||||
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
<flippy-back>
|
<flippy-back>
|
||||||
<span class="cardHelper" ng-show="card.cardType == 'picture'"></span><img ng-src="img/cards/{{card.image}}.png" ng-show="card.cardType == 'picture'">
|
<span class="cardHelper" ng-show="card.cardType == 'picture'"></span><img ng-src="img/cards/{{card.image}}.png" ng-show="card.cardType == 'picture'">
|
||||||
<div ng-hide="card.cardType == 'picture'">{{card.label}}</div>
|
<div class="textCard" ng-hide="card.cardType == 'picture'"><div class="textCardLabel">{{card.label}}</div></div>
|
||||||
</flippy-back>
|
</flippy-back>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ var basicCards = {
|
|||||||
var mathCards = {
|
var mathCards = {
|
||||||
'zero': {
|
'zero': {
|
||||||
'arabic': '0',
|
'arabic': '0',
|
||||||
'roman': 'nulla',
|
'roman': ' ',
|
||||||
'math': '1-1',
|
'math': '1-1',
|
||||||
'japanese': '〇'
|
'japanese': '〇'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -332,9 +332,16 @@ angular.module('app', ['angular-flippy', 'level-selector', 'level-complete'])
|
|||||||
*/
|
*/
|
||||||
$scope.computeCardSize = function(cardsPerRow) {
|
$scope.computeCardSize = function(cardsPerRow) {
|
||||||
var cardSize = Math.floor(Math.min(window.innerWidth, window.innerHeight) / cardsPerRow) - 20;
|
var cardSize = Math.floor(Math.min(window.innerWidth, window.innerHeight) / cardsPerRow) - 20;
|
||||||
|
|
||||||
|
var fontSize = Math.floor(cardSize * 0.6);
|
||||||
|
if (fontSize < 12) {
|
||||||
|
fontSize = 12;
|
||||||
|
}
|
||||||
|
|
||||||
$scope.cardStyle = {
|
$scope.cardStyle = {
|
||||||
width: cardSize + "px",
|
width: cardSize + "px",
|
||||||
height: cardSize + "px"
|
height: cardSize + "px",
|
||||||
|
"font-size": fontSize + "px"
|
||||||
};
|
};
|
||||||
|
|
||||||
var paddingLeft = Math.floor((window.innerWidth - (cardSize + 10) * cardsPerRow) / 2);
|
var paddingLeft = Math.floor((window.innerWidth - (cardSize + 10) * cardsPerRow) / 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user