delucis / astro-badge

Badges for Astro projects
https://astro.badg.es
85 stars 11 forks source link

Code on bwa of URL snippets #22

Closed thomasbnt closed 1 year ago

thomasbnt commented 1 year ago

Editing code parts of URL snippets for tiny/small/medium/large badges on BWA page. Because it's more simple to copy that and better design.

Actual :

Actual page of BWA on Astro Badges

<Code code={tinyUrlSnippet} lang="html" />
vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
astro-badge βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jul 13, 2023 1:33pm
thomasbnt commented 1 year ago

Good rendering image

But maybe change the lang="html" by another appropriate lang for... url?

delucis commented 1 year ago

Is the main thing this aims to fix the backticks around the URL? Personally I liked the text wrapping because it lets you see quickly the difference in the URL, whereas with the Code component, you have to scroll to see that.

We can adjust Tailwind to remove the backticks if that's the main aim.

thomasbnt commented 1 year ago

Yeah to suppress backticks!

delucis commented 1 year ago

OK, so we should be able to do this in tailwind.config.cjs based on an example like this:

module.exports = {
  theme: {
    extend: {
      typography(theme) {
        "code::before": {
          content: '""',
        },
        "code::after": {
          content: '""',
        },
      },
    },
  },
}'
thomasbnt commented 1 year ago

OK, so we should be able to do this in tailwind.config.cjs based on an example like this:

module.exports = {
  theme: {
    extend: {
      typography(theme) {
        "code::before": {
          content: '""',
        },
        "code::after": {
          content: '""',
        },
      },
    },
  },
}'

And user-select: all on code could be nice with that.

delucis commented 1 year ago

And user-select: all on code could be nice with that.

Yeah!

thomasbnt commented 1 year ago

And user-select: all on code could be nice with that.

Yeah!

Need help for that, never touched tailwind config :x

delucis commented 1 year ago

Haha, OK well let’s just go with removing the back ticks for now then! We’re working on a redesign soon, so can tackle those other features then. πŸ‘

thomasbnt commented 1 year ago

I close this PR, and for the future design, I creating a new PR ✨😎

thomasbnt commented 1 year ago

Haha, OK well let’s just go with removing the back ticks for now then! We’re working on a redesign soon, so can tackle those other features then. πŸ‘

arg yes of course for back ticks πŸ˜†

delucis commented 1 year ago

Hmm, looks like it didn't work in the preview deployment πŸ€”

thomasbnt commented 1 year ago

Hello! Seems not working with DEFAULT.

delucis commented 1 year ago

Heh, who'd have thought two backticks could be so complicated to deal with πŸ˜„

I'm not sure what the fix is I'm afraid although I'd be happy to merge if you can figure it out!

thomasbnt commented 1 year ago

Heh, who'd have thought two backticks could be so complicated to deal with πŸ˜„

I'm not sure what the fix is I'm afraid although I'd be happy to merge if you can figure it out!

aha yeah it's just a story of two back ticks πŸ˜† I don't know, I never touched Tailwind before, and if you don't find the solution, I can't help you, you are better than me about this framework πŸ˜„

delucis commented 1 year ago

Fair enough β€” I don't use Tailwind much so not sure why it's so complicated πŸ˜…

I guess we can close this PR then and once we have the new design, this will be fixed by that

thomasbnt commented 1 year ago

I guess we can close this PR then and once we have the new design, this will be fixed by that

Yeah no problem! 😎