I am modifying my css to adjust the fonts. On OJS-2.4.8 you have a button to change the fonts for the site to default.
Can any one tell me what css items to use to set the font-size to 12 for the whole site?
I was looking at fontController.js and the comments are saying #controls and #content div but that is not making any difference.
Thanks,
Edward
The default font size is selected in the third parameter of the fontSize() call here:
{**
* plugins/blocks/fontSize/block.tpl
*
* Copyright (c) 2013-2019 Simon Fraser University
* Copyright (c) 2003-2019 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Common site sidebar menu -- font size selector.
*
*}
<!-- Add javascript required for font sizer -->
<script type="text/javascript">{literal}
<!--
$(function(){
fontSize("#sizer", "body", 9, 16, 32, "{/literal}{$basePath|escape:"javascript"}{literal}"); // Initialize the font sizer
});
// -->
{/literal}</script>
This file has been truncated. show original
See the shared library for the function definition:
* Usage: (For more details visit
* This function can be called inside a $(document).ready()
* Eg: fontSize("#controls", "#content", 9, 12, 20); where,
* #controls - where control is the element id, where the controllers will be created.
* #content - for which element the font size changes to apply. In this case font size of content div will be changed
* 9 - minimum font size
* 12 - default font size
* 20 - maximum font size
*
*/
function fontSize(container, target, minSize, defSize, maxSize, baseUrl) {
/*Editable settings*/
var minCaption = "Make font size smaller"; //title for smallFont button
var defCaption = "Make font size default"; //title for defaultFont button
var maxCaption = "Make font size larger"; //title for largefont button
var cookie = 'font-size';
//Now we'll add the font size changer interface in container
var smallFontHtml = "<a href='javascript:void(0);' class='pkp_controllers_fontController_smallFont' title='" + minCaption +"'>" + minCaption + "</a> ";
var defFontHtml = "<a href='javascript:void(0);' class='pkp_controllers_fontController_defaultFont' title='" + defCaption +"'>" + defCaption + "</a> ";
It worked for us, we have implemented it on https://pen2print.org/index.php/
vishal
August 5, 2019, 7:06am
4
Hi,
May I please know what Changes you made? I did the similar changes in block.tpl (copied and pasted the above code ) but its not working
Thanks