By “hide” I mean it shows a button in the top-right, which when clicked, shows the full header bar.

Examples:

Please let me know if you run into any issues or have feedback 🙏

Edit: Also, for people who know some JavaScript, you can use the public generator list API to get generators with specific tags like this:

let data = await fetch(`https://perchance.org/api/getGeneratorList?tags=foo`).then(r => r.json()); // returns generators tagged 'foo'
let data = await fetch(`https://perchance.org/api/getGeneratorList?tags=foo,bar`).then(r => r.json()); // foo AND bar
4 points

Cool! Now I have to go update all my gens to use this.

permalink
report
reply
4 points

Cool update!! 😃 I didn’t know there will be this customization option because of the new navigation bar (I noticed that yesterday). For some reason, my user style made it look like the little tab buttons for me (and I kind of wanted to keep it for now). I do still need that “resources” link, so you might probably want to link it somewhere in the welcome page so I can access it from there instead.

permalink
report
reply
4 points

It’s currently linked on the /generators page at the top, alongside plugins + templates. But I agree that’s not ideal… Maybe I should add a drop-down menu type thing, so there can be more options without cluttering the header with too many buttons

permalink
report
parent
reply
3 points

I see, though the new navigation bar is probably one of the biggest Perchance updates I’ve ever seen.

permalink
report
parent
reply
1 point

Any updates?

permalink
report
parent
reply
3 points

Cool!

Um, hao return to minimized with just an icon after having touched it and expanded the bar? Also: hao choose minimized icon?

i hope foobar’s a cool generator

permalink
report
reply
3 points
*

hao return to minimized with just an icon after having touched it and expanded the bar

Fair point! Just added an ‘x’ button to close re-hide it.

hao choose minimized icon?

I did think about this, but I think (for now at least) I’ll hold off on this. My thinking here is that ideally it would be something distinctive and consistent across generators so it’s easy to find. A big part of how a lot of people got introduced to perchance was being curious about what that “edit” button means. They click it, and then everything is a blur for two weeks and suddenly they know how to code (a bit). I’ll keep the headers on my generators for this reason, but I think in that particular respect (i.e. helping newbies get introduced to the platform) it should still be fine to use minimal header mode, so long as there’s a distinctive icon that people notice a few times across separate perchance visits before finally getting curious enough to click it.

permalink
report
parent
reply
2 points

I see there is a dark mode now, amazing!

permalink
report
reply
2 points

Cool cool… Could be an accessibility/contrast nightmare, but such are the risks we take for customisation I guess 😜

What you could do is, give the text in the bar a subtle lighter drop-shadow to help with contrast even when the background is dark. Or just straight-up give them their own background color so they always look the same.

permalink
report
reply
3 points
*

Also, since I know you’re interested in this sort of thing: Today I also removed the <div id="output-container"></div> inside the body to bring things closer to being “just HTML+JS+CSS”. So everything in the HTML editor goes directly into the <body>. For backwards compat, the <body> element has id="output-container", and beyond that there were only a few generators that had to be semi-manually fixed. Small improvement, but that was annoying me for a long time. The bigger and more painful task (in terms of ensuring backwards-compat) is that square block vs script tag escaping stuff 🥲

permalink
report
parent
reply
2 points

Would be grateful if you could tweak the default styles to not apply to body, #output-container because that overrides a simple body selector it seems.

permalink
report
parent
reply
2 points

Oh, could you give an example?

permalink
report
parent
reply
2 points

Oh awesome! Nice one!

The code block thing is definitely a knotty problem. 😬

permalink
report
parent
reply
2 points
*

I currently do pick a text color that contrasts with the background color, but that doesn’t work if a background image is specified. For that, I have a brightness and blur backdrop-filter. But yeah, won’t be perfect - I can always adjust things later if needed, so there’s no harm in releasing this as-is for now, I think

permalink
report
parent
reply
2 points

Yeah, it’s definitely a cool addition. And it won’t be used site-wide for now anyway, so people can test it and you can see how it goes 👍

permalink
report
parent
reply

Perchance - Create a Random Text Generator

!perchance@lemmy.world

Create post

⚄︎ Perchance

This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.

Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)

This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.

See this post for the Complete Guide to Posting Here on the Community!

Rules

1. Please follow the Lemmy.World instance rules.
2. Be kind and friendly.
  • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)
3. Be thankful to those who try to help you.
  • If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don’t manage to help you solve your problem - remember that they’re spending time out of their day to try to help a stranger :)
4. Only post about stuff related to perchance.
  • Please only post about perchance related stuff like generators on it, bugs, and the site.
5. Refrain from requesting Prompts for the AI Tools.
  • We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. “What is the good prompt for X?”, “How to achieve X with Y generator?”
  • See Perchance AI FAQ for FAQ about the AI tools.
  • You can ask for help with prompting at the ‘sister’ community Casual Perchance, which is for more casual discussions.
  • We will still be helping/answering questions about the plugins as long as it is related to building generators with them.
6. Search through the Community Before Posting.
  • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

Community stats

  • 103

    Monthly active users

  • 671

    Posts

  • 2.6K

    Comments