github-corners icon indicating copy to clipboard operation
github-corners copied to clipboard

Customizer/Make your own corner

Open TheJaredWilcurt opened this issue 8 years ago • 17 comments

This is a rough sketch, but functional:

  • https://jsfiddle.net/4r70jax0/4/

You could implement some dynamic stuff so that the user could select the options to generate the code.

You could still have all the color combos present as like clickable buttons for presets that would auto-set the code to match them.

TheJaredWilcurt avatar Nov 10 '15 23:11 TheJaredWilcurt

Awesome stuff!

Definitely something worth considering. I'd started to do this, but kind of ended up just wanting to get the basic idea out before I got more complex.

Will wait for this to chill out for a week or two first, and then dig this back up again.

Appreciate it!

tholman avatar Nov 11 '15 04:11 tholman

I came to the same idea, but preferred not to js the UI stuff, so results in this Jade mixin.

elrumordelaluz avatar Nov 11 '15 14:11 elrumordelaluz

@elrumordelaluz I hate to break it to ya buddy, but that's still JavaScript. It's just a lot more complex way of doing the same thing I am. You're just using a site that's doing all the heavy lifting, but at the end of the day, you're doing the same thing I am, you're just forcing them to type in colors rather than use a color picker.

@tholman I should have mentioned I used SVGO-GUI to reduce the size of the SVG by about 25% in my version so the user gets minimal characters in their snippet.

TheJaredWilcurt avatar Nov 11 '15 15:11 TheJaredWilcurt

Lets not fight, both are super awesome! The SVGO thing is super neat too (wow, svg is such a mystery to me sometimes).

Again, will dig this up in a week or two... I do have some early designs when I was doing this as well. Will get there!

tholman avatar Nov 11 '15 15:11 tholman

sorry @TheJaredWilcurt, maybe I explained wrong, I do know that Jade it is javascript, just intended to say "take advantage of the awesome Codepen, to make me a "customizer" instead of a little app that update de DOM". Just for my own use I made it, used it to regenerate the markup for a commit. Only this.

It's an awesome idea to have a "customizer" in site.

elrumordelaluz avatar Nov 11 '15 15:11 elrumordelaluz

:100: For the customizer :) Good stuff

lipis avatar Nov 12 '15 00:11 lipis

I make a prototype for this ~ http://codepen.io/Rplus/details/avxqBE/

Rplus avatar Nov 22 '15 12:11 Rplus

@Rplus The cat is transparent.. which is nice.. but there is no animation :/

lipis avatar Nov 22 '15 14:11 lipis

@lipis, There is a demo for transparent cat with SMIL animation made by other people, but it's markup is little long https://github.com/tholman/github-corners/issues/15#issuecomment-156218092

Rplus avatar Nov 22 '15 17:11 Rplus

TBH I don't mind skipping the animation.. It's nice, but we could skip it..

lipis avatar Nov 22 '15 18:11 lipis

I update this, and add new controller for animation and mix-blend-mode http://codepen.io/Rplus/pen/wKZOBo

Hope this helps!

Rplus avatar Nov 22 '15 21:11 Rplus

@Rplus :100: I think bottom left/right is not really needed.. other than that it's pretty cool..!

lipis avatar Nov 22 '15 21:11 lipis

:+1:

IonicaBizau avatar Feb 28 '16 04:02 IonicaBizau

@lipis actually I came to this issue hoping for a bottom corner!

digitalheir avatar Aug 15 '17 11:08 digitalheir

@digitalheir updated

  • https://jsfiddle.net/4r70jax0/4/

TheJaredWilcurt avatar Aug 27 '17 00:08 TheJaredWilcurt

@TheJaredWilcurt I've updated your code generation: https://jsfiddle.net/4r70jax0/34/ I added a ref attribute called myReference. And then use that to create the HTML: var octoCodeHTML = this.$refs.myReference.outerHTML. The style tag is static and doesn't need any modification. All dynamic change information to github-corner is in the HTML. This way you can easily make changes without touching the code generation again.

I did something similar here: https://nntin.github.io/discord-logo/

NNTin avatar Nov 26 '17 19:11 NNTin

Late to the party, but I've made a React component and published it to NPM. I've also setup a GitHub page to let people customise their component, to help them get started and familiar with what it can do. There's even a pride mode! 🌈

https://whatthefoo.github.io/fork-me-on-github/

dreamyguy avatar Jun 19 '19 23:06 dreamyguy