Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current section and subsection in the header #1

Closed
fbob opened this issue Feb 12, 2023 · 12 comments
Closed

Current section and subsection in the header #1

fbob opened this issue Feb 12, 2023 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@fbob
Copy link

fbob commented Feb 12, 2023

Hello,

Thank you for this useful extension.

I would like to put the current section (h1) and subsection (h2) of a presentation a the top of the slide (h3), the slide title being just underneath. See screenshot below as an illustration of what I would like to achieve.

Your extension seems to be build for this kind of usage.
Is it possible to do this with your extension ?

Thanks for your feedback and for reveal-header.
Regards

image

@shafayetShafee
Copy link
Owner

Hi, Can you provide me a sample code with which I can test the possibility 😊? I am actually unsure about what you are meaning by the current section and subsection 😅.

@shafayetShafee
Copy link
Owner

Are you trying to do this?

---
title: "Habits"
author: "John Doe"
format: revealjs
filters: 
  - reveal-header
slide-level: 3
css: style.css
---

# Section Title

## Subsection 1 Title

### TODO

- Turn off alarm
- Get out of bed

::: header

[Section Title]{.section} 
[Subsection 1 Title]{.subsection}

:::

## Subsection 2 Title

### TODO

- Eat eggs
- Drink coffee

::: header

[Section Title]{.section} 
[Subsection 2 Title]{.subsection}

:::

style.css

.header-text .section {
  float: left;
  padding-left: 1em;
}


.header-text .subsection {
  float: right;
  padding-right: 1em;
}

image


And the way I have written the extension so far (with my expandable limited knowledge 😅), to get slide specific header, you need to add header for each slide manually.

@shafayetShafee shafayetShafee added the enhancement New feature or request label Feb 12, 2023
@shafayetShafee shafayetShafee self-assigned this Feb 12, 2023
@fbob
Copy link
Author

fbob commented Feb 13, 2023

Thank you very much for your quick and helpful answer, I really appreciate. 👍
You understand my thought perfectly, that's indeed what I'll like to have.

Your "limited knowledge" is far superior to my ignorance regarding Revealjs and css.
If I read you carefully, it looks like that automation is not possible and that the header has to be specified for each slide manually, I'm right ?

Many thanks for your very kind feedback, I wish you the best for this great add-on for the Quarto community.

@shafayetShafee
Copy link
Owner

I would not say it is impossible 😄. Because I have sorted out a way to do this automatically and already completed the javascript part to deal with this, now just need to sort out the css and lua part 😊.

Follow this issue thread and I will let you know.

shafayetShafee added a commit that referenced this issue Feb 14, 2023
shafayetShafee added a commit that referenced this issue Feb 14, 2023
@shafayetShafee
Copy link
Owner

Hi @fbob it took longer than I expected. Check out the recent updates in the repo readme and this live demo.

Let me know How does it look and if you find anything in the readme documentation confusing. 😊

@fbob
Copy link
Author

fbob commented Feb 14, 2023

Uh ... you're blazing fast, it's an impressive work !

This was the missing feature to make me fully switch to Quarto for my presentations.
Your extension is really very useful and great add-on value to revealjs, thanks !

To me the Readme is well documented but you preach a convinced user :)

Hats off to you !

@shafayetShafee
Copy link
Owner

Happy to know that this extension is being helpful 😊. Thanks to this issue that pushed me to implement the new feature. So thank you too.

However since this issue is solved (hopefully!), is it possible to close this issue 😄?

@shafayetShafee
Copy link
Owner

@fbob checkout the latest extension version 1.2.2 where I have polished the CSS part for the header more 😀.

And I am going to close this issue. But if there are still some problems feel free to reopen this or open a new one 😊.

@fbob
Copy link
Author

fbob commented Mar 5, 2023

Sorry @shafayetShafee for my late feedback.
I'm using your extension for my new course slides and thank you for that, it's great !

May I share you some feedback from my personal experience :

  • it works great !

  • the different options proposed are great for a quick customization

  • I think it's more neutral to not impose a particular font format by default for the header elements (color, font family, font size) by default and leave this to a theme or as user's customizations.

  • Could I suggest 2 more options :

    • header with section and subsection only (and no header-text)
    • header with logo, section and subsection (and no header-text

    By default, unwanted space is used when no header-text is needed in the grid-template-columns with the 2 latest possible uses.
    Sometimes the section and subsections titles are automatically wrapped, which is fine but perhaps not the best possible formatting if the user doesn't need header-text between the sc-title and sb-title.

Anyway, I enjoy using this filter extension a lot and think it's a great addition to the quarto community. Keep up with this excellent work !

THANKS 👍

@shafayetShafee shafayetShafee reopened this Mar 5, 2023
@shafayetShafee
Copy link
Owner

Thanks, @fbob for your feedback. I will look into these suggestions. I will try to revert the header font back to defaults as soon as possible. But I can not look into the suggested changes regarding header-text up until 14th march 😅. After then, I will give it a try. So keep an eye on this issue 😊.

Thanks again for your feedback.

shafayetShafee added a commit that referenced this issue Mar 5, 2023
revert the header font back to default as suggested in #1
@shafayetShafee
Copy link
Owner

I have reverted back the header fonts to default. Install the new version 1.2.4 and let me know if everything works so far 😄😅. And as said previously, I will look into the rest of your suggestions at a later time.

@shafayetShafee
Copy link
Owner

@fbob, I have reduced the grid area (usually 0.1fr) for header text when no header text is supplied and released version 1.2.6. Let me know how it does look now! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants