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

Add a placeholder to the examples #23045

Merged
merged 5 commits into from
Dec 23, 2021
Merged

Add a placeholder to the examples #23045

merged 5 commits into from
Dec 23, 2021

Conversation

gero3
Copy link
Contributor

@gero3 gero3 commented Dec 18, 2021

Related issue: Fixed #19786.

Description

This adds a placeholder.html in the viewer when there is no example selected. This placeholder tells the viewers to select an example.
image

https://raw.githack.com/gero3/three.js/AddPlaceholder/examples/index.html

@gero3 gero3 marked this pull request as ready for review December 18, 2021 14:10
@gero3
Copy link
Contributor Author

gero3 commented Dec 21, 2021

Is there any interest in this?

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 21, 2021

I would style the text a bit more subtle by removing the dark background box and make the text color light gray. Right now, I have the feeling the new section draws too much attention on it.

@WestLangley
Copy link
Collaborator

WestLangley commented Dec 21, 2021

nit: maybe this text, instead

Select an example from the sidebar.

@gero3
Copy link
Contributor Author

gero3 commented Dec 21, 2021

I've updated this branch.
image

@WestLangley WestLangley added this to the r136 milestone Dec 22, 2021
@mrdoob
Copy link
Owner

mrdoob commented Dec 23, 2021

This is definitely interesting!
But I don't think we need another html file for this... Shouldn't it be possible to do it inside index.html?
That way we don't need to modify e2e.

@gero3
Copy link
Contributor Author

gero3 commented Dec 23, 2021

@mrdoob

The PR has been updated to make it contained in index.html

@mrdoob
Copy link
Owner

mrdoob commented Dec 23, 2021

Nice! I didn't know about <template> 🤓

examples/index.html Outdated Show resolved Hide resolved
@gero3
Copy link
Contributor Author

gero3 commented Dec 23, 2021

I've updated the template.

The result didn't change =>
image

Nice! I didn't know about <template> 🤓

Yes, It is a good way to hide HTML inside HTML without it rendering. It also makes it easy to view in the IDE because it detects it as HTML.

@mrdoob mrdoob merged commit 0b035d0 into mrdoob:dev Dec 23, 2021
@mrdoob
Copy link
Owner

mrdoob commented Dec 23, 2021

Thanks!

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.

Add text/content to examples entry page
4 participants