Code Monkey home page Code Monkey logo

gitlink's Introduction

gitlink

Travis build status AppVeyor build status Coverage status

Include useful GitHub links in your Shiny applications and R Markdown documents quickly and easily with the gitlink package!

For example,

# note that this does not actually work for pure markdown documents like this README
ribbon_css("https://github.com/colearendt/gitlink")

demo Shiny application with "Fork Me on Github" ribbon

Getting Started

The package can be installed from CRAN:

install.packages("gitlink")

Or you can install the latest development version with:

devtools::install_github("colearendt/gitlink")

The ribbon_css function is highly customizable, as you can set any color, font, font-size, or other CSS properties with the parameters provided.

For example:

  ribbon_css("mylink.com", position = "left")
  ribbon_css("mylink.com", color = "black", font_color = "white", border_color = "white")
  ribbon_css("mylink.com", text = "Fork me PLEASE", fade = FALSE)

For more advanced examples, see ?ribbon_css

Code of Conduct

Please note that the 'gitlink' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Other Musings

Some interesting links that we have stumbled upon in our travels. Perhaps interesting for future or related work:

gitlink's People

Contributors

colearendt avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

gitlink's Issues

Release checklist for 0.1.0

  • Create branch labelled v[version]-rc, for example, v1.5.2-rc (the "rc" stands for "Release Candidate").
  • Change the DESCRIPTION and NEWS on this branch to change the version number to the desired version for CRAN, e.g. from 1.5.1.9008 to 1.5.2.
  • Commit and push to the RC branch.
  • Clean your package directory to remove any extraneous files, including ones that are git-ignored. (Warning, this will delete any unsaved buffers in RStudio! Also, be sure to close RStudio before taking this step!) git clean -xdf .
    • NOTE: git clean -xdn . provides a "dry-run" list of what will be done / removed
  • Build your package. I (jcheng) personally do it from the Mac command line like this:
  • PATH=$PATH:/Applications/RStudio.app/Contents/MacOS/pandoc R CMD build [pkgdir]
  • Do a sanity check by installing/testing the built package.
  • Perform revdep check using https://github.com/r-lib/revdepcheck, if this is not the initial CRAN release.
  • Run R CMD check --as-cran pkg_version.tar.gz both locally and on win-builder. You can also use https://r-hub.github.io/rhub/.
  • I (jcheng) don't know how much it matters but I have this file as my ~/.R/Makevars:
  • CFLAGS += -Wall -pipe -pedantic -std=gnu99 -g -O0
  • CXXFLAGS += -Wall -pipe -Wno-unused -pedantic -g -O0
  • CXX11FLAGS += -Wall -pipe -Wno-unused -pedantic -g -O0
  • Read every bullet point in the CRAN Policies document if this is the first release of the package. I usually print it out and check off the items one by one.
  • Submit to CRAN via their online form.
  • If there are R CMD check warnings that are unavoidable, make sure to explain them in the comments.
  • If rejected, make changes on the RC branch and bump the fourth (patch) version component, i.e. 1.5.2.1.
  • When accepted, tag the RC branch with a v1.5.2.1 tag (or whatever version you finally ended up getting accepted), and push the tag to origin.
  • Merge RC into master.
  • On master, change the package version to 1.5.2.9000.

Fix css overflow

When implementing the CSS version, if placing the image on the right, we end up with a horizontal scrollbar. This needs to be fixed.

Add responsiveness

Example here, thanks to @andrie

<!-- ribbon from https://codepo8.github.io/css-fork-on-github-ribbon/ -->
โ€‹
<style>#forkongithub a{background:#FCECCC;color:#000;text-decoration:none;font-family:arial,sans-serif;text-align:center;font-weight:bold;padding:5px 40px;font-size:1rem;line-height:2rem;position:relative;transition:0.5s;}#forkongithub a:hover{background:#DFECF7;color:#000;}#forkongithub a::before,#forkongithub a::after{content:"";width:100%;display:block;position:absolute;top:1px;left:0;height:1px;background:#fff;}#forkongithub a::after{bottom:1px;top:auto;}@media screen and (min-width:1000px){#forkongithub{position:absolute;display:block;top:0;right:0;width:200px;overflow:hidden;height:200px;z-index:9999;}#forkongithub a{width:200px;position:absolute;top:45px;right:-45px;transform:rotate(45deg);-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);box-shadow:4px 4px 10px rgba(0,0,0,0.8);}}</style><span id="forkongithub"><a href="https://github.com/sol-eng/sys-admin-cheatsheet">Fork me on GitHub</a></span>

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.