def show(item, i):
    """Returns an HTML block with template strings filled-in based on item attributes."""
    is_layer = item.get('type') == 'Layer'
    is_dataset = item.get('type') == 'Dataset'
    server = item.get('server', 'https://api.skydipper.com')
    item_id = item.get('id', None)
    attributes = item.get('attributes', None)
    if is_layer:
        kind_of_item = 'Layer'
        url_link = f'{server}/v1/layer/{item_id}?includes=metadata'
    elif is_dataset:
        kind_of_item = 'Dataset'
        url_link = f'{server}/v1/dataset/{item_id}?includes=metadata,layer'
    else:
        kind_of_item = 'Unknown'
        url_link = None
    table_statement = f"Data source {attributes.get('provider')}"
    if attributes.get('connectorUrl') and attributes.get('provider'
        ) == 'cartodb':
        table_statement = (
            f"Carto table: <a href={attributes.get('connectorUrl')} target='_blank'>{attributes.get('tableName')}</a>"
            )
    if attributes.get('connectorUrl') and attributes.get('provider') == 'csv':
        table_statement = (
            f"CSV Table: <a href={attributes.get('connectorUrl')} target='_blank'>{attributes.get('tableName')}</a>"
            )
    if attributes.get('provider') == 'gee':
        table_statement = (
            f"GEE asset: <a href='https://code.earthengine.google.com/asset='{attributes.get('tableName')} target='_blank'>{attributes.get('tableName')}</a>"
            )
    site_link = "<a href='https://skydipper.com/' target='_blank'>"
    site_logo = (
        "<img class='itemThumbnail' src='https://skydipper.com/images/logo.png'>"
        )
    html = (
        f"<div class='item_container' style='height: auto; overflow: hidden; border: 1px solid #2BA4A0;border-radius: 2px; background: #2BA4A0; line-height: 1.21429em; padding: 10px;''><div class='item_left' style='width: 210px;  float: left;''>{site_link}{site_logo}</a></div><div class='item_right' style='float: none; width: auto; hidden;padding-left: 10px; overflow: hidden;''><b>{i}. </b><a href={url_link} target='_blank'><b>{attributes.get('name')}</b></a><br> {table_statement} | {kind_of_item} in {', '.join(attributes.get('application')).upper()}.<br>Last Modified: {attributes.get('updatedAt')}<br><a href='{server}/v1/fields/{item_id}' target='_blank'>Fields</a> | Connector: {attributes.get('provider')} | Published: {attributes.get('published')} </div> </div>"
        )
    return html
