docs
docs copied to clipboard
feat: embedded pdf previews
Summary
Uses a new pymdonx extension -> pathconverter in our config and uses absolute paths with /docs
as the root.
- Sample documentation for a first "feature" in the SOP page.
- Styling is done with the class
pdf-embed
inside of the extra.css with responsive styling for tablets + mobile phones. - Added PDFs to /docs/assets/ directory
Testing
Check if working and usable in modern browsers and mobile devices.
Location
- mkdocs.yml
- docs/pilots-corner/SOP.md
- docs/assets/
- docs/stylesheets/extra.css
Discord username (if different from GitHub): Valastiri#8902
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 11, 2023 11:11am |
Need to verify mobile embeds work appropriately
Need to verify mobile embeds work appropriately
That's how it is on mobile chrome, don't know what's expected.
Should pop the standard browser pdf viewer -- and that isn't it. Will have to do look at this again.
@Sleinmaster device?
Pixel 4 XL Android 13
It probably looks like that because pdf in general don't open in the browser but get downloaded.
https://support.google.com/chrome/thread/68561173/android-chrome-browser-don-t-preview-pdf?hl=en
On Windows Chrome it looks like that, that's probably what you expected on the phone aswell:
Some additional screenshots from the mobile:
Opera:
Firefox :
Ah neat -- great testing // maybe on mobile I'll block the embed preview or it could possibly be a CSS issue since the embed takes the styles from that based on what I understand.
I'll give those a try -- since downloading the PDF or having it open on a mobile is typically (on a personal level) how I view pdfs or like restaurant menus.
Just an update, haven't had time to vet this further. I might draft this PR and add a TODO later today to fix some of the outstanding issues.
@Sleinmaster So I made some changes but it doesn't address your comments on andriod yet as that seems unavoidable and at least on our platform unsure how to hide elements we don't want on certain devices without being hacky about it.
Here's an iOS example on a 13p max.
Will revisit this in the future.