Verified Commit 8aa56235 authored by Luc Didry's avatar Luc Didry
Browse files

Allow to disable fancy font on big cards theme

parent 9e71a743
......@@ -64,6 +64,10 @@
}
.content.no-fancy-font {
font-family: "Arial Rounded MT Bold", arial, serif;
}
.filler {
margin-right: 34px;
margin-bottom: 42px;
......
body {
font-family: 'Helvetica Neue Light', arial, serif;
font-size: 13px;
......@@ -641,3 +638,6 @@ img {
#revisions-list li img {
margin-left: 10px;
}
.hidden {
display: none !important;
}
......@@ -4,6 +4,7 @@ var columns = [];
var currentTheme = "bigcards";
var boardInitialized = false;
var keyTrap = null;
var fancyFont = true;
var baseurl = location.pathname.substring(0, location.pathname.lastIndexOf('/'));
var socket = io.connect({path: baseurl + "/socket.io"});
......@@ -184,9 +185,20 @@ $(document).bind('keyup', function(event) {
keyTrap = event.which;
});
function fancyFontToggle(event) {
event.preventDefault();
if (fancyFont) {
$(".content").addClass('no-fancy-font');
} else {
$(".content").removeClass('no-fancy-font');
}
fancyFont = !fancyFont;
}
function drawNewCard(id, text, x, y, rot, colour, sticker, animationspeed) {
//cards[id] = {id: id, text: text, x: x, y: y, rot: rot, colour: colour};
var noFancyFont = (fancyFont) ? '' : ' no-fancy-font';
var h = '<div id="' + id + '" class="card ' + colour +
' draggable" style="-webkit-transform:rotate(' + rot +
'deg);\
......@@ -195,7 +207,7 @@ function drawNewCard(id, text, x, y, rot, colour, sticker, animationspeed) {
<img class="card-image" src="images/' +
colour + '-card.png">\
<div id="content:' + id +
'" class="content stickertarget droppable" data-text="">' +
'" class="content stickertarget droppable' + noFancyFont + '" data-text="">' +
marked(text) + '</div><span class="filler"></span>\
</div>';
......@@ -792,8 +804,10 @@ $(function() {
$("#smallify").click(function() {
if (currentTheme == "bigcards") {
changeThemeTo('smallcards');
$('#fancyFontControl').addClass('hidden');
} else if (currentTheme == "smallcards") {
changeThemeTo('bigcards');
$('#fancyFontControl').removeClass('hidden');
}
/*else if (currentTheme == "nocards")
{
......@@ -1142,6 +1156,9 @@ $(document).ready(function(){
}
// Bind fancyFontToggle checkbox to fancyFontToggle function
$('#fancyFontToggle').prop('checked', null);
$('#fancyFontToggle').change(fancyFontToggle);
// put URL in share input
$('#taburl').val(location);
// copy URL to clipboard
......
......@@ -32,6 +32,10 @@ block body
option(value='green') Vert
option(value='blue') Bleu
option(value='white') Blanc
div#fancyFontControl.form-group
div.checkbox
input#fancyFontToggle(type='checkbox')
label(for='fancyFontToggle') Utiliser une police classique
div.stickers
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment