GithubHelp home page GithubHelp logo

simonwhitaker / github-fork-ribbon-css Goto Github PK

View Code? Open in Web Editor NEW
762.0 762.0 146.0 63 KB

A CSS-only, resolution-independent "Fork me on GitHub" ribbon.

Home Page: https://simonwhitaker.github.io/github-fork-ribbon-css/

License: MIT License

CSS 40.64% HTML 59.36%

github-fork-ribbon-css's Introduction

github-fork-ribbon-css's People

Contributors

billynate avatar dodgex avatar dxa4481 avatar englishextra avatar evgeni avatar hugovk avatar jplitza avatar mathiasbynens avatar neersighted avatar peterdavehello avatar pzgz avatar shinnn avatar shyiko avatar simonwhitaker avatar swervo avatar tomchentw avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-fork-ribbon-css's Issues

Bower package

I wonder if you could publish the package to bower?

Make it responsive?

Hey!

It would be great if you can make it responsive and it get a little smaller on phone screens.

[Question] Push it more to the corner

Hi,
I'm sorry that I couldn't help it with CSS as I know very little about so this is rather a question if you may.
Probably not the common usage or taste, but I would like to push it more to the corner to let other elements (footer especially) be displayed.
First I set it's z-index to 0 as I don't want it to be on top of other elements.
Second I want to push it more to the corner, and if possible make it like a small icon or a triangle rather than a ribbon
This is the capture
image

My preferred solution would be as minimal as possible, setting GitHub icon would be better and as a rectangle or a triangle.
If I need to keep it as a ribbon, I would like only the ribbon to be clickable and not a whole rectangle behind.

Thanks a lot

Doesn't work on IE9 (and suggestion to fix it)

Demo looks good on IE9 but the ribbon is not clickable.

Followings are my suggestion to fix it:

  1. Remove "filter" of ".github-fork-ribbon" in "gh-fork-ribbon.css"
  2. Add "-ms-transform: rotate(...)" in "gh-fork-ribbon.css"
  3. Do not include "gh-fork-ribbon.ie.css" for IE9

Static ribbon

Option to position the ribbon static on the page. Meaning it will remain in the top corner, even if the page scrolls.

Update bower version

Please update the version on bower. It is still on 0.2.0 but I need 0.2.1 with the box-sizing fix.

Instant copy-paste

Editing the index.html file to serve the CSS off of raw.github.com would me people would not need the asset locally, but would mean that if Github goes down, so does the ribbon. Thoughts?

label position incorrect for yeoman generated angular app

not sure, where the problem is, just tested with yeoman generated angular app and I see following:

fork-me-on-gh

steps to reproduce:

  mkdir fork-me-on-gh
  cd fork-me-on-gh
  yo angular
  bower install --save github-fork-ribbon-css
  grunt serve

Afterwards, just replaced (in fork-me-on-gh/app/index.html):

  <body ng-app="forkMeOnGhApp">

with:

  <body ng-app="forkMeOnGhApp">
  <div class="github-fork-ribbon-wrapper left">
        <div class="github-fork-ribbon">
            <a href="https://github.com/simonwhitaker/github-fork-ribbon-css">Fork me on GitHub</a>
        </div>
      </div>

Different colors

If you look here, you'll see that the colors are included in the filenames. After #1 is merged, I can implement colors using the colors that Github used.

IE <= 8 support

Currently, the ribbon looks pretty bad in IE <= 8. If it's not fixable perhaps support for these browsers should be dropped and show a message or something instead.

Clipping bug on Safari for iOS

On Safari for iOS it's possible to scroll past the right hand edge of the page, revealing the "hidden" corner of the ribbon.

Screenshot

Release 0.2.2 to NPM

Hi @simonwhitaker! It seems on NPM your latest version is still 0.2.1, which does not use the data-ribbon but title and - at least for me - has text alignment issues. As a workaround I'm declaring dependency on your project as

"github-fork-ribbon-css": "simonwhitaker/github-fork-ribbon-css#0.2.2"

but it would be nice to be able to go back to

"github-fork-ribbon-css": "~0.2"

at some point. Thanks in advance! Best ribbon ever! ๐Ÿฅ‡

Branches question

Have you thought about just using a gh-pages branch instead of 2 and removing the master one? Here it makes sense to do this.

SCSS?

A SCSS rewrite would make the color/right-left code much nicer (selector nesting). We could put the compiled CSS in the dist/ dir, and the SCSS in the src/ dir. A config.rb file is used by Compass (a SASS build tool), and would remove the need for a dedicated build script.

CDN-hosted CSS result in mislaid ribbons

The demo with a local CSS file works fine:
https://simonwhitaker.github.io/github-fork-ribbon-css/

But when using the CDN-hosted files the ribbons are badly placed:

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.min.css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.ie.min.css" />

Demo:
https://hugovk.github.io/github-fork-ribbon-css/

Diff:
gh-pages...hugovk:gh-pages

Reproducible with Chrome, Safari, Opera on OS X.

screenshot 2015-03-24 21 28 57
screenshot 2015-03-24 21 28 32
screenshot 2015-03-24 21 32 52
screenshot 2015-03-24 21 32 52 2
screenshot 2015-03-24 21 33 41
screenshot 2015-03-24 21 34 16 2

Use same font as original ribbons

The original ribbon used the K-Type Collegiate font - would be nice to put that to use with these.

It looks like someone's already compiled the font for web embedding, so it'd just be a matter of ganking these and perhaps hosting/hotlinking them via gh-pages:

https://github.com/tubbo/psychedeli.ca/tree/master/app/assets/fonts

Indeed, seeing as how it's been six years since the original publication of the image ribbons, which haven't been revisited even now that the official GitHub font brand has changed, it wouldn't be bad to see this embraced by upstream...

zindex

To make it work with JQueryMobile (and I would assume other frameworks as well), a z-index should be added to
.github-fork-ribbon-wrapper.left
.github-fork-ribbon-wrapper.right
.github-fork-ribbon-wrapper.left-bottom
.github-fork-ribbon-wrapper.right-bottom

The z-index needs to be 1001 or higher.

Adding twitter bootstrap css reduces ribbon height and mis-aligns the text

When bootstrap css is added to the page

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

The ribbons height is reduced and text is no longer aligned :

add usage instructions to homepage

After including the stylesheets, it's not clear how to add the ribbons to the page. A more experienced user can inspect the page and figure it out, but would be better to walk users through it explicitly. Thanks!

Black ribbon in print with Safari

Hmm.. although in the preview Safari says that the ribbon will be read when I print it's black. Do you have any idea what the problem can be?
screen shot 2018-08-08 at 12 07 58 pm
screen shot 2018-08-08 at 12 07 46 pm

Add color overrides to Usage

For the style-challenged among us, such as myself, please add a color override example to the Usage section.
e.g.,
<style> .github-fork-ribbon.right-top:before { background-color: #333; } </style>

It would have saved me 15 minutes.
Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.