Skip to content

Commit

Permalink
mobile viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
steskelt committed Mar 19, 2024
1 parent 51f0473 commit 48f7c3d
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions _pages/rankings.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ <h1 class="display-6 fw-bold text-center">Influencer Rankings</h1>
this.dispatchEvent(event);
}

profileTypeImage(influencer){
if (influencer.meta.type == "twitter" || influencer.meta.type == "x") return html`<img src="/assets/integrations/x.svg" style="width:30px;margin-left:4px">`;
if (influencer.meta.type == "youtube") return html`<img src="/assets/integrations/youtube.svg">`;
if (influencer.meta.type == "web" || influencer.meta.type == "url") return html`<img src="/assets/integrations/webpages.svg">`;
profileTypeImage(influencer, isMini) {
const style = isMini ? 'style="width:30px;margin-left:10px;"' : '';
if (influencer.meta.type == "twitter" || influencer.meta.type == "x") return html`<img src="/assets/integrations/x.svg" ${style}>`;
if (influencer.meta.type == "youtube") return html`<img src="/assets/integrations/youtube.svg" ${style}>`;
if (influencer.meta.type == "web" || influencer.meta.type == "url") return html`<img src="/assets/integrations/webpages.svg" ${style}>`;
return html``;
}

Expand Down Expand Up @@ -185,17 +186,15 @@ <h1 class="display-6 fw-bold text-center">Influencer Rankings</h1>
return html`
<li class="list-group-item" style="padding:6px">
<div style="display:flex;align-items: center;">
<img src="${item.profileUrl}" style="width:${height}px;height:${height}px;border-radius:50%;">
<div style="flex-grow:1;padding-left:12px;">
<img src="${item.profileUrl}" style="width:${height}px;height:${height}px;border-radius:50%;margin-right:10px;">
<div>
<h5 class="card-title">${this.profileTitle(item)}</h5>
<div style="display:flex;text-align:left">
${this.profileMeta(item.meta)}
</div>
${this.profileMeta(item.meta)}
</div>
</div>
<div style="display:flex;align-items: center;">
${a}${this.profileTypeImage(item)}${a != null ? html`</a>` : null}
<div class="card-text text-end" style="flex-grow:1;font-weight:bold">
<div style="display:flex;align-items:center;">
${a}${this.profileTypeImage(item, true)}${a != null ? html`</a>` : null}
<div class="card-text text-end" style="flex-grow:1;font-weight:bold;margin-right:10px;">
${tradeCount} Trade${tradeCount == 1 ? '' : 's'}<br>
${ratedPercent == 0 ? 'Zero Rated' : (ratedPercent == 100 ? 'All Rated' : (100 - ratedPercent) + '% Unrated')}
</div>
Expand All @@ -219,7 +218,7 @@ <h5 class="card-title">${this.profileTitle(item)}</h5>
const height = this.height ?? 64;
return html`
<li class="list-group-item" style="display:flex;align-items:center;">
${a}${this.profileTypeImage(item)}${a != null ? html`</a>` : null}
${a}${this.profileTypeImage(item, false)}${a != null ? html`</a>` : null}
<img src="${item.profileUrl}" style="width:${height}px;height:${height}px;border-radius:50%;"/>
<div style="flex-grow:1;padding-left:12px;">
<div style="display:flex;">
Expand Down

0 comments on commit 48f7c3d

Please sign in to comment.