1
0
mirror of https://github.com/go-task/task.git synced 2025-02-07 13:41:53 +02:00

feat: icons instead of text links in navbar

This commit is contained in:
Pete Davison 2024-03-10 18:39:50 +00:00
parent 40e97bbbf4
commit c4d8b36e05
6 changed files with 68 additions and 11 deletions

View File

@ -191,26 +191,26 @@ const config: Config = {
position: 'right',
dropdownActiveClassDisabled: true,
},
{
href: GITHUB_URL,
label: 'GitHub',
position: 'right'
},
{
href: TWITTER_URL,
label: 'Twitter',
position: 'right'
position: 'right',
className: "header-icon-link icon-twitter",
},
{
href: MASTODON_URL,
label: 'Mastodon',
rel: 'me',
position: 'right'
position: 'right',
className: "header-icon-link icon-mastodon",
},
{
href: DISCORD_URL,
label: 'Discord',
position: 'right'
position: 'right',
className: "header-icon-link icon-discord",
},
{
href: GITHUB_URL,
position: 'right',
className: "header-icon-link icon-github",
}
]
},

View File

@ -76,3 +76,36 @@
.gold-sponsors table img {
width: 200px;
}
.header-icon-link::before {
content: '';
width: 24px;
height: 24px;
display: flex;
background-color: var(--ifm-navbar-link-color);
transition: background-color var(--ifm-transition-fast)
var(--ifm-transition-timing-default);
mask-size: contain;
mask-repeat: no-repeat;
mask-position: center;
}
.header-icon-link:hover::before {
background-color: var(--ifm-navbar-link-hover-color);
}
.icon-github::before {
mask-image: url('/img/icon-github.svg');
}
.icon-discord::before {
mask-image: url('/img/icon-discord.svg');
}
.icon-mastodon::before {
mask-image: url('/img/icon-mastodon.svg');
}
.icon-twitter::before {
mask-image: url('/img/icon-twitter.svg');
}

1
docs/static/img/icon-discord.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 512"><path d="M256 0c141.385 0 256 114.615 256 256S397.385 512 256 512 0 397.385 0 256 114.615 0 256 0zm104.932 160.621a250.428 250.428 0 00-62.383-19.182 173.883 173.883 0 00-7.966 16.243 232.557 232.557 0 00-34.619-2.603c-11.569 0-23.195.879-34.622 2.58-2.334-5.509-5.044-10.971-7.986-16.223a252.58 252.58 0 00-62.397 19.222c-39.483 58.408-50.183 115.357-44.833 171.497a251.49 251.49 0 0076.502 38.398c6.169-8.327 11.695-17.192 16.386-26.417a161.682 161.682 0 01-25.813-12.319c2.164-1.569 4.281-3.186 6.325-4.756 23.912 11.231 50.039 17.088 76.473 17.088 26.436 0 52.562-5.857 76.475-17.089 2.069 1.688 4.186 3.305 6.325 4.755a162.693 162.693 0 01-25.86 12.352 183.969 183.969 0 0016.387 26.397 250.498 250.498 0 0076.553-38.392l-.006.007c6.277-65.104-10.725-121.53-44.941-171.558zM205.78 297.63c-14.908 0-27.226-13.53-27.226-30.175 0-16.645 11.889-30.293 27.178-30.293 15.29 0 27.511 13.648 27.25 30.293-.262 16.645-12.008 30.175-27.202 30.175zm100.439 0c-14.933 0-27.202-13.53-27.202-30.175 0-16.645 11.889-30.293 27.202-30.293 15.313 0 27.44 13.648 27.178 30.293-.261 16.645-11.984 30.175-27.178 30.175z"/></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

1
docs/static/img/icon-github.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 640 640"><path d="M319.988 7.973C143.293 7.973 0 151.242 0 327.96c0 141.392 91.678 261.298 218.826 303.63 16.004 2.964 21.886-6.957 21.886-15.414 0-7.63-.319-32.835-.449-59.552-89.032 19.359-107.8-37.772-107.8-37.772-14.552-36.993-35.529-46.831-35.529-46.831-29.032-19.879 2.209-19.442 2.209-19.442 32.126 2.245 49.04 32.954 49.04 32.954 28.56 48.922 74.883 34.76 93.131 26.598 2.882-20.681 11.15-34.807 20.315-42.803-71.08-8.067-145.797-35.516-145.797-158.14 0-34.926 12.52-63.485 32.965-85.88-3.33-8.078-14.291-40.606 3.083-84.674 0 0 26.87-8.61 88.029 32.8 25.512-7.075 52.878-10.642 80.056-10.76 27.2.118 54.614 3.673 80.162 10.76 61.076-41.386 87.922-32.8 87.922-32.8 17.398 44.08 6.485 76.631 3.154 84.675 20.516 22.394 32.93 50.953 32.93 85.879 0 122.907-74.883 149.93-146.117 157.856 11.481 9.921 21.733 29.398 21.733 59.233 0 42.792-.366 77.28-.366 87.804 0 8.516 5.764 18.473 21.992 15.354 127.076-42.354 218.637-162.274 218.637-303.582 0-176.695-143.269-319.988-320-319.988l-.023.107z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

1
docs/static/img/icon-mastodon.svg vendored Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" viewBox="0 0 512 512"><path d="M256 0c141.284 0 256 114.563 256 256 0 141.284-114.563 256-256 256C114.716 512 0 397.437 0 256 0 114.716 114.563 0 256 0zm134.506 175.487c-4.177-31.049-31.239-55.52-63.32-60.261-5.412-.801-25.918-3.717-73.421-3.717h-.354c-47.516 0-57.709 2.916-63.121 3.717-31.188 4.61-59.669 26.596-66.579 58.014-3.323 15.472-3.678 32.627-3.06 48.361.879 22.566 1.05 45.091 3.101 67.564a317.689 317.689 0 007.395 44.317c6.567 26.924 33.157 49.331 59.208 58.474a158.807 158.807 0 0086.622 4.57 126.28 126.28 0 009.367-2.561c6.988-2.22 15.173-4.701 21.191-9.063a.692.692 0 00.275-.525V362.6a.667.667 0 00-.066-.277.652.652 0 00-.721-.341 240.065 240.065 0 01-56.213 6.569c-32.58 0-41.342-15.46-43.849-21.895a67.833 67.833 0 01-3.812-17.259.611.611 0 01.054-.289.62.62 0 01.441-.361.644.644 0 01.293.006 235.518 235.518 0 0055.293 6.568c4.479 0 8.947 0 13.426-.12 18.732-.524 38.478-1.484 56.907-5.083.461-.091.921-.17 1.314-.288 29.073-5.583 56.739-23.104 59.55-67.472.104-1.748.368-18.296.368-20.108.012-6.16 1.983-43.699-.289-66.763zm-46.057 34.885v77.139H313.88v-74.867c0-15.761-6.569-23.8-19.929-23.8-14.689 0-22.045 9.511-22.045 28.291v40.981h-30.383v-40.981c0-18.78-7.371-28.291-22.058-28.291-13.281 0-19.915 8.039-19.915 23.8v74.867h-30.556v-77.139c0-15.761 4.025-28.283 12.072-37.565 8.303-9.26 19.193-14.014 32.711-14.014 15.645 0 27.468 6.016 35.35 18.033l7.607 12.767 7.62-12.767c7.881-12.017 19.705-18.033 35.323-18.033 13.506 0 24.395 4.754 32.724 14.014 8.041 9.274 12.056 21.796 12.048 37.565z"/></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

21
docs/static/img/icon-twitter.svg vendored Normal file
View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg fill="#000000" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
width="800px" height="800px" viewBox="0 0 97.75 97.75" xml:space="preserve"
>
<g>
<path d="M48.875,0C21.882,0,0,21.882,0,48.875S21.882,97.75,48.875,97.75S97.75,75.868,97.75,48.875S75.868,0,48.875,0z
M78.43,35.841c0.023,0.577,0.035,1.155,0.035,1.736c0,20.878-15.887,42.473-42.473,42.473c-8.127,0-16.04-2.319-22.883-6.708
c-0.143-0.091-0.202-0.268-0.145-0.427c0.057-0.158,0.218-0.256,0.383-0.237c1.148,0.137,2.322,0.205,3.487,0.205
c6.323,0,12.309-1.955,17.372-5.664c-6.069-0.512-11.285-4.619-13.161-10.478c-0.039-0.122-0.011-0.255,0.073-0.351
c0.085-0.096,0.215-0.138,0.339-0.115c1.682,0.319,3.392,0.34,5.04,0.072c-6.259-1.945-10.658-7.808-10.658-14.483l0.002-0.194
c0.003-0.127,0.072-0.243,0.182-0.306c0.109-0.064,0.245-0.065,0.355-0.003c1.632,0.906,3.438,1.488,5.291,1.711
c-3.597-2.867-5.709-7.213-5.709-11.862c0-2.682,0.71-5.318,2.054-7.623c0.06-0.103,0.166-0.169,0.284-0.178
c0.119-0.012,0.234,0.04,0.309,0.132c7.362,9.03,18.191,14.59,29.771,15.305c-0.193-0.972-0.291-1.974-0.291-2.985
c0-8.361,6.802-15.162,15.162-15.162c4.11,0,8.082,1.689,10.929,4.641c3.209-0.654,6.266-1.834,9.09-3.508
c0.129-0.077,0.291-0.065,0.41,0.028c0.116,0.094,0.164,0.25,0.118,0.394c-0.957,2.993-2.823,5.604-5.33,7.489
c2.361-0.411,4.652-1.105,6.831-2.072c0.146-0.067,0.319-0.025,0.424,0.098c0.104,0.124,0.113,0.301,0.023,0.435
C83.759,31.175,81.299,33.744,78.43,35.841z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB