Pandoc powerpoint with template : title slide is blank - templates

I'm using pandoc to write a slideshow as Markdown and then export it as Powerpoint file with a .potx template, through the --reference-doc as mentionned in Pandoc's documentation.
Everything is working fine, except that the title slide is blank in the result. It correclty uses the "Title Slide" master slide from the template, but the title, presenter name and dates, which are specified in the pandoc metadata are not inserted.
If I remove the master slide from my template, the data is rendered correctly but using the "Standard Slide" master slide.
Any clue about this ?

Related

Using R Quarto With Mermaid and FontAwesome Does Not Render Icons

I am trying to include FontAwesome icons in R Quarto. I am rendering to a presentation in PPTX. However, it does not matter which presentation final type I select or any other output type.
Sample code to replicate issue:
```{mermaid}
flowchart TD
B["fab:fa-twitter for peace"]
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner)
B-->E(A fa:fa-camera-retro perhaps?)
```
The nodes render but none of the fa:* items are showing. I see the class is created in the HTML (if rendered to Reveal.JS or HTML):
<i class="fab fa-twitter"></i>
How can I get R Quarto (or other R markdown) using mermaid to include the font awesome icons?
You may want to look at the fontawesome extension which works at least for HTML outputs. I assume that by initializing in the text instead of only using the mermaid environment, it has the necessary HTML font awesome dependency to render the icons correctly.
---
format: html
---
Initialize {{< fa thumbs-up >}} and then it should work:
```{mermaid}
flowchart TD
B["fab:fa-twitter for peace"]
B-->C[fa:fa-ban forbidden]
B-->D(fa:fa-spinner)
B-->E(A fa:fa-camera-retro perhaps?)
```

Blogger Emporio templete: Add second line of text on homepage snippets

My blog is https://testfnm.blogspot.com based on the Blogger Emporio template.
On the homepage, under the titles of the snippets, I would like to add a second line of text with the country name.
So for instance, under the title "Milford Sound" I would like to add the country name "New Zealand". Similarly, under Amsterdam, I would like to add Netherlands. And so on...
How do I do that please?
As an alternative to adding a second line of text to the snippets, I have found a method to make the Labels permanently visible on the snippets of the homepage. I have put only one label per post, the label being the country name. Thus against each snippet a label (the country name) is now visible both on desktop and mobile.
I used this CSS code to make the labels visible:
.labels-outer-container {opacity: 1 !important;}
body.feed-view .post-labels {display: inline-block;}
You can see how the results look here: https://www.firozemistry.com

Use the title= HTML attribute with RMarkdown

I am trying to understand if it is possible to insert the HTML title= attribute (not necessarily inside an <abbr> tag) within an RMarkdown document (e.g. a blog post written through blogdown)
From W3C: the title attribute specifies extra information about an element. The information is most often shown as a tooltip text when the mouse moves over the element.
The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.
Couldn't find anything regarding using in in RMarkdown tho
You can write raw HTML in Markdown. However, if you are using Hugo >= v0.60.0, raw HTML will be ignored by default. You need to set an option in your config file to enable it:
[markup.goldmark.renderer]
unsafe= true

OrchardCMS Replacement Tokens for Query Results displaying HTML tags instead rendering them

I am having problems understanding the token system for the output of query / projections.
If I leave the property as is it displays the text content with HTML formatting intact.
But I need to wrap it with a tag, the html tags get displayed as text.
Rewrite Results -> Rewrite output
<div class="collapse" id="toggle_{Content.Id}">
{Content.Fields.CaseStudy.ClientChallenge} </div>
I am trying to create a collapsible text area, I already have a button that hides/unhides the content.
Why is it displaying as text instead of rendering the tags properly.
I think this is because I don't know how replacement tokens work.
Another example problem is up one level on the edit Layout, I want to set the item class to work-item {Category}, Category being the name/title of a property, which I am using for grouping.
Right above the projection: I want to include some html that lists all the Categorys in a ul i.e. data-filter=".experiential" I have tried things like: work-item {Category} and work-item {Content.Fields.CaseStudy.Category}. Category is a "term" (?) from a taxonomy.
I feel like I am failing to understand how it all works.
Submitted as a bug https://github.com/OrchardCMS/Orchard/issues/7355
Will edit and post if it is fixed. In case anoyong else comes across this issue.

Show preview of image in form

I want to achieve the following in a django form, for a models.ImageField:
do not show the standard <input type="file"> button ("choose file" button)
show a preview of the current image, for already populated models
for empty (new) models, show a custom button
clicking on the image preview or the custom button will open a file dialog to select the image from the user's file system
selecting a new image replaces the custom button or the old image preview with the preview of the new image
This seems to me like a normal workflow to select images in a form, but I do not seem to find any fully working solution. All I can find involves hacking around several parts:
styling the label and hiding the standard "choose file" button: https://www.youtube.com/watch?v=4p2gTDZKS9Y
use a widget instead of the standard for forms.FileField.
I have tried to use:
class ImagePreviewWidget(Widget):
def render(self, name, value, attrs=None):
return mark_safe('<img src="/media/%s" width="100px"/>' % escape(value))
For the widget, and I am using this in the form like this:
class DesignCampaignForm(ModelForm):
brand_logo = FileField(widget=ImagePreviewWidget)
This is properly showing the preview of the existing image, but I am unable to click on it to select another file, and even if I was that would not update the preview.
Is there an already available solution for this simple use case?
I haven't been able to find a complete solution, so I have done the following:
use a widget to render a modified ClearableFileInput, rendering an image and an <input> element
style the <input> in the element with CSS, to hide it
make sure that clicking in the image triggers the hidden <input> element, wrapping the <img> in a <label> and using the for attribute
add some javascript to replace the image preview whenever the selection in the <input> element changes
whenever the selection is cleared, show the original preview
A gist can be found here.
In my final solution (not yet in the gist), I have added a button for when the image is not yet selected.
edit: Gist only works for Django before version 1.11.x.
class ClearableFileInput has since been gutted and changed