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

Variable text at bottom of slide #2404

Open
harveyslash opened this issue May 15, 2019 · 1 comment
Open

Variable text at bottom of slide #2404

harveyslash opened this issue May 15, 2019 · 1 comment

Comments

@harveyslash
Copy link

I want to have attribution/notes at the bottom of the screen, which will be used for attribution mainly.

The main things im looking for are:
small size,
horizontal center

and exact same positioning vertically.

Looking around, I've found this css:


.reveal.slide .slides > section, .reveal.slide .slides > section > section {
    min-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    align-items: center !important;
}
section > h1, section > h2 {
    position: absolute !important;
    top: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
}
.print-pdf .reveal.slide .slides > section, .print-pdf .reveal.slide .slides > section > section {
    min-height: 770px !important;
    position: relative !important;
}

.reveal[data-background-transition=fade] > .backgrounds .slide-background,
.reveal > .backgrounds .slide-background[data-background-transition=fade] {
    transform: none;
    transition: opacity 0.5s;
}



.attribution {
    position: absolute;
    /*padding-top: 80vh !important;*/
    bottom: 10%;
    left: auto;
    font-size: 0.25em !important;
}

Where the attribution class is being used like this:

       ``` <span class="attribution" data-fragment-index="0">Press  ➡️ (again)</span>```

This works perfectly when I have transition set to 'slide', but when I change it to anything other than slide, the bottom text goes towards the middle of the screen.

Any way to fix this problem?

@JOduMonT
Copy link

JOduMonT commented May 14, 2020

I was looking for this behavior too and I made it happen with a mix of your code and his code
I simply removed: justify-content: center !important; than add your .attribution part

.reveal .slides > section.present, .reveal .slides > section > section.present {
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  position: absolute !important;
  top: 0 !important;
}
section > h1 {
  position: absolute !important;
  top: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  left: 0 !important;
  right: 0 !important;
}

.print-pdf .reveal .slides > section.present, .print-pdf .reveal .slides > section > section.present {
  min-height: 770px !important;
  position: relative !important;
}

.attribution {
  position: absolute;
  bottom: 0;
  left: 0;
} 

note in my Reveal.initialize part; center: false,

which give me this:
Peek 2020-05-14 07-30

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

No branches or pull requests

2 participants