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

Slides v0 #76

Merged
merged 10 commits into from
Jun 13, 2023
Merged

Slides v0 #76

merged 10 commits into from
Jun 13, 2023

Conversation

stanistan
Copy link
Owner

No description provided.

@stanistan stanistan merged commit 480731c into main Jun 13, 2023
Copy link
Owner Author

@stanistan stanistan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds initial slideshow support to present-me.

Some things are hacked for sure, but its already usable in a basic state if you append /slides to the url.

{{ body }}
</MarkdownHTML>
</div>
</template>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change, factoring out the prme body html that renders markdown (joined pr, and review) into a single component given that both slides and page views use this.

{{ body }}
</MarkdownHTML>
</div>
<BodyMarkdown :model="model" />
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the new BodyMarkdown component on the page.

Comment on lines +1 to +17
<template>
<div>
<ComponentCard :badge="idx" title-class="">
<template #title>
<code>{{ comment.path }}</code>
</template>
<template #body>
<div class="overflow-scroll text-lg max-h-[70vh]">
<DiffBlock :comment="comment" />
</div>
</template>
</ComponentCard>
<div class="max-w-2xl mx-auto text-center">
<MarkdownHTML>{{ commentBody }}</MarkdownHTML>
</div>
</div>
</template>
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SlideCard is a new component for how we render slides.

Currently, it goes basically full width, reusing the ComponentCard which is a horrible name, for the code-block-diff and then the comment underneath (no real styling).


<div v-for="(c, i) in model.comments" :key="i">
<SlideCard
v-if="i+2==current" :comment="c"
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of silly, but renders the SlideCard only if the current index (mapped/controlled) by current state and keypresses, is this one.

It's brittle because the number of slides preceding the comments is hardcoded to 2.

When we end up adding more slides either before the comments or after, this will break.

FIN
</div>
</div>
<div class="flex-grow" />
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vertically center sandwiching things with flex-grow.

"nuxt": "^3.4.3",
"postcss": "^8.4.21",
"tailwindcss": "^3.3.1"
"eslint": "^8.41.0",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated dependency updates.

Comment on lines +26 to +28
<div v-else class="absolute top-0 left-0 right-0 bottom-0">
<SlideShow :model="data" />
</div>
Copy link
Owner Author

@stanistan stanistan Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This is mostly a clone of the non slides page except for the slide content is absolutely positioned so that its centered in the viewport, because I'm bad at CSS.
  • Future work will factor out the "chrome" and API fetching business.

Testing other markdown formatting things in this render.

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

Successfully merging this pull request may close these issues.

1 participant