| [37edecd] | 1 | <%
|
|---|
| 2 | var links = (typeof lbLinks !== 'undefined') ? lbLinks : [];
|
|---|
| 3 | var _photo = (site && site.profile_photo) ? site.profile_photo : (typeof siteOwnerAvatar !== 'undefined' ? siteOwnerAvatar : '');
|
|---|
| 4 | var _name = (site && (site.profile_name || site.title)) || '';
|
|---|
| 5 | var _bio = (site && (site.profile_bio || site.tagline)) || '';
|
|---|
| 6 | %>
|
|---|
| 7 | <section class="lb">
|
|---|
| 8 | <div class="lb-head">
|
|---|
| 9 | <% if (_photo) { %><span class="lb-photo" style="background-image:url('<%= _photo %>')"></span><% } else { %><span class="lb-photo lb-photo-empty">♪</span><% } %>
|
|---|
| 10 | <h1 class="lb-name"><%= _name %></h1>
|
|---|
| 11 | <% if (_bio) { %><p class="lb-bio"><%= _bio %></p><% } %>
|
|---|
| 12 | </div>
|
|---|
| 13 |
|
|---|
| 14 | <% if (!links.length) { %>
|
|---|
| [4885eab] | 15 | <p class="lb-empty"><%= t('lbio.empty') %></p>
|
|---|
| [37edecd] | 16 | <% } else { %>
|
|---|
| 17 | <div class="lb-links">
|
|---|
| 18 | <% links.forEach(function(l){ %>
|
|---|
| 19 | <a class="lb-link" href="<%= siteUrlBase %>/links/go/<%= l.i %>" target="_blank" rel="noopener" <%= l.brand ? ('style="--lb-brand:' + l.brand + '"') : '' %>>
|
|---|
| 20 | <% if (l.svg) { %><span class="lb-ico"><%- l.svg %></span><% } %>
|
|---|
| 21 | <span class="lb-label"><%= l.label %></span>
|
|---|
| 22 | </a>
|
|---|
| 23 | <% }); %>
|
|---|
| 24 | </div>
|
|---|
| 25 | <% } %>
|
|---|
| 26 |
|
|---|
| [4885eab] | 27 | <p class="lb-foot"><a href="<%= siteUrlBase %>/">← <%= t('lbio.back_to_site') %></a></p>
|
|---|
| [37edecd] | 28 | </section>
|
|---|
| 29 |
|
|---|
| 30 | <style>
|
|---|
| 31 | .lb { max-width: 480px; margin: 0 auto; padding: 40px 18px 64px; text-align: center; }
|
|---|
| 32 | .lb-photo { display: inline-block; width: 96px; height: 96px; border-radius: 50%; background-size: cover; background-position: center; margin-bottom: 14px; }
|
|---|
| 33 | .lb-photo-empty { background: var(--accent,#6b8f71); color: #fff; display: grid; place-items: center; font-size: 36px; }
|
|---|
| 34 | .lb-name { font-size: 24px; margin: 0 0 6px; }
|
|---|
| 35 | .lb-bio { opacity: .8; margin: 0 0 26px; }
|
|---|
| 36 | .lb-links { display: flex; flex-direction: column; gap: 12px; }
|
|---|
| 37 | .lb-link { display: flex; align-items: center; gap: 12px; justify-content: center; padding: 14px 18px; border-radius: 14px; border: 1px solid rgba(128,128,128,.28); text-decoration: none; color: inherit; font-weight: 600; transition: transform .08s ease, border-color .15s ease; }
|
|---|
| 38 | .lb-link:hover { transform: translateY(-1px); border-color: var(--lb-brand, var(--accent,#6b8f71)); }
|
|---|
| 39 | .lb-ico { width: 22px; height: 22px; display: inline-flex; color: var(--lb-brand, currentColor); }
|
|---|
| 40 | .lb-ico svg { width: 22px; height: 22px; }
|
|---|
| 41 | .lb-empty { opacity: .7; }
|
|---|
| 42 | .lb-foot { margin-top: 30px; font-size: 13px; opacity: .6; }
|
|---|
| 43 | .lb-foot a { color: inherit; }
|
|---|
| 44 | </style>
|
|---|