Skip to content

Commit

Permalink
Merge pull request #63 from mauroloprete/main
Browse files Browse the repository at this point in the history
Sponsors' logo size proportional to their support
  • Loading branch information
beatrizmilz authored Oct 3, 2024
2 parents 8a85fc5 + 911436f commit bb3b254
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 42 deletions.
10 changes: 3 additions & 7 deletions R/generar-info-sponsors.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,24 @@ generar_info_sponsors <- function() {
generar_lista_sponsors <- function(info_sponsors, lang = "es") {
html_output <- ""


unique_types <- unique(info_sponsors$type)

unique_types <- factor(unique_types, levels = c("sponsor", "supporter", "community"), ordered = TRUE)

unique_types <- unique_types[order(unique_types)]

for (sponsor_type in unique_types) {
title <- get_title_by_language(sponsor_type, lang)
html_output <- paste0(html_output, "<h2>", title, "</h2><div class='sponsorsFooter'><ul>")


sponsors_of_type <- info_sponsors[info_sponsors$type == sponsor_type, ]

for (i in 1:nrow(sponsors_of_type)) {
html_output <- paste0(
html_output,
"<li><a href='", sponsors_of_type$href[i],
"' target='_blank' class='sblogos__link'><img class='sblogos__img' src='",
sponsors_of_type$img[i],
"' alt='", sponsors_of_type$name[i],
" logo' /></a></li>"
"' target='_blank' class='sblogos__link'><img class='sblogos__img ",
sponsor_type, "' src='", sponsors_of_type$img[i],
"' alt='", sponsors_of_type$name[i], " logo' /></a></li>"
)
}

Expand Down
47 changes: 12 additions & 35 deletions styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ h1, h2, h3, h4, h5 {
font-weight: 100;
}

/* Sponsors */
.sponsorsFooter{
.sponsorsFooter {
width: 100%;
height: auto;
padding: 10px 0 10px;
Expand All @@ -95,13 +94,22 @@ h1, h2, h3, h4, h5 {
border-radius: 3px;
height: auto;
vertical-align: middle;
max-width: 250px;
margin: 1em;
justify-content: center;
align-items: center;
}

&.sponsor {
max-width: 350px;
}

&.supporter {
max-width: 175px;
}

&.community {
max-width: 150px;
}
}

.sponsorsFooter ul {
padding: 0;
Expand All @@ -110,37 +118,6 @@ h1, h2, h3, h4, h5 {
display: block;
}

.sponsorsFooter ul.enter > span:not(.hover) {
opacity: .1;
}

.sponsorsFooter ul.enter > span.hover {
opacity: 1;
box-shadow: inset -1px 0 0 0 rgba(0, 0, 0, .1), inset 1px 0 0 0 rgba(0, 0, 0, .1);
}

.sponsorsFooter ul span {
display: inline !important;
background: white;
word-break: break-all;
word-wrap: break-word;
margin: 0px;
padding: 26px 0;
-webkit-transition: opacity 0.25s ease;
-moz-transition: opacity 0.25s ease;
-ms-transition: opacity 0.25s ease;
-o-transition: opacity 0.25s ease;
transition: opacity 0.25s ease;
}

.sponsorsFooter ul span,
.sponsorsFooter ul span li > a {

border: none !important;
outline: 0 !important;
text-decoration: none !important;
}

.sponsorsFooter ul li {
margin: 5px 65px 0px;
display: inline-block;
Expand Down

0 comments on commit bb3b254

Please sign in to comment.