Skip to content

Commit

Permalink
themes, palettes,fents
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkemberling committed May 21, 2024
1 parent cda385e commit 8d68147
Show file tree
Hide file tree
Showing 29 changed files with 212 additions and 77 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ doc/www

# Testing Space
testing/
inst/stylesheets/Avenir.ttc
inst/stylesheets/Font/
38 changes: 23 additions & 15 deletions R/ggthemes.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,20 @@
#'
#' @examples ggplot2::ggplot(mtcars) + theme_gmri()
theme_gmri <- function(base_size = 10,
base_family = "sans",
base_family = "sans",
title_family = "sans",
facet_color = "teal",
facet_color = "teal",
...) {
# Color from gmRi palette, sets background color
facet_hex <- gmri_cols()[facet_color]

# Color from gmRi palette, sets background color for facet strips
if(facet_color %in% c(
"orange", "yellow", "gmri green", "light green", "dark green",
"green", "teal", "blue", "gmri blue", "light gray", "dark gray")){
facet_hex <- gmri_cols()[facet_color]
} else {
facet_hex <- facet_color
}


# Set up theme
gmri_ggtheme <- ggthemes::theme_foundation(
Expand All @@ -36,9 +44,10 @@ theme_gmri <- function(base_size = 10,

# Major Elements
line = ggplot2::element_line(linetype = 1, colour = "black"),
rect = ggplot2::element_rect(fill = "transparent",
linetype = 0,
colour = NA),
rect = ggplot2::element_rect(
fill = "transparent",
linetype = 0,
colour = NA),
text = ggplot2::element_text(colour = "black"),
title = ggplot2::element_text(family = title_family, size = 12),

Expand All @@ -55,17 +64,15 @@ theme_gmri <- function(base_size = 10,

# Legend Elements
legend.background = ggplot2::element_rect(),
legend.position = "bottom",
legend.direction = "horizontal",
legend.box = "vertical",
legend.title = ggplot2::element_text(size = 9),
legend.text = ggplot2::element_text(size = 9),

# Panel/Grid Setup
panel.grid = ggplot2::element_line(colour = NULL,
linetype = 3,
linewidth = 0.3,
color = "gray80"),
panel.grid = ggplot2::element_line(
colour = NULL,
linetype = 3,
linewidth = 0.3,
color = "gray80"),
panel.grid.major = ggplot2::element_line(colour = "black"),
panel.grid.major.x = ggplot2::element_blank(),
panel.grid.minor = ggplot2::element_blank(),
Expand All @@ -81,10 +88,11 @@ theme_gmri <- function(base_size = 10,
# Facet Details
strip.text = ggplot2::element_text(color = "white", face = "bold", size = 11),
strip.background = ggplot2::element_rect(
color = "white",
color = "transparent",
fill = facet_hex,
linewidth = 1,
linetype="solid")) +

# Add any additional theme calls to tweak on the fly
ggplot2::theme(...)

Expand Down
22 changes: 11 additions & 11 deletions R/gmri_palettes.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

#### Colors ####
gmri_colors <- c(
`orange` = "#EA4F12",
`yellow` = "#EACA00",
`gmri green`= "#ABB400",
`green`= "#ABB400",
`dark green`= "#3B4620",
`green` = "#407331",
`teal` = "#00736D",
`blue` = "#00608A",
`gmri blue` = "#00608A",
`light gray`= "#E9E9E9",
`dark gray` = "#535353"
`orange` = "#EA4F12",
`yellow` = "#EACA00",
`gmri green` = "#ABB400",
`light green`= "#ABB400",
`dark green` = "#3B4620",
`green` = "#407331",
`teal` = "#00736D",
`blue` = "#00608A",
`gmri blue` = "#00608A",
`light gray` = "#E9E9E9",
`dark gray` = "#535353"
)


Expand Down
Binary file added inst/stylesheets/Fonts/LTe50340.ttf
Binary file not shown.
Binary file added inst/stylesheets/Fonts/LTe50342.ttf
Binary file not shown.
Binary file added inst/stylesheets/Fonts/LTe50347.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50336.ttf
Binary file not shown.
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50338.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50339.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50340.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50341.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50342.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50343.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50344.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50345.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50346.ttf
Binary file not shown.
Binary file added inst/stylesheets/GMRI_fonts/Avenir/LTe50347.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified inst/stylesheets/gmri_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 2 additions & 51 deletions inst/stylesheets/gmri_rmarkdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,55 +5,6 @@

/* Avenir Font from Fonts.com for GMRI Branding */

@import url("http://fast.fonts.net/t/1.css?apiType=css&projectid=806f61f6-d695-4965-a878-820b50bc0269");
@font-face{
font-family:"Avenir LT W01_35 Light1475496";
src:url("Fonts/0078f486-8e52-42c0-ad81-3c8d3d43f48e.woff2") format("woff2"),url("Fonts/908c4810-64db-4b46-bb8e-823eb41f68c0.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_35 Light_1475502";
src:url("Fonts/a59168c1-917d-4de9-a244-0316c057c357.woff2") format("woff2"),url("Fonts/6dc0e7d8-9284-44e1-8f05-984a41daa3a4.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_45 Book1475508";
src:url("Fonts/065a6b14-b2cc-446e-9428-271c570df0d9.woff2") format("woff2"),url("Fonts/65d75eb0-2601-4da5-a9a4-9ee67a470a59.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_45 Book O1475514";
src:url("Fonts/476612d9-282d-4f76-95cd-b4dd31e7ed21.woff2") format("woff2"),url("Fonts/f1ebae2b-5296-4244-8771-5f40e60a564a.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_55 Roman1475520";
src:url("Fonts/b290e775-e0f9-4980-914b-a4c32a5e3e36.woff2") format("woff2"),url("Fonts/4b978f72-bb48-46c3-909a-2a8cd2f8819c.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_55 Obliqu1475526";
src:url("Fonts/1a7173fa-062b-49ad-9915-bc57d3bfc1f5.woff2") format("woff2"),url("Fonts/cdda031e-26e9-4269-83d1-5a218caa10db.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_65 Medium1475532";
src:url("Fonts/17b90ef5-b63f-457b-a981-503bb7afe3c0.woff2") format("woff2"),url("Fonts/c9aeeabd-dd65-491d-b4be-3e0db9ae47a0.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_65 Medium1475538";
src:url("Fonts/deb5e718-7abb-4df3-9365-edfa95317090.woff2") format("woff2"),url("Fonts/04801919-17ee-4c6b-8b17-eb1965cb3ed6.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_85 Heavy1475544";
src:url("Fonts/d513e15e-8f35-4129-ad05-481815e52625.woff2") format("woff2"),url("Fonts/61bd362e-7162-46bd-b67e-28f366c4afbe.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_85 Heavy_1475550";
src:url("Fonts/3c210c80-960f-4684-850b-25390b4d08af.woff2") format("woff2"),url("Fonts/cb5c71ad-e582-4d00-929c-67fbfaeb1c27.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_95 Black1475556";
src:url("Fonts/c78eb7af-a1c8-4892-974b-52379646fef4.woff2") format("woff2"),url("Fonts/75b36c58-2a02-4057-a537-09af0832ae46.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_95 Black_1475562";
src:url("Fonts/a2477e08-09d9-4d4b-97a9-23a1e22cb44c.woff2") format("woff2"),url("Fonts/19d12bba-92b1-43ad-9bab-cd36a4195c2a.woff") format("woff");
}



Expand All @@ -71,7 +22,7 @@ h1 { text-align: left;
margin: 10px 0 15px 0;
margin-top: 40px;
font-size: 38px;
font-family: Avenir;
font-family: Lato;
}


Expand All @@ -80,7 +31,7 @@ h2, h3, h4, h5, h6 {
color: #333333;
margin: 20px 0 5px 0;
text-align: left;
font-family: Avenir;}
font-family: Lato;}


/* Sizing/font For Each Header Type */
Expand Down
174 changes: 174 additions & 0 deletions inst/stylesheets/gmri_rmarkdown_fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/********** GMRI Rmarkdown Core Style Sheet - Do Not Modify!!! **********/


/********** Begin Style Sheet **********/

/* Avenir Font from Fonts.com for GMRI Branding */

@import url("http://fast.fonts.net/t/1.css?apiType=css&projectid=806f61f6-d695-4965-a878-820b50bc0269");
@font-face{
font-family:"Avenir LT W01_35 Light1475496";
src:url("Fonts/0078f486-8e52-42c0-ad81-3c8d3d43f48e.woff2") format("woff2"),url("Fonts/908c4810-64db-4b46-bb8e-823eb41f68c0.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_35 Light_1475502";
src:url("Fonts/a59168c1-917d-4de9-a244-0316c057c357.woff2") format("woff2"),url("Fonts/6dc0e7d8-9284-44e1-8f05-984a41daa3a4.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_45 Book1475508";
src:url("Fonts/065a6b14-b2cc-446e-9428-271c570df0d9.woff2") format("woff2"),url("Fonts/65d75eb0-2601-4da5-a9a4-9ee67a470a59.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_45 Book O1475514";
src:url("Fonts/476612d9-282d-4f76-95cd-b4dd31e7ed21.woff2") format("woff2"),url("Fonts/f1ebae2b-5296-4244-8771-5f40e60a564a.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_55 Roman1475520";
src:url("Fonts/b290e775-e0f9-4980-914b-a4c32a5e3e36.woff2") format("woff2"),url("Fonts/4b978f72-bb48-46c3-909a-2a8cd2f8819c.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_55 Obliqu1475526";
src:url("Fonts/1a7173fa-062b-49ad-9915-bc57d3bfc1f5.woff2") format("woff2"),url("Fonts/cdda031e-26e9-4269-83d1-5a218caa10db.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_65 Medium1475532";
src:url("Fonts/17b90ef5-b63f-457b-a981-503bb7afe3c0.woff2") format("woff2"),url("Fonts/c9aeeabd-dd65-491d-b4be-3e0db9ae47a0.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_65 Medium1475538";
src:url("Fonts/deb5e718-7abb-4df3-9365-edfa95317090.woff2") format("woff2"),url("Fonts/04801919-17ee-4c6b-8b17-eb1965cb3ed6.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_85 Heavy1475544";
src:url("Fonts/d513e15e-8f35-4129-ad05-481815e52625.woff2") format("woff2"),url("Fonts/61bd362e-7162-46bd-b67e-28f366c4afbe.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_85 Heavy_1475550";
src:url("Fonts/3c210c80-960f-4684-850b-25390b4d08af.woff2") format("woff2"),url("Fonts/cb5c71ad-e582-4d00-929c-67fbfaeb1c27.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_95 Black1475556";
src:url("Fonts/c78eb7af-a1c8-4892-974b-52379646fef4.woff2") format("woff2"),url("Fonts/75b36c58-2a02-4057-a537-09af0832ae46.woff") format("woff");
}
@font-face{
font-family:"Avenir LT W01_95 Black_1475562";
src:url("Fonts/a2477e08-09d9-4d4b-97a9-23a1e22cb44c.woff2") format("woff2"),url("Fonts/19d12bba-92b1-43ad-9bab-cd36a4195c2a.woff") format("woff");
}





/* PRE-Avenir Fonts: Lato + Raleway font import from google fonts */
@import url('https://fonts.googleapis.com/css?family=Lato');
@import url('https://fonts.googleapis.com/css?family=Raleway&display=swap');

/* add font families as needed: font-family: 'Lato', sans-serif; */


/* Level 1 Headers */
h1 { text-align: left;
margin: 10px 0 15px 0;
margin-top: 40px;
font-size: 38px;
font-family: Avenir;
}


/* Headers 2 - 6 */
h2, h3, h4, h5, h6 {
color: #333333;
margin: 20px 0 5px 0;
text-align: left;
font-family: Avenir;}


/* Sizing/font For Each Header Type */
h2, .h2 { font-size: 24px; margin-top: 40px;}
h3, .h3 { font-size: 20px; margin-top: 40px;}
h4, .h4 { font-size: 18px;}
h5 { font-size: 16px; margin-top: 40px;font-weight: normal; color: #3069aa; text-decoration: underline;}
h6 { font-size: 14px; margin-top: 40px;font-weight: normal; color: #3069aa; }


/* Paragraph Text */
p, ol { margin-top: 10px;
font-family: 'Raleway', sans-serif;}

/* Figure & Table Captions */
figure, figcaption, .figure-caption {font-size: 12px; color: #5a6570}
caption {font-size: 12px; color: #5a6570}


/* Title Author and Date Headers */
h1.title.toc-ignore {margin-top: 10px;}
h4.author, h4.date {
color: rgb(0,115,109);
margin-top: 0;
margin-bottom: 5px;
font-size: 12px;}



/* Links */
a {
color: rgb(234,79,18)
}


/***********************************************/


/******** Table of Contents **********/

/* Highlighted TOC Element */
.list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover {
z-index: 2;
color: #fff;
background-color: rgb(0,96,138);
border-color: rgb(0,96,138);
}

/* Default TOC Elements */
.list-group-item, .list-group-item:focus, .list-group-item:hover {
z-index: 2;
color: rgb(0,96,138);
background-color: #fff;
border-color: rgb(0,96,138);
}


/******** Tab Panels **********/

/* Navigation Tabs - Highlighted Tabset Pills */
.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
color: #fff;
background-color: rgb(0,115,109) ;
}

/* Navigation Tabs - Default Tabset Pills */
.nav-pills > li > a, .nav-pills > li > a:hover, .nav-pills > li > a:focus {
color: rgb(0,115,109);
background-color: #fff;
}


/* Second Level Tabs - Active */
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
color: #fff;
background-color: rgb(83,83,83) ;
}

/* Second Level Tabs - Inactive */
.nav-tabs > li > a, .nav-tabs > li > a:hover, .nav-tabs > li > a:focus {
color: rgb(83,83,83);
background-color: #fff;
}



/********** End Core Style Sheet **********/




0 comments on commit 8d68147

Please sign in to comment.