Open WSKQ23 opened 3 years ago
The function doesn't exist yet. Your task is to write a custom build_circle() function similar to the example:
name <- "RUBY TUESDAY"
title <- "TOP DOG"
add_tags <- function( name, title )
{
cat( paste0( '<tag> ', name, ' </tag>' ) )
cat( '\n' ) # line break
cat( paste0( '<div class="title"> ', title, ' </div>' ) )
cat( '\n' ) # line break
}
add_tags( name, title ) # test it:
<tag> RUBY TUESDAY </tag>
<div class="title"> TOP DOG </div>
You need to replicate the template example in the assignment instructions but replacing hard-coded values with variables so that you can re-create the same table for any member.
<div class="list-circles-item">
<a href="https://thibautjombart.netlify.com/"><img src="/img/people/thibaut-jombart.jpg" class="item-img"></a>
<h4 class="item-name">Thibaut Jombart</h4>
<div class="item-desc">Founder, President. Statistician and R programmer specialized in outbreak analysis. London School of Hygiene and Tropical Medicine / Imperial College London, UK.</div>
<div class="item-links">
<a class="item-link" href="https://thibautjombart.netlify.com/" title="Website">
<span class="fa fa-home"></span>
</a>
<a class="item-link" href="https://github.com/thibautjombart/" title="GitHub">
<span class="fa fa-github"></span>
</a>
<a class="item-link" href="https://twitter.com/TeebzR" title="Twitter">
<span class="fa fa-twitter"></span>
</a>
</div>
</div>
You are inserting content into the div class. Look back over the examples - content should be between tags.
<div> CONTENT </div>
For icons follow this template instead of using the span tags:
GITHUB <- "https://github.com/thibautjombart/"
fa.github <- fontawesome::fa( name="github" )
paste0( '<a href="', GITHUB, '">', fa.github, '</a>' )
Hello @lecy Having tried to run the
build_circle()
but I'm having error of function not found. Please help me with the package forbuild_circle()
function.Thanks