JuliaLang / www_old.julialang.org

Julia Project web site (Old)
http://www_old.julialang.org/
Other
150 stars 276 forks source link

Add a GitHub star button #740

Closed ararslan closed 6 years ago

ararslan commented 6 years ago

Currently on the downloads page but I can put it wherever.

The thing about this is that clicking the button does not and cannot star the project; that would require entering GitHub credentials and a call to the API, which is pretty sketchy. Instead it directs you to the GitHub page, where hopefully the person who clicks star on our page will be logged in and willing to click it on GitHub.

This is what it looks like: screenshot from 2018-02-22 12 26 01

ViralBShah commented 6 years ago

Thanks @ararslan. Can you add twitter and facebook's generic buttons too of similar kind - so that people can share something like - "I am using #JuliaLang. Download at ". Perhaps a wittier message would be better.

ViralBShah commented 6 years ago

@shashi Is there a way to make the action for this button directly star on github, if you are logged in? I guess github will automatically ask you to sign in if necessary.

ararslan commented 6 years ago

Can you add twitter and facebook's generic buttons too of similar kind

I played around with this locally but for some reason the Twitter button loses its associated styling and shows up as raw text. If someone else wants to give it a go, this is what I was using:

<a href="https://twitter.com/intent/tweet?button_hashtag=JuliaLang&ref_src=twsrc%5Etfw"
  class="twitter-hashtag-button"
  data-size="large"
  data-text="I&#39;m trying out #JuliaLang! Get it for your platform at"
  data-url="https://julialang.org/downloads"
  data-dnt="true" data-show-count="false">
Tweet #JuliaLang
</a>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Generated from https://publish.twitter.com.