Skip to content

Commit

Permalink
feat: add hex logo and add to README
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbrig committed Aug 21, 2024
1 parent be2b9aa commit a3abc56
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 4 deletions.
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
# GMH Leasing Package - `gmhleasr` <img src="man/figures/hex_logo.svg" width="120" height="auto" alight="right"/>

# gmhleasr
> [!NOTE]
> This is an R oackage for GMH Leasing. It is a work in progress.
<!-- badges: start -->

<!-- badges: end -->

## Contents {#contents}

- [Contents](#contents)
- [Overview](#overview)
- [Installation](#installation)
- [Example](#example)

## Overview {#overview}

The goal of gmhleasr is to ...

## Installation
## Installation {#installation}

You can install the development version of gmhleasr like so:

``` r
# FILL THIS IN! HOW CAN PEOPLE INSTALL YOUR DEV PACKAGE?
```

## Example
## Example {#example}

This is a basic example which shows you how to solve a common problem:

``` r
library(gmhleasr)
## basic example code
```

85 changes: 85 additions & 0 deletions dev/pkg_hex.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

# ------------------------------------------------------------------------
#
# Title : Package Hex Logo
# By : Jimmy Briggs
# Date : 2024-08-18
#
# ------------------------------------------------------------------------

# hexmake::run_app(with_mongo = FALSE)

library(magick)
library(hexSticker)

logo_url <- "https://cdn.brandfetch.io/gmhcommunities.com/logo"
icon_url <- "https://cdn.brandfetch.io/gmhcommunities.com/icon"

output_file_png <- "man/figures/hex_logo.png"
output_file_svg <- "man/figures/hex_logo.svg"

assets_dir <- "inst/assets/images"
fs::dir_create(assets_dir, recurse = TRUE)

gmh_color <- "#0e2b4c"

# png ---------------------------------------------------------------------

hexSticker::sticker(
package = "gmhleasr",
subplot = logo_url,
url = "github.com/noclocks/gmhleasr",
filename = output_file_png,
p_x = 1,
p_y = 1.4,
p_family = "sans",
p_color = gmh_color,
p_size = 7,
s_width = 0.6,
s_height = 1,
s_x = 1,
s_y = 0.9,
asp = 1,
u_x = 1,
u_y = 0.08,
u_color = gmh_color,
u_family = "mono",
u_size = 1.3,
u_angle = 30,
h_fill = "white",
h_color = gmh_color
)

fs::file_copy(output_file_png, assets_dir)


# svg ---------------------------------------------------------------------

hexSticker::sticker(
package = "gmhleasr",
subplot = logo_url,
url = "github.com/noclocks/gmhleasr",
filename = output_file_svg,
p_x = 1,
p_y = 1.4,
p_family = "sans",
p_color = gmh_color,
p_size = 7,
s_width = 0.6,
s_height = 1,
s_x = 1,
s_y = 0.9,
asp = 1,
u_x = 1,
u_y = 0.08,
u_color = gmh_color,
u_family = "mono",
u_size = 1.3,
u_angle = 30,
h_fill = "white",
h_color = gmh_color
)

fs::file_copy(output_file_svg, assets_dir)

browseURL(output_file_svg)
Binary file added man/figures/hex-gmhleasr.hex
Binary file not shown.
Binary file added man/figures/hex-gmhleasr.hex.rds
Binary file not shown.
Binary file added man/figures/hex-gmhleasr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added man/figures/hex_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions man/figures/hex_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a3abc56

Please sign in to comment.