Skip to content

Reposition CodeSandbox button in gh-pages examples#5839

Closed
vincentfretin wants to merge 2 commits into
aframevr:masterfrom
vincentfretin:ghpages-codesandbox-button-style
Closed

Reposition CodeSandbox button in gh-pages examples#5839
vincentfretin wants to merge 2 commits into
aframevr:masterfrom
vincentfretin:ghpages-codesandbox-button-style

Conversation

@vincentfretin

Copy link
Copy Markdown
Contributor

Description

When generating the gh-pages examples, inject a small <style> block that moves the CodeSandbox "Open Sandbox" button to the top of the page so it no longer overlaps the VR/AR enter buttons.

The style is only injected into the example HTML pages where a CDN link was actually replaced (tracked via the hasChanged result from replace-in-file), so untouched pages are left alone.

🤖 Generated with Claude Code

Move the CodeSandbox "Open Sandbox" button to the top so it does not
overlap the VR/AR enter buttons, only in the example pages where a CDN
link was actually replaced.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vincentfretin

Copy link
Copy Markdown
Contributor Author

Alternative is to include the css rule directly in aframe.css #5841 but it will be working only in the next aframe release.

@dmarcos

dmarcos commented Jun 28, 2026

Copy link
Copy Markdown
Member

injecting perhaps si a bit too magical. we can add it to aframe styles. I can redeploy the examples

@vincentfretin

Copy link
Copy Markdown
Contributor Author

We actually need a new aframe build so a new official release 1.8.1 to make the aframe styles effective.
I was thinking about including a script tag remix-dropdown.js in all examples in a similar way of this PR that creates a dropdown to remix on codesandbox or krabbel, we could also inject the style via this script to fix the Open in Sandbox button, that way no immediate release needed.

Closing this one since #5841 is merged. I will create another PR with my proposal.

@vincentfretin vincentfretin deleted the ghpages-codesandbox-button-style branch June 28, 2026 14:53
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.

2 participants