Quarto Revealjs presentation change Title, Author & Date position, font, size and colour - reveal.js

Hello people of Stack Overflow,
Apologies for asking silly questions, I am a beginner and not looked at html or css in a decade. I recently discovered Quarto and think once I learn Quarto it will largely be quicker than using PowerPoint at work.
I am really struggling at the first hurdle, and I am reading the Quarto Documents Pages but they are not detailed for this problem.
I have populated a title, author and date, which auto generates a Title Slide. After some googling I have worked out how to apply a background to this single Title Slide by adding the code below to my _quarto.yml file. How do I:
Title: Change its color, font and absolute position without impacting other headings used in the "normal" slides?
Author: Change its color, font and absolute position?
Date: Change its color, font and absolute position?
I hope I have made some sense and apologies for this basic question... Kind regards
Here is my contents of presentation.qmd:
---
title: "Work Presentation 1"
author: "PRESENTED BY: John Doe"
date: 09/01/2022
format:
revealjs:
theme: [white, custom.scss]
---
## Getting up
- Turn off alarm
- Get out of bed
## Going to sleep
- Get in bed
- Count sheep
Here is the contents of _quarto.yml:
title-slide-attributes:
data-background-image: "/images/work/slidetitlebackground.png"
data-background-size: contain
data-background-opacity: "1"
date-format: "DD MMM YYYY"
My custom.scss file is currently blank:
/*-- scss:defaults --*/
/*-- scss:rules --*/

Just modify the .title, .author, .date classes using css and you can define the CSS styling in the qmd file itself using css code chunk with include=FALSE.
---
title: "Work Presentation 1"
author: "PRESENTED BY: John Doe"
date: 09/01/2022
format: revealjs
title-slide-attributes:
data-background-image: "lights.jpg"
data-background-size: contain
data-background-opacity: "1"
date-format: "DD MMM YYYY"
engine: knitr
---
```{css, include=FALSE}
.title {
font-size: 120px !important;
color: red !important;
}
.author {
font-size: 100px;
color: blue;
}
.date {
font-size: 80px;
color: green;
}
```
## Getting up
- Turn off alarm
- Get out of bed
## Going to sleep
- Get in bed
- Count sheep
Now change the css styles as you need.

Related

Formatting errorindicator

I need to format the errrorindicator depending on the textfields stylename. I couldn't find any css rule which takes the v-errorindicator style in dependence of a stylename for the textfield e. g.
.my-stylename-for-textfield .v-errorindicator {
style: xxx;
}
Does someone know a posibility?
Best regards
Bernhard
You can't style the errorindicator depending on your textfield style, you can style it depending on your overall theme name.
What I mean is that, Vaadin will generate a CSS file that's specific to your theme name, wihch you specify in you main UI:
#Theme("mytheme")
public class MyVaadinUI extends UI {
//....
And generates a CSS that looks like the following:
.mytheme .v-textfield {
text-align: left;
}
So you need to style your errorindicator specifying the name of your theme and the CSS hierarchy, which in your case is under the textfield:
.mytheme .v-textfield .v-errorindicator {
color: blue;
}
If you need more info on how to use Vaadin themes, check out the Theme chapter in the Vaadin book.

Highchart chinese colon display incorrect when exporting

When exporting chart in Highchart, all my characters are displayed well, except Chinese colon.
Do I need to set something specical?
Even in the highchart exporting example from its site, there is still the problem
Please see an example in http://jsfiddle.net/warmwind/Prah7/2
When setting title as below, it cannot be export correctly
title: {
text: 'Exporting it:colon in between'
}
Something is wrong with the defautlt font on the export-server for this chinese character. Please, specify a font-family for your title. Like this,
title: {
text: 'Exporting it:colon in between',
style: {
"font-family":'verdana'
},
},
There´s reported an issue for this, see https://github.com/highslide-software/highcharts.com/issues/2120

How to change the color of jqGrid cell?

I use the following line at the $(document).ready(
$("#stSearchTermsGrid").setCell(2, 2, '', {color:'red'}) ;
but it doesn't work. Did I write it in a wrong way or placed it in the wrong place.
I know this question has been asked more than once before and this is how I got the first line. But I am still not able to do it and not knowing where the problem is.
You are right you are not the first person who ask the question. To clear the situation with the cell color I made the demo
for you which change the text color of the cell or the background color of the sell in different ways:
loadComplete: function() {
// 2 is zero-base index of the column 'name' ('Client'). Every from the options
// multiselect:true, rownumbers:true and subGrid:true will increase
// the index by 1 because the option inserts additional columns
$("#6 td:eq(2)", grid[0]).css({color:'red'});
grid.jqGrid('setCell',"12","name","",{color:'red'});
grid.jqGrid('setCell',"10",'name', '', 'my-highlight');
grid.jqGrid('setCell',"8",'name', '', 'ui-state-error ui-state-error-text');
grid.jqGrid('setCell',"4","name","",{'background-color':'yellow',
'background-image':'none'});
grid.jqGrid('setCell',"3","name","",'ui-state-highlight');
}
where
<style type="text/css">
.my-highlight { color: red; }
</style>
and "3", "4", "6", "8", "10" and "12" are th rowid of the rows where the color of the corresponding column will be changed.
By the way my personal favorites are the ways using 'ui-state-highlight' or 'ui-state-error ui-state-error-text' classes which are the part of the jQuery UI Themes.
UPDATED: To understand the difference of the usage of different methods in case of the usage of another jQuery UI Theme I added one more demo used La Frog Theme where the same table as above look like the following:

text-align syntax for sifr?

I'm having trouble finding usage/syntax for the text-align feature of sifr. This feature goes inside the flashvars parameter correct? So would it be something like:
sIFR.replace(fontname, {
selector: 'h1',
wmode: 'transparent',
flashvars: 'textalign=center'
});
I tried the above with no luck using r436 build.
Apparently you only need to edit the all.css file. Here's someone talking about this.
If you don't want to change the css styling of a root element, then you can specify what CSS selection you are applying your sifr is referring to with the sSelector
You're confusing sIFR 2 and 3 syntax. flashvars no longer exists, for sIFR 3 specify it in the replacement CSS:
sIFR.replace(fontname, { selector: 'h1', css: '.sIFR-root { textalign: center; }' });
You can also specify background-color here, so you don't need to use transparency.

sIFR 3 changeCSS problem

I just have a short question about switching the color of sifr objects on the fly with changeCSS:
The point is, that I'd like to change the color of the two headers whenever the user clicks on the "Switch style to..." on the upper right corner. Check the example page: www.capsule.hu/index2.html - and after clicking on the link nothing happens with sifr objects. Version is: sIFR, version 3, revision 436.
I'm using Kelvin Lucks styleswitcher script with some modifications (the script is hardly the same as here: http://www.digital-campaign.com/dc-example/) - on my current page I'm calling the sIFR.replace method whenever user changes the style (www.capsule.hu), but it seems a little bit slow for me, that's why I'd like to change.
Thanks for every help in forth,
Csongor
You can place the following in the body of the switchSifrColor function on your site:
$('h2').removeClass("sIFR-replaced");
sIFR.replace(helvetica, {
selector: 'h2',
wmode: 'transparent',
css: [ '.sIFR-root { color: #' + color + '; }' ]
});
The main change is that the css property is an array of strings, unlike the object that you were passing.
And a side-note: great work! The site looks very nice.
[Edit]
I guess this will prove more useful than calling replace again.
var css = '.sIFR-root {color:#ff1ff1;}';
$.each(sIFR.replacements['h2'], function() {
this.changeCSS(css);
});
I just tried it through Firebug and it looks great :)
[/Edit]

Resources