Adapt download links for iPhone and iPad - #103
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The functional changes are straightforward and self-contained to docs/index.html, with only minor maintainability/style nits noted.
Pull request overview
This PR updates the landing page download CTAs to adapt for Apple mobile visitors (iPhone/iPad, including iPadOS desktop-mode), so users see App Store–appropriate actions and iOS/iPadOS-specific minimum OS copy instead of macOS/Homebrew options.
Changes:
- Adds data-attributes to the two primary download buttons so they can be retargeted to the App Store on iPhone/iPad.
- Hides App Store duplicate buttons and desktop-only install sections on Apple mobile, and swaps the requirements copy to iOS/iPadOS variants.
- Introduces a small CSS rule for
[hidden]and an inline script to perform UA/platform detection and DOM updates.
File summaries
| File | Description |
|---|---|
| docs/index.html | Adds device-aware download CTA adaptation (App Store links, hiding desktop install UI, and tailored iOS/iPadOS requirements copy). |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| <div class="hero-brew"><span>Homebrew</span><code>brew install textream</code></div> | ||
| <p class="dl-meta">macOS 15+ · iOS 26+ · No sign-up required</p> | ||
| <div class="hero-brew" data-desktop-install><span>Homebrew</span><code>brew install textream</code></div> | ||
| <p class="dl-meta" data-platform-requirements data-iphone-copy="iOS 26+ · No sign-up required" data-ipad-copy="iPadOS 26+ · No sign-up required">macOS 15+ · iOS 26+ · No sign-up required</p> |
Comment on lines
+3485
to
+3490
| var appStoreURL = 'https://apps.apple.com/app/textream/id6800061488'; | ||
| var appleIcon = '<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M16.7 13.1c0-2.4 2-3.6 2.1-3.7-1.1-1.7-2.9-1.9-3.5-1.9-1.5-.2-2.9.9-3.6.9-.7 0-1.8-.9-3-.9-1.5 0-3 .9-3.8 2.3-1.6 2.8-.4 7 1.1 9.3.8 1.1 1.7 2.3 2.9 2.2 1.2 0 1.6-.7 3.1-.7 1.4 0 1.9.7 3.1.7 1.3 0 2.1-1.1 2.8-2.2.9-1.3 1.2-2.6 1.2-2.6-.1 0-2.4-.9-2.4-3.4ZM14.3 5.9c.6-.8 1.1-1.9.9-3-.9 0-2.1.6-2.8 1.4-.6.7-1.1 1.8-1 2.9 1.1.1 2.2-.5 2.9-1.3Z"/></svg>'; | ||
|
|
||
| document.documentElement.dataset.downloadPlatform = device.toLowerCase(); | ||
|
|
||
| document.querySelectorAll('[data-platform-download]').forEach(function(link) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
npx html-validate docs/index.htmlgit diff --check