Skip to content

Commit

Permalink
data: add SVG icons
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegShchavelev committed Jul 13, 2024
1 parent 747ff8d commit 0f27997
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { defineConfig } from 'vitepress'
import markdownTimeline from "vitepress-markdown-timeline"
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'
import UnoCSS from 'unocss/vite'
import {
GitChangelog,
GitChangelogMarkdownSection,
import {
GitChangelog,
GitChangelogMarkdownSection,
} from '@nolebase/vitepress-plugin-git-changelog/vite'

import { telegram } from '../data/icons'

export const shared = defineConfig({
title: "ALT Mobile Wiki",
titleTemplate: ':title — ALT Mobile Wiki',
Expand All @@ -15,11 +17,11 @@ export const shared = defineConfig({
vite: {
plugins: [
UnoCSS(),
GitChangelog({
GitChangelog({
// Fill in your repository URL here
repoURL: () => 'https://github.com/OlegShchavelev/ALTMobileWiki',
repoURL: () => 'https://github.com/OlegShchavelev/ALTMobileWiki',
}),
GitChangelogMarkdownSection(),
GitChangelogMarkdownSection(),
],
optimizeDeps: {
exclude: ['@nolebase/vitepress-plugin-enhanced-readabilities/client']
Expand All @@ -35,7 +37,12 @@ export const shared = defineConfig({
// https://vitepress.dev/reference/default-theme-config
logo: { src: '/logo.svg', width: 36, height: 36, alt: "ALT Mobile Wike" },
socialLinks: [
{ icon: 'github', link: 'https://github.com/OlegShchavelev/ALTMobileWiki' }
{ icon: 'github', link: 'https://github.com/OlegShchavelev/ALTMobileWiki' },
{
icon: {
svg: telegram
}, link: 'https://t.me/altmobile_channel'
}
],
editLink: {
pattern: 'https://github.com/OlegShchavelev/ALTMobileWiki/tree/main/docs/:path',
Expand Down
34 changes: 34 additions & 0 deletions .vitepress/data/icons.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const telegram = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>Telegram</title>
<path d="M12 0C18.6277 0 24 5.37235 24 12C24 18.6277 18.6277 24 12 24C5.37235 24 0 18.6277 0 12C0 5.37235 5.37235 0 12 0ZM16.1395 16.8913C16.3602 16.2141 17.3943 9.46487 17.5221 8.13496C17.5607 7.73217 17.4334 7.46452 17.184 7.34504C16.8824 7.2 16.4358 7.27252 15.9177 7.4593C15.2071 7.71548 6.12261 11.5727 5.59774 11.796C5.1 12.0073 4.62939 12.2379 4.62939 12.5718C4.62939 12.8066 4.7687 12.9386 5.1527 13.0758C5.55235 13.2183 6.55878 13.5235 7.15304 13.6873C7.72539 13.8454 8.37704 13.7082 8.74226 13.4812C9.12939 13.2407 13.597 10.2511 13.9179 9.98922C14.2383 9.7273 14.4939 10.0628 14.232 10.3252C13.9701 10.5871 10.9033 13.5637 10.499 13.9758C10.008 14.4762 10.3565 14.9948 10.6857 15.2024C11.0619 15.4393 13.7671 17.2539 14.1746 17.545C14.5821 17.8362 14.9953 17.9682 15.3736 17.9682C15.7518 17.9682 15.9511 17.4699 16.1395 16.8913Z" />
</svg>
`

const gitflic = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>Gitflic</title>
<path d="M9.80801 9.808C9.99201 9.732 10.104 9.608 10.14 9.472C10.176 9.336 10.144 9.168 10.024 9.012C9.90001 8.852 9.69601 8.712 9.44001 8.644C9.18401 8.572 8.93601 8.596 8.74801 8.668C8.56001 8.744 8.44801 8.868 8.41201 9.004C8.37601 9.14 8.40801 9.308 8.53201 9.464C8.65601 9.624 8.86001 9.764 9.11601 9.832C9.37601 9.904 9.62001 9.88 9.80801 9.808Z" />
<path d="M11.952 11.656C10.54 11.656 9.388 12.308 9.34 13.12C9.336 13.14 9.336 13.16 9.336 13.18C9.336 13.52 9.532 13.836 9.856 14.088C10.204 14.312 10.736 14.408 11.076 14.616C11.196 14.688 11.308 14.768 11.404 14.868C11.76 15.244 11.768 15.572 11.688 15.8C11.516 16.276 10.996 16.604 10.396 16.608C10.304 16.612 10.232 16.688 10.232 16.78C10.232 16.872 10.308 16.944 10.4 16.944C10.404 16.944 10.404 16.944 10.404 16.944C11.128 16.936 11.764 16.536 11.996 15.948C12.24 16.516 12.864 16.896 13.572 16.908C13.576 16.908 13.576 16.908 13.576 16.908C13.668 16.908 13.744 16.836 13.744 16.744C13.748 16.652 13.672 16.572 13.58 16.572C12.98 16.564 12.452 16.24 12.288 15.764C12.128 15.296 12.428 14.956 12.52 14.868C12.616 14.768 12.728 14.684 12.844 14.616C13.188 14.408 13.656 14.292 14.06 14.092C14.38 13.932 14.58 13.524 14.576 13.18C14.576 13.144 14.572 13.104 14.568 13.072C14.468 12.28 13.336 11.656 11.952 11.656Z" />
<path d="M19.972 0H4.028C1.804 0 0 1.804 0 4.028V19.968C0 22.196 1.804 24 4.028 24H19.968C22.192 24 23.996 22.196 23.996 19.972V4.028C24 1.804 22.196 0 19.972 0ZM17.84 17.412L17.824 17.428C17.66 17.6 17.488 17.764 17.308 17.92L14.308 20.776L13.56 20.048L11.96 21.88L10.396 20.092L9.692 20.78L6.7 17.928C6.512 17.768 6.336 17.596 6.164 17.42L6.156 17.412C4.824 16.016 4.004 14.136 4.004 12.076C4.004 10.408 4.54 8.86 5.448 7.592C4.936 7.084 4.624 6.376 4.64 5.6C4.668 4.104 5.924 2.896 7.42 2.924C8.508 2.944 9.44 3.6 9.86 4.536C10.54 4.348 11.256 4.252 11.996 4.252C12.74 4.252 13.456 4.348 14.14 4.536C14.576 3.556 15.58 2.88 16.732 2.92C18.112 2.972 19.248 4.064 19.352 5.44C19.416 6.28 19.092 7.048 18.544 7.592C19.452 8.86 19.988 10.408 19.988 12.072C19.992 14.128 19.176 16.008 17.84 17.412Z" />
<path d="M15.296 8.672C15.108 8.596 14.864 8.576 14.604 8.648C14.344 8.72 14.14 8.86 14.02 9.016C13.896 9.172 13.864 9.336 13.9 9.476C13.936 9.616 14.048 9.736 14.236 9.812C14.424 9.888 14.668 9.908 14.928 9.836C15.188 9.764 15.392 9.624 15.512 9.468C15.636 9.312 15.668 9.148 15.632 9.008C15.592 8.868 15.48 8.748 15.296 8.672Z" />
</svg>
`

const gitlab = `<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitLab</title><path d="m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z"/></svg>`
const vk = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>VKontakte</title>
<path d="M15.6876 0H8.3256C1.5984 0 0 1.5996 0 8.3124V15.6756C0 22.4004 1.5876 24 8.3124 24H15.6756C22.4004 24 24 22.4124 24 15.6876V8.3256C24 1.5984 22.4124 0 15.6876 0ZM19.3752 17.124H17.6244C16.962 17.124 16.7628 16.5876 15.5748 15.3996C14.538 14.4 14.1 14.2752 13.8372 14.2752C13.4748 14.2752 13.3752 14.3748 13.3752 14.8752V16.4496C13.3752 16.8756 13.2372 17.1252 12.1248 17.1252C11.0452 17.0526 9.99831 16.7247 9.07032 16.1682C8.14233 15.6118 7.3598 14.8429 6.7872 13.9248C5.4278 12.2328 4.48193 10.247 4.0248 8.1252C4.0248 7.8624 4.1244 7.6248 4.6248 7.6248H6.3756C6.8256 7.6248 6.9876 7.8252 7.1628 8.2872C8.0124 10.788 9.462 12.9624 10.05 12.9624C10.2756 12.9624 10.374 12.8628 10.374 12.3V9.7248C10.2996 8.55 9.6756 8.4504 9.6756 8.0256C9.68362 7.91356 9.73496 7.80904 9.81875 7.73422C9.90253 7.65939 10.0122 7.62015 10.1244 7.6248H12.8748C13.2504 7.6248 13.3752 7.812 13.3752 8.262V11.7372C13.3752 12.1128 13.5372 12.2376 13.65 12.2376C13.8756 12.2376 14.0496 12.1128 14.4624 11.7C15.349 10.6187 16.0734 9.41409 16.6128 8.124C16.6679 7.96904 16.7723 7.83637 16.9098 7.74623C17.0474 7.6561 17.2107 7.61345 17.3748 7.6248H19.1256C19.65 7.6248 19.7616 7.8876 19.65 8.262C19.0134 9.68812 18.2257 11.0419 17.3004 12.3C17.112 12.588 17.0364 12.738 17.3004 13.0752C17.4744 13.338 18.0876 13.8504 18.5004 14.3376C19.1003 14.936 19.5984 15.6283 19.9752 16.3872C20.1252 16.8744 19.8744 17.124 19.3752 17.124Z" />
</svg>
`

const messager = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M17 3.33782C15.5291 2.48697 13.8214 2 12 2C6.47715 2 2 6.47715 2 12C2 13.5997 2.37562 15.1116 3.04346 16.4525C3.22094 16.8088 3.28001 17.2161 3.17712 17.6006L2.58151 19.8267C2.32295 20.793 3.20701 21.677 4.17335 21.4185L6.39939 20.8229C6.78393 20.72 7.19121 20.7791 7.54753 20.9565C8.88837 21.6244 10.4003 22 12 22C17.5228 22 22 17.5228 22 12C22 10.1786 21.513 8.47087 20.6622 7" stroke="#1C274C" stroke-width="1.5" stroke-linecap="round" />
</svg>
`

const gitverse = `
<svg width="522.131" height="139.907" fill="none" viewBox="0 0 131.401 139.907" xmlns="http://www.w3.org/2000/svg">
<path fill="" fill-rule="evenodd" d="M 70.31 133.881 C 98.63 133.881 122.326 114.077 128.304 87.561 C 128.336 83.816 128.091 79.994 127.845 76.163 C 127.459 70.161 127.072 64.138 127.752 58.363 C 128.045 55.867 128.331 53.281 128.596 50.65 C 131.609 58.139 133.153 66.138 133.143 74.21 C 133.143 109.043 104.909 137.28 70.079 137.28 C 35.25 137.28 7.016 109.043 7.016 74.21 C 7.016 46.732 24.586 23.358 49.103 14.713 C 48.573 19.098 48.358 24.109 48.142 29.153 C 48.012 32.167 47.882 35.193 47.685 38.103 C 47.685 38.374 48.046 38.555 48.272 38.374 L 55.855 32.618 C 59.813 29.613 64.645 27.987 69.614 27.987 L 70.942 27.987 L 73.812 27.989 C 72.095 22.941 69.564 16.558 66.722 11.228 C 67.841 11.169 68.959 11.14 70.079 11.14 C 81.085 11.14 91.433 13.96 100.439 18.916 C 99.097 20.912 97.801 22.905 96.564 24.805 C 94.878 27.395 93.304 29.814 91.884 31.83 L 83.319 31.83 C 78.536 31.83 73.909 33.528 70.261 36.621 L 51.849 52.237 L 18.153 52.696 C 21.88 54.737 26.081 55.757 30.329 55.652 L 30.818 55.64 C 32.832 55.591 34.342 57.47 33.86 59.426 L 33.224 62.006 C 32.705 64.114 31.524 66 29.856 67.389 L 23.527 72.658 C 23.438 72.738 23.389 72.854 23.392 72.974 L 23.48 75.913 C 23.538 77.838 24.55 79.605 26.24 80.527 C 30.753 82.987 40.416 87.707 50.758 89.323 C 62.758 91.199 69.063 88.725 72.128 87.523 C 72.698 87.299 73.157 87.119 73.518 87.02 C 73.699 86.975 73.97 87.29 73.97 87.29 C 65.11 92.89 61.354 94.702 50.758 94.385 C 40.162 94.067 23.528 85.677 23.528 85.677 C 23.121 85.497 22.76 86.084 23.166 86.355 C 23.166 86.355 34.932 98.751 50.758 101.941 C 55.541 102.904 61.933 102.321 69.008 101.675 C 80.573 100.619 93.962 99.397 105.127 104.493 C 98.631 103.464 89.848 103.299 79.152 105.779 C 68.069 108.349 62.529 112.962 56.69 117.826 C 52.833 121.038 48.846 124.359 43.043 127.272 C 51.211 131.496 60.483 133.881 70.311 133.881 L 70.31 133.881 Z M 110.883 22.721 C 113.52 19.476 116.342 16.988 118.454 17.65 C 123.782 19.32 116.059 47.272 116.059 47.272 L 114.308 45.05 C 111.125 41.009 107.415 37.413 103.278 34.356 C 103.278 34.356 105.96 29.352 109.282 24.803 C 109.797 24.095 110.331 23.4 110.883 22.72 L 110.883 22.721 Z M 101.924 16.735 C 108.823 6.751 116.701 -2.46 123.539 0.595 C 130.908 3.891 130.85 25.088 129.097 45.325 C 133.371 54.042 135.771 63.845 135.771 74.21 C 135.771 110.493 106.36 139.907 70.081 139.907 C 33.799 139.907 4.389 110.493 4.389 74.21 C 4.389 45.107 23.311 20.423 49.524 11.794 C 50.525 5.918 52.339 1.635 55.924 0.739 C 58.914 -0.009 62.226 3.549 65.289 8.685 C 66.883 8.57 68.481 8.513 70.079 8.513 C 81.633 8.513 92.49 11.497 101.923 16.735 L 101.924 16.735 Z M 69.337 32.14 L 47.904 48.776 L 41.062 48.776 L 59.004 34.874 C 61.895 32.634 65.455 31.433 69.112 31.462 C 69.472 31.462 69.608 31.913 69.337 32.139 L 69.337 32.14 Z M 68.64 53.593 C 68.73 51.109 70.085 48.987 72.072 47.767 C 76.092 48.354 79.75 49.528 82.956 52.238 C 83.091 52.871 83.182 53.548 83.136 54.27 C 82.957 58.132 79.777 61.173 75.911 61.18 L 75.595 61.18 C 71.575 61 68.46 57.613 68.64 53.593 Z M 16.023 67.1 L 16.023 70.697 C 16.023 74.143 17.149 77.495 19.229 80.242 L 19.229 71.3 L 16.023 67.1 Z" />
</svg>
`

export { telegram, gitflic, gitlab, vk, messager, gitverse }
7 changes: 7 additions & 0 deletions .vitepress/theme/components/icons/AMWIconTelegram.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<template>
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<title>Telegram</title>
<path
d="M12 0C18.6277 0 24 5.37235 24 12C24 18.6277 18.6277 24 12 24C5.37235 24 0 18.6277 0 12C0 5.37235 5.37235 0 12 0ZM16.1395 16.8913C16.3602 16.2141 17.3943 9.46487 17.5221 8.13496C17.5607 7.73217 17.4334 7.46452 17.184 7.34504C16.8824 7.2 16.4358 7.27252 15.9177 7.4593C15.2071 7.71548 6.12261 11.5727 5.59774 11.796C5.1 12.0073 4.62939 12.2379 4.62939 12.5718C4.62939 12.8066 4.7687 12.9386 5.1527 13.0758C5.55235 13.2183 6.55878 13.5235 7.15304 13.6873C7.72539 13.8454 8.37704 13.7082 8.74226 13.4812C9.12939 13.2407 13.597 10.2511 13.9179 9.98922C14.2383 9.7273 14.4939 10.0628 14.232 10.3252C13.9701 10.5871 10.9033 13.5637 10.499 13.9758C10.008 14.4762 10.3565 14.9948 10.6857 15.2024C11.0619 15.4393 13.7671 17.2539 14.1746 17.545C14.5821 17.8362 14.9953 17.9682 15.3736 17.9682C15.7518 17.9682 15.9511 17.4699 16.1395 16.8913Z" />
</svg>
</template>

0 comments on commit 0f27997

Please sign in to comment.