Skip to content

Commit

Permalink
#58 fix github ribbon
Browse files Browse the repository at this point in the history
  • Loading branch information
xeronimus committed Oct 6, 2023
1 parent 0b58328 commit 6a78afd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
9 changes: 9 additions & 0 deletions client/app/_styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ const Global = createGlobalStyle`
border-bottom-right-radius: 8px;
}
/** ---- "Fork me on Github" ribbon ---- **/
/*!
* "Fork me on GitHub" CSS ribbon v0.2.3 | MIT License
* https://github.com/simonwhitaker/github-fork-ribbon-css
*/.github-fork-ribbon{width:12.1em;height:12.1em;position:absolute;overflow:hidden;top:0;right:0;z-index:9999;pointer-events:none;font-size:13px;text-decoration:none;text-indent:-999999px}.github-fork-ribbon.fixed{position:fixed}.github-fork-ribbon:active,.github-fork-ribbon:hover{background-color:rgba(0,0,0,0)}.github-fork-ribbon:after,.github-fork-ribbon:before{position:absolute;display:block;width:15.38em;height:1.54em;top:3.23em;right:-3.23em;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.github-fork-ribbon:before{content:"";padding:.38em 0;background-color:#a00;background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.15)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-moz-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-ms-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-o-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.15));-webkit-box-shadow:0 .15em .23em 0 rgba(0,0,0,.5);-moz-box-shadow:0 .15em .23em 0 rgba(0,0,0,.5);box-shadow:0 .15em .23em 0 rgba(0,0,0,.5);pointer-events:auto}.github-fork-ribbon:after{content:attr(data-ribbon);color:#fff;font:700 1em "Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.54em;text-decoration:none;text-shadow:0 -.08em rgba(0,0,0,.5);text-align:center;text-indent:0;padding:.15em 0;margin:.15em 0;border-width:.08em 0;border-style:dotted;border-color:#fff;border-color:rgba(255,255,255,.7)}.github-fork-ribbon.left-bottom,.github-fork-ribbon.left-top{right:auto;left:0}.github-fork-ribbon.left-bottom,.github-fork-ribbon.right-bottom{top:auto;bottom:0}.github-fork-ribbon.left-bottom:after,.github-fork-ribbon.left-bottom:before,.github-fork-ribbon.left-top:after,.github-fork-ribbon.left-top:before{right:auto;left:-3.23em}.github-fork-ribbon.left-bottom:after,.github-fork-ribbon.left-bottom:before,.github-fork-ribbon.right-bottom:after,.github-fork-ribbon.right-bottom:before{top:auto;bottom:3.23em}.github-fork-ribbon.left-top:after,.github-fork-ribbon.left-top:before,.github-fork-ribbon.right-bottom:after,.github-fork-ribbon.right-bottom:before{-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}
/** ---- changing browser scrollbars ---- **/
@media ${device.desktop} {
/* Works on Firefox */
Expand Down
10 changes: 4 additions & 6 deletions client/app/components/Landing/GithubRibbon.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ import {StyledGithubRibbon} from './_styled';

const GithubRibbon = () => (
<StyledGithubRibbon
className="github-fork-ribbon right-top"
href="https://github.com/Zuehlke/poinz"
target="_blank"
rel="noopener noreferrer"
data-ribbon="Fork me on GitHub"
title="Fork me on GitHub"
>
<img
src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67"
alt="Fork me on GitHub"
data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"
/>
Fork me on GitHub
</StyledGithubRibbon>
);

export default GithubRibbon;
11 changes: 3 additions & 8 deletions client/app/components/Landing/_styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,8 @@ export const StyledLandingForm = styled.form`
`;

export const StyledGithubRibbon = styled.a`
position: fixed;
top: 0;
right: 0;
border: 0;
> img {
border: none;
outline: none;
// see also globalStyle, client/app/_styled.js
&:before {
background-color: ${COLOR_ORANGE};
}
`;
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6a78afd

Please sign in to comment.