71 lines
12 KiB
Plaintext
71 lines
12 KiB
Plaintext
---
|
|
import type { Author } from '../schemas/authors'
|
|
import { facebook } from '../utils/api'
|
|
|
|
interface Props {
|
|
author: Author
|
|
}
|
|
|
|
const { author } = Astro.props
|
|
|
|
---
|
|
|
|
<div class="author">
|
|
{author.profile_image && <img alt={author.name} src={author.profile_image} />}
|
|
<div class="text">
|
|
<div class="name">{author.name}</div>
|
|
{author.website && <a href={author.website}>
|
|
<?xml version="1.0" ?><svg height="32px" version="1.1" width="32px" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -1028.4)"><g transform="matrix(.91636 -.39854 .39843 .91662 -413.51 91.527)"><path d="m22 12a10 10 0 1 1 -20 0 10 10 0 1 1 20 0z" fill="#3498db" transform="matrix(1.1 0 0 1.1 -1.2 1027.2)"/><path d="m12 1c-1.139 0-2.2479 0.1786-3.2812 0.5 0.0883 0.1391 0.1129 0.1467 0.2187 0.3125 0.5337 0.8365 0.6073 0.9196 0.75 0.9375 0.0855 0.0107 0.3145 0.027 0.5315 0.0312h0.406l0.281-0.6874 0.282-0.6876 1-0.3124c0.1-0.031 0.122-0.0329 0.218-0.0626-0.136-0.0049-0.269-0.0312-0.406-0.0312zm2.25 0.25c-0.024 0.0238 0.14 0.3046 0.375 0.6562 0.294 0.4402 0.418 0.6444 0.469 0.625 0.104-0.04 0.625-0.4286 1-0.7187-0.582-0.2338-1.187-0.4303-1.813-0.5625-0.002 0.0014-0.03-0.0012-0.031 0zm-8.1562 1.4688c-0.9454 0.6026-1.8119 1.3333-2.5313 2.1874-1.2424 1.4751-2.0766 3.2953-2.4063 5.2818 0.1551-0.013 0.2941-0.032 0.625-0.032 0.9456-0.001 0.8559-0.041 1.1876 0.438 0.185 0.267 0.1908 0.266 0.4687 0.281 0.3311 0.017 0.3277 0.006 0.1563-0.531-0.0668-0.209-0.1247-0.4153-0.125-0.469-0.0005-0.0646 0.1871-0.2439 0.5624-0.5625 0.6265-0.5318 0.5731-0.4417 0.4688-0.9687-0.0216-0.1088 0.0271-0.2014 0.2188-0.4063 0.2278-0.2434 0.2284-0.2343 0.4687-0.2187h0.25l0.0313-0.4063c0.0134-0.2326 0.0172-0.4236 0.0312-0.4375s0.6378-0.3938 1.375-0.8125c0.7372-0.4188 1.3688-0.7754 1.4062-0.8125 0.0583-0.0579-0.0813-0.2572-0.9062-1.25-0.5309-0.639-0.9702-1.1862-1-1.2188-0.0056-0.0061-0.2205-0.0476-0.2812-0.0624zm11.687 0.5937c-0.038-0.0321-0.133 0.0373-0.312 0.2187l-0.25 0.2813 0.187 0.2187c0.109 0.1294 0.261 0.2962 0.344 0.375 0.183 0.1738 0.19 0.2175 0.031 0.5313-0.069 0.136-0.108 0.275-0.093 0.3125 0.019 0.0521 0.135 0.063 0.5 0.0625 0.262-0.0004 0.5-0.0115 0.531-0.0313 0.03-0.0196 0.075-0.1684 0.093-0.3437l0.032-0.3437-0.375-0.2813c-0.329-0.2574-0.379-0.325-0.5-0.625-0.074-0.1839-0.157-0.3494-0.188-0.375zm-1 0.875c-0.065-0.0024-0.437 0.6414-0.437 0.75 0 0.0376 0.112 0.1693 0.25 0.2813 0.138 0.1122 0.26 0.1874 0.281 0.1874 0.042 0 0.371-0.3469 0.437-0.4687 0.03-0.055-0.035-0.1717-0.218-0.4063-0.139-0.1784-0.28-0.3426-0.313-0.3437zm3.219 0.2813c0.013 0.0434 0.062 0.106 0.062 0.125 0 0.0458-0.226 0.251-0.468 0.4687-0.392 0.3524-0.44 0.4078-0.656 0.4375-0.201 0.0276-0.318 0.0655-0.626 0.3125-0.205 0.1652-0.395 0.3428-0.406 0.375-0.01 0.0322 0.079 0.1627 0.188 0.2813 0.228 0.247 0.246 0.3241 0.094 0.5937l-0.126 0.1875-0.374-0.0312c-0.214-0.0076-0.498-0.0161-0.626-0.0313-0.291-0.0345-0.282-0.0265-0.031 0.6563 0.372 1.0098 0.405 1.0937 0.469 1.0937 0.035 0 0.431-0.3698 0.906-0.8125 0.476-0.4428 0.909-0.8125 0.938-0.8125 0.028 0 0.101 0.0313 0.187 0.0625 0.15 0.0543 0.175 0.0367 0.438-0.1875l0.281-0.2187 0.281 0.1874c0.643 0.4412 0.722 0.5346 0.781 0.8126 0.092 0.4294 0.149 0.625 0.188 0.625 0.038 0 0.4-0.4994 0.5-0.6876 0.048-0.0916-0.011-0.1464-0.375-0.6562-0.227-0.3184-0.406-0.626-0.406-0.6562 0-0.0304 0.05-0.0888 0.093-0.125 0.058-0.0482 0.162 0.0429 0.376 0.2812-0.456-0.8377-1.04-1.5929-1.688-2.2812zm1 3.5937c-0.064 0.0009-0.283 0.3217-0.25 0.375 0.017 0.0276 0.099 0.0705 0.156 0.0937 0.058 0.0234 0.139 0.0608 0.188 0.0626 0.075 0.0026 0.091-0.0221 0.062-0.1563-0.049-0.2274-0.112-0.3757-0.156-0.375zm-0.844 0.375-0.812 0.0625-0.813 0.0938-1.5 1.2812-1.469 1.25 0.032 1.25c0.019 0.686 0.045 1.282 0.062 1.313 0.018 0.03 0.232 0.264 0.5 0.5 0.269 0.235 0.55 0.461 0.625 0.531 0.136 0.125 0.175 0.137 1.344 0.187l1.156 0.063 0.531 0.312c0.282 0.183 0.518 0.363 0.532 0.375 0.013 0.013-0.068 0.086-0.188 0.188l-0.218 0.187 0.343 0.407c0.19 0.224 0.438 0.541 0.563 0.687l0.218 0.25v0.531 0.344c1.226-1.774 1.938-3.931 1.938-6.25 0-0.917-0.133-1.805-0.344-2.6562-0.069-0.0473-0.165-0.1252-0.187-0.125-0.036 0.0002-0.188 0.1162-0.344 0.25s-0.312 0.25-0.344 0.25c-0.031-0.0002-0.303-0.0858-0.625-0.1876l-0.594-0.1874v-0.25c0-0.2316-0.004-0.286-0.187-0.4688l-0.219-0.1875zm-15.875 2.0935c-0.0233 0.015-0.0312 0.1-0.0312 0.219 0 0.208-0.0046 0.227 0.2188 0.344 0.2748 0.143 0.3213 0.167 0.2812 0.062-0.0614-0.16-0.4279-0.65-0.4688-0.625zm-1.1562 0.75c-0.0612 0.038-0.1704 0.549-0.125 0.594 0.0221 0.022 0.3178 0.093 0.625 0.156 0.3527 0.072 0.5568 0.091 0.5938 0.063 0.0837-0.065 0.1747-0.39 0.125-0.438-0.0627-0.06-1.1729-0.403-1.2188-0.375zm-1.2812 0.375-0.3438 0.188c-0.1977 0.109-0.4098 0.218-0.4688 0.218-0.0041 0-0.0259 0.002-0.0312 0 0.0027 0.479 0.0632 0.945 0.125 1.407l0.2188 0.125 0.3437-0.032h0.3437l0.2188 0.438c0.1207 0.247 0.2361 0.476 0.2812 0.5 0.0452 0.024 0.3416 0.031 0.625 0.031h0.5v0.407c0 0.412-0.0013 0.425-0.2187 0.75-0.1247 0.185-0.2211 0.399-0.2187 0.468 0.0023 0.068 0.2629 0.731 0.5624 1.469l0.5313 1.313 0.5313 0.281c0.394 0.191 0.5312 0.274 0.5312 0.343 0 0.024-0.128 0.702-0.1875 1.063 1.0383 0.822 2.207 1.469 3.5 1.875 1.1484-1.23 2.2425-2.423 2.4065-2.594l0.25-0.25 0.062-0.656c0.048-0.37 0.093-0.71 0.094-0.75s0.17-0.236 0.344-0.438c0.174-0.201 0.312-0.389 0.312-0.406s-0.497-0.358-1.094-0.75l-1.0932-0.718h-0.375c-0.2573 0-0.3909-0.016-0.4376-0.063-0.0386-0.039-0.0919-0.262-0.125-0.531-0.032-0.261-0.0793-0.508-0.0937-0.532-0.0144-0.023-0.2623-0.03-0.5625-0.031-0.3002 0-0.5887-0.008-0.625-0.031-0.0405-0.026-0.0648-0.234-0.0938-0.5-0.0259-0.238-0.0674-0.442-0.0937-0.469s-0.3734-0.047-0.7813-0.062c-0.6763-0.025-0.7948-0.049-1.1562-0.188l-0.4062-0.156-0.5313 0.25-0.5625 0.219h-0.5938c-0.6786 0-0.6249 0.074-0.7187-0.532-0.0324-0.208-0.068-0.39-0.0937-0.406-0.0258-0.016-0.1744-0.045-0.3126-0.062l-0.25-0.032 0.0313-0.187c0.0014-0.107 0.0102-0.321 0.0313-0.469l0.0312-0.281-0.1875-0.125-0.2187-0.094zm3.125 0.282c-0.0247 0.024-0.0474 0.125-0.0626 0.218l-0.0312 0.156 0.9688 0.376c0.9857 0.354 1.1579 0.373 1.3124 0.218 0.0589-0.059 0.0484-0.064-0.0937-0.125-0.091-0.038-0.5741-0.279-1.0937-0.5-0.5734-0.243-0.9729-0.371-1-0.343z" fill="#2ecc71" transform="translate(0 1028.4)"/></g><g transform="translate(-91.994 16)"><path d="m103.91-15c-1.43 0.014-2.89 0.301-4.285 0.906-5.571 2.423-8.141 8.8977-5.719 14.469 1.79 4.1172 5.814 6.5945 10.034 6.625-1.87-3.2343-2.94-6.9957-2.94-11s1.07-7.766 2.94-11h-0.03z" fill="#2980b9" transform="translate(0 1028.4)"/><path d="m103.69-14.969c-0.63 0.018-1.25 0.059-1.88 0.188 0 0.002-0.03 0.029-0.03 0.031-0.01 0.031 0.27 0.209 0.63 0.438 0.44 0.286 0.61 0.412 0.65 0.374 0.08-0.078 0.4-0.615 0.63-1.031zm-3.69 0.75c-0.127 0.05-0.249 0.07-0.375 0.125-1.045 0.454-1.993 1.044-2.813 1.75 0.137 0.093 0.15 0.109 0.313 0.219 0.823 0.554 0.925 0.603 1.063 0.563 0.082-0.025 0.299-0.105 0.5-0.188l0.374-0.156v-0.75l-0.031-0.75 0.813-0.688c0.08-0.068 0.079-0.059 0.156-0.125zm-4.812 4c-0.008-0.003-0.22 0.052-0.282 0.063-0.626 0.9294-1.149 1.9294-1.468 2.9998-0.552 1.848-0.584 3.8596-0.094 5.8124 0.137-0.0728 0.259-0.149 0.562-0.2812 0.867-0.3779 0.755-0.3695 1.25-0.0625 0.276 0.1713 0.302 0.1601 0.563 0.0625 0.31-0.1159 0.277-0.1385-0.094-0.5625-0.144-0.165-0.26-0.3259-0.281-0.375-0.026-0.0591 0.064-0.2769 0.281-0.7187 0.362-0.7376 0.368-0.6521 0.063-1.0938-0.064-0.0911-0.063-0.2044 0.031-0.4688 0.112-0.314 0.117-0.2934 0.343-0.375l0.219-0.0937-0.125-0.375c-0.08-0.2187-0.163-0.4192-0.156-0.4375s0.428-0.6034 0.938-1.2812c0.509-0.678 0.949-1.2636 0.968-1.3126 0.031-0.0764-0.191-0.1997-1.344-0.7812-0.741-0.3743-1.334-0.701-1.374-0.719zm1.156 7.9378c-0.016 0.0224 0.015 0.1099 0.062 0.2187 0.083 0.1906 0.093 0.2011 0.344 0.2187 0.309 0.0216 0.36 0.0174 0.281-0.0624-0.12-0.1222-0.66-0.4144-0.687-0.375zm2.25 0.9374c-0.623 0.0056-1.049 0.0581-1.063 0.0938-0.012 0.0324 0.008 0.127 0.031 0.2188l0.032 0.1562 1.031-0.0625c1.045-0.0682 1.232-0.1091 1.313-0.3125 0.03-0.0774-0.002-0.0639-0.157-0.0625-0.099 0.0008-0.623-0.0363-1.187-0.0313zm-1.75 0.0626c-0.082-0.0304-1.22 0.1119-1.25 0.1562-0.041 0.0591 0.065 0.57015 0.125 0.59375 0.029 0.0114 0.318-0.02875 0.625-0.09375 0.352-0.0744 0.54-0.1467 0.562-0.1875 0.051-0.0926 0.002-0.4449-0.062-0.4687zm3.816 0.68745c-0.04-0.0141-0.37 0.1012-0.754 0.25-0.63 0.2466-0.738 0.26425-1.125 0.28125l-0.437 0.03125-0.406 0.4375-0.407 0.40625-0.562 0.25c-0.622 0.2711-0.548 0.2989-0.875-0.21875-0.113-0.1785-0.22-0.3081-0.25-0.3125-0.03-0.0042-0.148 0.023-0.282 0.0625l-0.25 0.0625-0.062-0.1875c-0.041-0.0988-0.117-0.2935-0.156-0.4375l-0.063-0.28125-0.25-0.03125h-0.219l-0.25 0.3125c-0.137 0.179-0.289 0.38275-0.343 0.40625-0.004 0.0017-0.026-0.001-0.031 0 0.193 0.4373 0.446 0.8512 0.687 1.25h0.25l0.313-0.1563 0.312-0.125 0.375 0.3126c0.209 0.1784 0.386 0.3395 0.437 0.3437 0.052 0.004 0.334-0.1057 0.594-0.2187l0.469-0.2188 0.156 0.375c0.165 0.3781 0.164 0.3974 0.094 0.7812-0.04 0.2202-0.03 0.4686 0 0.5313 0.029 0.0609 0.525 0.5677 1.094 1.125l1 0.9687 0.591 0.0626c0.44 0.018 0.6 0.0298 0.63 0.0937 0.01 0.0213 0.16 0.7073 0.25 1.0625 0.89 0.2361 1.82 0.3636 2.75 0.375-1.21-2.0871-2.1-4.3961-2.56-6.8438-0.05 0.01375-0.15 0.06442-0.16 0.06255-0.05-0.0074-0.15-0.2049-0.28-0.4375-0.12-0.208-0.25-0.3608-0.28-0.375z" fill="#27ae60" transform="translate(0 1028.4)"/></g></g>
|
|
</svg></a> }
|
|
{author.facebook && <a href={facebook(author.facebook)}><?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
|
|
<svg height="32px" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" version="1.1" viewBox="0 0 512 512" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M449.446,0c34.525,0 62.554,28.03 62.554,62.554l0,386.892c0,34.524 -28.03,62.554 -62.554,62.554l-106.468,0l0,-192.915l66.6,0l12.672,-82.621l-79.272,0l0,-53.617c0,-22.603 11.073,-44.636 46.58,-44.636l36.042,0l0,-70.34c0,0 -32.71,-5.582 -63.982,-5.582c-65.288,0 -107.96,39.569 -107.96,111.204l0,62.971l-72.573,0l0,82.621l72.573,0l0,192.915l-191.104,0c-34.524,0 -62.554,-28.03 -62.554,-62.554l0,-386.892c0,-34.524 28.029,-62.554 62.554,-62.554l386.892,0Z" style="fill:#1777f2;"/>
|
|
</svg></a> }
|
|
{author.twitter && <a href={facebook(author.twitter)}><?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'>
|
|
<svg height="32px" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;" version="1.1" viewBox="0 0 512 512" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect height="400" style="fill:none;" width="400" x="56" y="56"/><path d="M161.014,464.013c193.208,0 298.885,-160.071 298.885,-298.885c0,-4.546 0,-9.072 -0.307,-13.578c20.558,-14.871 38.305,-33.282 52.408,-54.374c-19.171,8.495 -39.51,14.065 -60.334,16.527c21.924,-13.124 38.343,-33.782 46.182,-58.102c-20.619,12.235 -43.18,20.859 -66.703,25.498c-19.862,-21.121 -47.602,-33.112 -76.593,-33.112c-57.682,0 -105.145,47.464 -105.145,105.144c0,8.002 0.914,15.979 2.722,23.773c-84.418,-4.231 -163.18,-44.161 -216.494,-109.752c-27.724,47.726 -13.379,109.576 32.522,140.226c-16.715,-0.495 -33.071,-5.005 -47.677,-13.148l0,1.331c0.014,49.814 35.447,93.111 84.275,102.974c-15.464,4.217 -31.693,4.833 -47.431,1.802c13.727,42.685 53.311,72.108 98.14,72.95c-37.19,29.227 -83.157,45.103 -130.458,45.056c-8.358,-0.016 -16.708,-0.522 -25.006,-1.516c48.034,30.825 103.94,47.18 161.014,47.104" style="fill:#1da1f2;fill-rule:nonzero;"/>
|
|
</svg></a> }
|
|
{author.bio && <div class="title">{author.bio}</div>}
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
.author {
|
|
align-items: center;
|
|
display: flex;
|
|
gap: 0.5rem;
|
|
line-height: var(--sl-line-height-headings);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.text {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.name {
|
|
font-size: var(--sl-text-base);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.author[href] .name {
|
|
color: var(--sl-color-text-accent);
|
|
}
|
|
|
|
.title {
|
|
font-size: var(--sl-text-xs);
|
|
color: var(--sl-color-text);
|
|
}
|
|
|
|
.author[href]:hover .name {
|
|
color: var(--sl-color-text);
|
|
}
|
|
|
|
img {
|
|
border: 1px solid var(--sl-color-gray-2);
|
|
border-radius: 9999px;
|
|
height: 10rem;
|
|
width: 10rem;
|
|
}
|
|
</style>
|