seankross / postcards

💌 Create simple, beautiful personal websites and landing pages using only R Markdown.
Other
534 stars 78 forks source link

Adjust CSS of postcards template #40

Closed larnsce closed 3 years ago

larnsce commented 3 years ago

What I am doing

I am using the poctcards::jolla template as the index.Rmd for a website using the distill framework.

What I want to do

I want to edit the CSS style of the index.html to

What I have tried

I have created a custom CSS using distill::create_theme(name = "theme") and then tried to use the theme.css file in the YAML header of the index.Rmd. Without success.

Questions

  1. ~How do I get a square image, so that it doesn't get cut off on the edges?~
  2. ~How can I remove the navbar from index.html?~

My YAML of the index.Rmd:

---
title: ""
image: "img/Azores_logo_UiV.png"
theme: theme.css 
links:
  - label: Blog
    url: blog.html
  - label: About
    url: about.html
output:
  postcards::jolla
site: distill::distill_website
---

The result as a screenshot:

Screenshot 2021-04-09 at 10 18 58

larnsce commented 3 years ago

I have managed to figure out the first one after I have read through this answer on issue #36.

Solution: Edit the output index.html at the line of the image class from "rounded-circle" to "rounded". It's a manual process every time I render the site, but I am happy with it for now.

https://github.com/seankross/postcards/blob/main/inst/pandoc_templates/jolla.html#L35

Now onto the navbar.

larnsce commented 3 years ago

I have now also manually edited the output index.html at the appropriate places to remove the navbar by making the background color and text white. All a bit of hack, but I am happy with it, so this can be closed.