tailoring to my taste
BIN
dist/public/assets/img/apple-touch-icon.png
vendored
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 7.7 KiB |
BIN
dist/public/assets/img/avatar_default.png
vendored
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 8.6 KiB |
BIN
dist/public/assets/img/favicon.png
vendored
Before Width: | Height: | Size: 151 B After Width: | Height: | Size: 6.6 KiB |
2
dist/public/assets/img/favicon.svg
vendored
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 160" height="32"><path d="M32 0v160H0V0Zm48 0v32h48v32H80V32H48v64h80v32H72v32h88V0Z" style="fill:#a6c6f7"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 323 323" height="32"><path fill="url(#a)" d="M112.5 187.6c-42 0-55.75 17.28-60.25 28.672C65.625 222.16 75 235.728 75 251.6c0 10.184-3.95 19.952-10.983 27.153S47.446 290 37.5 290s-19.484-4.046-26.516-11.247C3.95 271.552 0 261.784 0 251.6c0-16.768 10.375-30.976 25-36.224V108.624c-7.324-2.632-13.667-7.534-18.147-14.025S-.022 80.349 0 72.4c0-10.184 3.951-19.952 10.984-27.153S27.554 34 37.5 34s19.484 4.046 26.517 11.247C71.049 52.45 75 62.216 75 72.4c0 16.768-10.375 30.976-25 36.224v67.712C61 168.016 77 162 100 162c33.375 0 44.5-17.152 48.125-28.544-6.835-2.923-12.675-7.847-16.789-14.154-4.113-6.307-6.317-13.717-6.336-21.302 0-10.184 3.951-19.951 10.984-27.153S152.554 59.6 162.5 59.6s19.484 4.046 26.517 11.247C196.049 78.05 200 87.816 200 98c0 17.152-11 32-26.125 36.608-3.25 18.304-15.375 52.992-61.375 52.992m-75 51.2c-3.315 0-6.494 1.349-8.839 3.749-2.344 2.4-3.66 5.656-3.66 9.051s1.316 6.651 3.66 9.051 5.524 3.749 8.84 3.749c3.314 0 6.494-1.349 8.838-3.749S50 254.995 50 251.6s-1.317-6.651-3.661-9.051-5.524-3.749-8.839-3.749m0-179.2c-3.315 0-6.494 1.349-8.839 3.749-2.344 2.4-3.66 5.656-3.66 9.051s1.316 6.65 3.66 9.051 5.524 3.749 8.84 3.749c3.314 0 6.494-1.349 8.838-3.749S50 75.795 50 72.4s-1.317-6.65-3.661-9.051S40.815 59.6 37.5 59.6m125 25.6c-3.315 0-6.495 1.349-8.839 3.749S150 94.605 150 98s1.317 6.65 3.661 9.051 5.524 3.749 8.839 3.749 6.495-1.349 8.839-3.749A12.96 12.96 0 0 0 175 98c0-3.395-1.317-6.65-3.661-9.051S165.815 85.2 162.5 85.2"/><path fill="url(#b)" d="m283.286 260.603-36.777-14.945v-15.436l76.075 34.501v15.683L297 268.782l-50.491 20.972v-15.621zM297 222.702h-50.491v-15.56H297zm-63.529-7.995q0 3.874-2.706 6.58-2.706 2.645-6.458 2.645t-6.519-2.706-2.767-6.519q0-2.522 1.291-4.613a9.7 9.7 0 0 1 3.321-3.382q2.091-1.292 4.674-1.292 3.752 0 6.458 2.768 2.706 2.706 2.706 6.519m18.634-59.105v-41.205h4.859q8.671 0 16.236 2.952 7.503 2.89 13.222 8.303 5.658 5.412 8.856 12.853 3.198 7.38 3.198 16.298 0 9.164-3.259 16.728t-9.041 13.038-13.407 8.487q-7.687 2.952-16.42 2.952-8.672 0-16.298-2.952-7.687-3.013-13.407-8.487-5.78-5.473-9.04-13.038t-3.26-16.728q0-7.073 1.538-12.608t4.182-9.655q2.583-4.182 5.781-7.196 3.136-3.075 6.334-5.104l7.011 14.391q-4.305 2.952-7.38 7.872-3.075 4.858-3.075 12.3 0 5.535 2.214 10.209a24.3 24.3 0 0 0 5.966 7.995q3.813 3.321 8.856 5.166 4.982 1.845 10.578 1.845 5.658 0 10.639-1.845 4.982-1.845 8.856-5.166a24.3 24.3 0 0 0 5.966-7.995q2.152-4.674 2.152-10.209 0-5.043-1.476-9.164t-4.182-7.134a20.3 20.3 0 0 0-6.334-4.858q-3.69-1.784-7.934-2.03v23.985zM297 102.464h-50.491v-15.56H297zm-63.529-7.995q0 3.875-2.706 6.581-2.706 2.644-6.458 2.644t-6.519-2.706-2.767-6.519q0-2.52 1.291-4.612a9.7 9.7 0 0 1 3.321-3.383q2.091-1.29 4.674-1.291 3.752 0 6.458 2.767 2.706 2.706 2.706 6.52m13.038-17.468v-9.103h-20.726V52.402h20.726V40.469h12.976v11.932h18.266q3.628 0 5.658-1.169 1.968-1.169 1.968-3.69 0-1.907-.738-3.136-.8-1.23-1.107-1.477l11.193-5.535q.369.37 1.291 2.399.923 1.968 1.661 5.105.8 3.075.799 6.949 0 6.95-3.997 11.5-4.059 4.552-12.546 4.551h-22.448v9.103z"/><defs><linearGradient id="a" x1="100" x2="100" y1="34" y2="290" gradientUnits="userSpaceOnUse"><stop stop-color="#F0F"/><stop offset="1" stop-color="#F68"/></linearGradient><linearGradient id="b" x1="216" x2="297" y1="162" y2="162" gradientUnits="userSpaceOnUse"><stop stop-color="#F0F"/><stop offset="1" stop-color="#F68"/></linearGradient></defs></svg>
|
Before Width: | Height: | Size: 171 B After Width: | Height: | Size: 3.4 KiB |
BIN
dist/public/assets/img/logo.png
vendored
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 20 KiB |
2
dist/public/assets/img/logo.svg
vendored
@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 160" height="32"><path d="M32 0v160H0V0Zm368 128V80.701h32V48h-32V0h-32v48h-48v112h32V80.701h16V160h80v-32ZM48 0v128h32V0Zm96 32v96H80v32h96V32Zm80-32v32h48v32h-48V32h-32v64h80v32h-56v32h88V0Zm128 0h-32v32h32Z" style="fill:#a6c6f7"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 80 32" height="32"><path fill="url(#a)" d="m5.152 31.04 2.268-6.02L1.708 10.6h2.464l3.64 9.604q.225.56.42 1.26.224.672.336 1.12.14-.448.336-1.148.195-.7.392-1.26l3.416-9.576h2.38L7.504 31.04zM16.453 26v-2.016h5.488V12.616h-4.788V10.6h7.028v13.384h5.208V26zM22.81 7.772q-.868 0-1.4-.448-.504-.449-.504-1.232 0-.811.504-1.288.532-.476 1.4-.476t1.372.476q.532.476.532 1.288 0 .756-.532 1.232-.504.448-1.372.448M37.706 26.32q-2.24 0-3.936-.832-1.664-.864-2.592-2.4-.896-1.568-.896-3.68V9.232q0-2.145.896-3.68.928-1.536 2.592-2.368 1.696-.864 3.936-.864 2.272 0 3.904.864 1.665.832 2.592 2.368.928 1.535.928 3.68h-4.032q0-1.665-.896-2.528-.864-.864-2.496-.864-1.631 0-2.528.864-.896.864-.896 2.496v10.208q0 1.632.896 2.528.897.896 2.528.896t2.496-.896q.897-.896.896-2.528V17.04H37.13v-3.456h8v5.824q0 2.112-.928 3.68-.928 1.536-2.592 2.4-1.633.832-3.904.832m8.692-.32v-3.648h6.144V12.016h-5.344V8.4h9.184v13.952h5.44V26zm7.744-20.544q-1.216 0-1.92-.608-.705-.64-.704-1.696 0-1.056.704-1.664.703-.64 1.92-.64 1.215 0 1.92.64.704.608.704 1.664t-.704 1.696q-.705.608-1.92.608M71.473 26q-2.528 0-3.968-1.408-1.407-1.409-1.408-3.872v-8.704H61.33V8.4h4.768V3.44h4.032V8.4h6.752v3.616H70.13v8.704q0 1.665 1.632 1.664h4.8V26z"/><defs><linearGradient id="a" x1="0" x2="80" y1="14.5" y2="14.5" gradientUnits="userSpaceOnUse"><stop stop-color="#F0F"/><stop offset="1" stop-color="#F68"/></linearGradient></defs></svg>
|
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 1.4 KiB |
@ -1,17 +1,14 @@
|
||||
{
|
||||
"name": "@lucas-labs/lugit-theme",
|
||||
"name": "yigit-gitea-theme",
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"description": "Custom theme for lucaslabs' internal git server",
|
||||
"description": "Custom theme for yiGit Gitea instance.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "node tools/build.js",
|
||||
"serve": "node tools/serve.js",
|
||||
"deploy": "node tools/deploy.js",
|
||||
"restart": "node tools/restart.js",
|
||||
"style:check": "npx prettier -c ."
|
||||
},
|
||||
"author": "lucas-labs",
|
||||
"author": "fybx",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"browser-sync": "^2.29.3",
|
||||
|
11
place.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}")
|
||||
git fetch && git pull
|
||||
|
||||
rm -r ../public
|
||||
rm -r ../templates
|
||||
|
||||
mv -t ../ dist/public
|
||||
chown gitea:gitea -R ../public
|
||||
service gitea restart
|
4349
pnpm-lock.yaml
generated
Normal file
@ -20,10 +20,10 @@ active_stopwatch = Active Time Tracker
|
||||
create_new = Create…
|
||||
user_profile_and_more = Profile and Settings…
|
||||
signed_in_as = Signed in as
|
||||
enable_javascript = This website requires JavaScript.
|
||||
enable_javascript = yiGit requires JavaScript.
|
||||
toc = Table of Contents
|
||||
licenses = Licenses
|
||||
return_to_gitea = Return to Gitea
|
||||
return_to_gitea = Return to yiGit
|
||||
|
||||
username = Username
|
||||
email = Email Address
|
||||
@ -425,7 +425,7 @@ activate_email = Verify your email address
|
||||
activate_email.title = %s, please verify your e-mail address
|
||||
activate_email.text = Please click the following link to verify your email address within <b>%s</b>:
|
||||
|
||||
register_notify = Welcome to Gitea
|
||||
register_notify = Welcome to yiGit
|
||||
register_notify.title = %[1]s, welcome to %[2]s
|
||||
register_notify.text_1 = this is your registration confirmation email for %s!
|
||||
register_notify.text_2 = You can now login via username: %s.
|
||||
@ -789,9 +789,9 @@ ssh_disabled = SSH Disabled
|
||||
ssh_signonly = SSH is currently disabled so these keys are only used for commit signature verification.
|
||||
ssh_externally_managed = This SSH key is externally managed for this user
|
||||
manage_social = Manage Associated Social Accounts
|
||||
social_desc = These social accounts are linked to your Gitea account. Make sure you recognize all of them as they can be used to sign in to your Gitea account.
|
||||
social_desc = These social accounts are linked to your yiGit account. Make sure you recognize all of them as they can be used to sign in to your yiGit account.
|
||||
unbind = Unlink
|
||||
unbind_success = The social account has been unlinked from your Gitea account.
|
||||
unbind_success = The social account has been unlinked from your yiGit account.
|
||||
|
||||
manage_access_token = Manage Access Tokens
|
||||
generate_new_token = Generate New Token
|
||||
|
@ -1,10 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 160">
|
||||
<defs>
|
||||
<style>
|
||||
.a {
|
||||
fill: #a6c6f7;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path class="a" d="M32,0V160H0V0ZM80,0V32h48V64H80V32H48V96h80v32H72v32h88V0Z"/>
|
||||
<svg width="323" height="323" viewBox="0 0 323 323" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M112.5 187.6C70.5001 187.6 56.7501 204.88 52.2501 216.272C65.6251 222.16 75.0001 235.728 75.0001 251.6C75.0001 261.784 71.0492 271.552 64.0166 278.753C56.984 285.954 47.4457 290 37.5001 290C27.5545 290 18.0163 285.954 10.9836 278.753C3.95104 271.552 0.00015643 261.784 0.00015643 251.6C0.00015643 234.832 10.3751 220.624 25.0001 215.376V108.624C17.6755 105.992 11.3328 101.09 6.85278 94.5989C2.37276 88.1075 -0.0222962 80.3488 0.00015643 72.4C0.00015643 62.2157 3.95104 52.4485 10.9836 45.2471C18.0163 38.0457 27.5545 34 37.5001 34C47.4457 34 56.984 38.0457 64.0166 45.2471C71.0492 52.4485 75.0001 62.2157 75.0001 72.4C75.0001 89.168 64.6251 103.376 50.0001 108.624V176.336C61.0001 168.016 77.0001 162 100 162C133.375 162 144.5 144.848 148.125 133.456C141.29 130.533 135.45 125.609 131.336 119.302C127.223 112.995 125.019 105.585 125 98C125 87.8157 128.951 78.0485 135.984 70.8471C143.016 63.6457 152.554 59.6 162.5 59.6C172.446 59.6 181.984 63.6457 189.017 70.8471C196.049 78.0485 200 87.8157 200 98C200 115.152 189 130 173.875 134.608C170.625 152.912 158.5 187.6 112.5 187.6ZM37.5001 238.8C34.1849 238.8 31.0055 240.149 28.6613 242.549C26.3171 244.949 25.0001 248.205 25.0001 251.6C25.0001 254.995 26.3171 258.251 28.6613 260.651C31.0055 263.051 34.1849 264.4 37.5001 264.4C40.8153 264.4 43.9947 263.051 46.3389 260.651C48.6831 258.251 50.0001 254.995 50.0001 251.6C50.0001 248.205 48.6831 244.949 46.3389 242.549C43.9947 240.149 40.8153 238.8 37.5001 238.8ZM37.5001 59.6C34.1849 59.6 31.0055 60.9486 28.6613 63.349C26.3171 65.7495 25.0001 69.0052 25.0001 72.4C25.0001 75.7948 26.3171 79.0505 28.6613 81.451C31.0055 83.8514 34.1849 85.2 37.5001 85.2C40.8153 85.2 43.9947 83.8514 46.3389 81.451C48.6831 79.0505 50.0001 75.7948 50.0001 72.4C50.0001 69.0052 48.6831 65.7495 46.3389 63.349C43.9947 60.9486 40.8153 59.6 37.5001 59.6ZM162.5 85.2C159.185 85.2 156.005 86.5486 153.661 88.949C151.317 91.3495 150 94.6052 150 98C150 101.395 151.317 104.65 153.661 107.051C156.005 109.451 159.185 110.8 162.5 110.8C165.815 110.8 168.995 109.451 171.339 107.051C173.683 104.65 175 101.395 175 98C175 94.6052 173.683 91.3495 171.339 88.949C168.995 86.5486 165.815 85.2 162.5 85.2Z" fill="url(#paint0_linear_5_116)"/>
|
||||
<path d="M283.286 260.603L246.509 245.658L246.509 230.222L322.584 264.723L322.584 280.406L297 268.782L246.509 289.754L246.509 274.133L283.286 260.603ZM297 222.702L246.509 222.702L246.509 207.142L297 207.142L297 222.702ZM233.471 214.707C233.471 217.29 232.569 219.483 230.765 221.287C228.961 223.05 226.808 223.932 224.307 223.932C221.806 223.932 219.633 223.03 217.788 221.226C215.943 219.422 215.021 217.249 215.021 214.707C215.021 213.026 215.451 211.488 216.312 210.094C217.132 208.7 218.239 207.573 219.633 206.712C221.027 205.851 222.585 205.42 224.307 205.42C226.808 205.42 228.961 206.343 230.765 208.188C232.569 209.992 233.471 212.165 233.471 214.707ZM252.105 155.602L252.105 114.397L256.964 114.397C262.745 114.397 268.157 115.381 273.2 117.349C278.202 119.276 282.609 122.044 286.422 125.652C290.194 129.26 293.146 133.544 295.278 138.505C297.41 143.425 298.476 148.858 298.476 154.803C298.476 160.912 297.39 166.488 295.217 171.531C293.044 176.574 290.03 180.92 286.176 184.569C282.322 188.218 277.853 191.047 272.769 193.056C267.644 195.024 262.171 196.008 256.349 196.008C250.568 196.008 245.135 195.024 240.051 193.056C234.926 191.047 230.457 188.218 226.644 184.569C222.79 180.92 219.777 176.574 217.604 171.531C215.431 166.488 214.344 160.912 214.344 154.803C214.344 150.088 214.857 145.885 215.882 142.195C216.907 138.505 218.301 135.287 220.064 132.54C221.786 129.752 223.713 127.353 225.845 125.344C227.936 123.294 230.047 121.593 232.179 120.24L239.19 134.631C236.32 136.599 233.86 139.223 231.81 142.503C229.76 145.742 228.735 149.842 228.735 154.803C228.735 158.493 229.473 161.896 230.949 165.012C232.384 168.087 234.373 170.752 236.915 173.007C239.457 175.221 242.409 176.943 245.771 178.173C249.092 179.403 252.618 180.018 256.349 180.018C260.121 180.018 263.667 179.403 266.988 178.173C270.309 176.943 273.261 175.221 275.844 173.007C278.386 170.752 280.375 168.087 281.81 165.012C283.245 161.896 283.962 158.493 283.962 154.803C283.962 151.441 283.47 148.386 282.486 145.639C281.502 142.892 280.108 140.514 278.304 138.505C276.5 136.455 274.389 134.836 271.97 133.647C269.51 132.458 266.865 131.781 264.036 131.617L264.036 155.602L252.105 155.602ZM297 102.464L246.509 102.464L246.509 86.9049L297 86.9049L297 102.464ZM233.471 94.4694C233.471 97.0524 232.569 99.2459 230.765 101.05C228.961 102.813 226.808 103.694 224.307 103.694C221.806 103.694 219.633 102.792 217.788 100.988C215.943 99.1844 215.021 97.0114 215.021 94.4694C215.021 92.7884 215.451 91.2509 216.312 89.8569C217.132 88.4629 218.239 87.3354 219.633 86.4744C221.027 85.6134 222.585 85.1829 224.307 85.1829C226.808 85.1829 228.961 86.1054 230.765 87.9504C232.569 89.7544 233.471 91.9274 233.471 94.4694ZM246.509 77.0005L246.509 67.8985L225.783 67.8985L225.783 52.4005L246.509 52.4005L246.509 40.4695L259.485 40.4695L259.485 52.4005L277.751 52.4005C280.17 52.4005 282.056 52.011 283.409 51.232C284.721 50.453 285.377 49.223 285.377 47.542C285.377 46.271 285.131 45.2255 284.639 44.4055C284.106 43.5855 283.737 43.0935 283.532 42.9295L294.725 37.3945C294.971 37.6405 295.401 38.44 296.016 39.793C296.631 41.105 297.185 42.8065 297.677 44.8975C298.21 46.9475 298.476 49.264 298.476 51.847C298.476 56.48 297.144 60.3135 294.479 63.3475C291.773 66.3815 287.591 67.8985 281.933 67.8985L259.485 67.8985L259.485 77.0005L246.509 77.0005Z" fill="url(#paint1_linear_5_116)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_5_116" x1="100" y1="34" x2="100" y2="290" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FF00FF"/>
|
||||
<stop offset="1" stop-color="#FF6688"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="paint1_linear_5_116" x1="216" y1="162" x2="297" y2="162" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FF00FF"/>
|
||||
<stop offset="1" stop-color="#FF6688"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 5.9 KiB |
@ -1,10 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 160">
|
||||
<defs>
|
||||
<style>
|
||||
.a {
|
||||
fill: #a6c6f7;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<path class="a" d="M32,0V160H0V0ZM400,128V80.70135h32V48H400V0H368V48H320V160h32V80.70135h16V160h80V128ZM48,0V128H80V0Zm96,32v96H80v32h96V32ZM224,0V32h48V64H224V32H192V96h80v32H216v32h88V0ZM352,0H320V32h32Z"/>
|
||||
<svg width="80" height="32" viewBox="0 0 80 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.152 31.04L7.42 25.02L1.708 10.6H4.172L7.812 20.204C7.96133 20.5773 8.10133 20.9973 8.232 21.464C8.38133 21.912 8.49333 22.2853 8.568 22.584C8.66133 22.2853 8.77333 21.9027 8.904 21.436C9.03467 20.9693 9.16533 20.5493 9.296 20.176L12.712 10.6H15.092L7.504 31.04H5.152ZM16.4531 26V23.984H21.9411V12.616H17.1531V10.6H24.1811V23.984H29.3891V26H16.4531ZM22.8091 7.772C22.2304 7.772 21.7637 7.62267 21.4091 7.324C21.0731 7.02533 20.9051 6.61467 20.9051 6.092C20.9051 5.55067 21.0731 5.12133 21.4091 4.804C21.7637 4.48667 22.2304 4.328 22.8091 4.328C23.3877 4.328 23.8451 4.48667 24.1811 4.804C24.5357 5.12133 24.7131 5.55067 24.7131 6.092C24.7131 6.596 24.5357 7.00667 24.1811 7.324C23.8451 7.62267 23.3877 7.772 22.8091 7.772ZM37.7061 26.32C36.2128 26.32 34.9008 26.0427 33.7701 25.488C32.6608 24.912 31.7968 24.112 31.1781 23.088C30.5808 22.0427 30.2821 20.816 30.2821 19.408V9.232C30.2821 7.80267 30.5808 6.576 31.1781 5.552C31.7968 4.528 32.6608 3.73867 33.7701 3.184C34.9008 2.608 36.2128 2.32 37.7061 2.32C39.2208 2.32 40.5221 2.608 41.6101 3.184C42.7195 3.73867 43.5835 4.528 44.2021 5.552C44.8208 6.576 45.1301 7.80267 45.1301 9.232H41.0981C41.0981 8.12267 40.7995 7.28 40.2021 6.704C39.6261 6.128 38.7941 5.84 37.7061 5.84C36.6181 5.84 35.7755 6.128 35.1781 6.704C34.5808 7.28 34.2821 8.112 34.2821 9.2V19.408C34.2821 20.496 34.5808 21.3387 35.1781 21.936C35.7755 22.5333 36.6181 22.832 37.7061 22.832C38.7941 22.832 39.6261 22.5333 40.2021 21.936C40.7995 21.3387 41.0981 20.496 41.0981 19.408V17.04H37.1301V13.584H45.1301V19.408C45.1301 20.816 44.8208 22.0427 44.2021 23.088C43.5835 24.112 42.7195 24.912 41.6101 25.488C40.5221 26.0427 39.2208 26.32 37.7061 26.32ZM46.3976 26V22.352H52.5416V12.016H47.1976V8.4H56.3816V22.352H61.8216V26H46.3976ZM54.1416 5.456C53.331 5.456 52.691 5.25333 52.2216 4.848C51.7523 4.42133 51.5176 3.856 51.5176 3.152C51.5176 2.448 51.7523 1.89333 52.2216 1.488C52.691 1.06133 53.331 0.848 54.1416 0.848C54.9523 0.848 55.5923 1.06133 56.0616 1.488C56.531 1.89333 56.7656 2.448 56.7656 3.152C56.7656 3.856 56.531 4.42133 56.0616 4.848C55.5923 5.25333 54.9523 5.456 54.1416 5.456ZM71.4731 26C69.7878 26 68.4651 25.5307 67.5051 24.592C66.5665 23.6533 66.0971 22.3627 66.0971 20.72V12.016H61.3291V8.4H66.0971V3.44H70.1291V8.4H76.8811V12.016H70.1291V20.72C70.1291 21.8293 70.6731 22.384 71.7611 22.384H76.5611V26H71.4731Z" fill="url(#paint0_linear_3_2)"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_3_2" x1="0" y1="14.5" x2="80" y2="14.5" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FF00FF"/>
|
||||
<stop offset="1" stop-color="#FF6688"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 368 B After Width: | Height: | Size: 2.6 KiB |
@ -4,7 +4,7 @@
|
||||
|
||||
$is-dark: true;
|
||||
|
||||
$brand: #a6c6f7;
|
||||
$brand: #ff6688;
|
||||
|
||||
$colors: (
|
||||
theme: (
|
@ -4,7 +4,7 @@
|
||||
|
||||
$is-dark: true;
|
||||
|
||||
$brand: #6296e2;
|
||||
$brand: #ff6688;
|
||||
|
||||
$colors: (
|
||||
theme: (
|
@ -1,34 +0,0 @@
|
||||
import { Logger } from './utils/logger.js';
|
||||
import { getArg } from './utils/funcs.js';
|
||||
import { resolve } from 'path';
|
||||
import { cwd } from 'process';
|
||||
import { deploy } from './tasks/deploy.js';
|
||||
|
||||
const logger = new Logger('deploy', 'info', 'brightMagenta');
|
||||
|
||||
const src = './src';
|
||||
const dist = './dist';
|
||||
const serviceName = getArg('--service', 'gitea');
|
||||
const srcPath = resolve(cwd(), src);
|
||||
const distPath = resolve(cwd(), dist);
|
||||
const serverPath = resolve(
|
||||
cwd(),
|
||||
getArg('--server', 'd:/users/lucas/Desktop/dev/server/gitea')
|
||||
);
|
||||
|
||||
logger.info('Deploy started!');
|
||||
logger.info(`Service name: '${serviceName}'`);
|
||||
logger.info(`Src path: ${srcPath}`);
|
||||
logger.info(`Dist path: ${distPath}`);
|
||||
logger.info(`Server path: ${serverPath}`);
|
||||
|
||||
function exit(err) {
|
||||
err && logger.error(err);
|
||||
process.exit(err ? 1 : 0);
|
||||
}
|
||||
|
||||
async function executeDeployTask() {
|
||||
await deploy(srcPath, distPath, serverPath, serviceName);
|
||||
}
|
||||
|
||||
executeDeployTask().then(exit).catch(exit);
|
@ -1,19 +0,0 @@
|
||||
import { getArg } from './utils/funcs.js';
|
||||
import { restartService } from './tasks/restart-service.js';
|
||||
import { Logger } from './utils/logger.js';
|
||||
|
||||
const logger = new Logger('restart', 'info', 'brightMagenta');
|
||||
const serviceName = getArg('--service', 'gitea');
|
||||
|
||||
function exit(err) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
} else {
|
||||
console.log('');
|
||||
logger.info('Build completed successfully');
|
||||
}
|
||||
|
||||
process.exit(err ? 1 : 0);
|
||||
}
|
||||
|
||||
restartService(serviceName).then(exit).catch(exit);
|
@ -1,41 +0,0 @@
|
||||
import { watch } from 'chokidar';
|
||||
import { TaskDebouncer } from './utils/task-debouncer.js';
|
||||
import { Logger } from './utils/logger.js';
|
||||
import { getArg } from './utils/funcs.js';
|
||||
import { resolve } from 'path';
|
||||
import { cwd } from 'process';
|
||||
import { deploy } from './tasks/deploy.js';
|
||||
|
||||
const src = './src';
|
||||
const dist = './dist';
|
||||
const serviceName = getArg('--service', 'gitea');
|
||||
const srcPath = resolve(cwd(), src);
|
||||
const distPath = resolve(cwd(), dist);
|
||||
const serverPath = resolve(
|
||||
cwd(),
|
||||
getArg('--server', 'd:/users/lucas/Desktop/dev/server/gitea')
|
||||
);
|
||||
const debouncer = new TaskDebouncer(300);
|
||||
const logger = new Logger('serve', 'info', 'brightMagenta');
|
||||
|
||||
logger.info('Serve task started!');
|
||||
logger.info('Watching for changes...');
|
||||
logger.info(`Service name: '${serviceName}'`);
|
||||
logger.info(`Src path: ${srcPath}`);
|
||||
logger.info(`Dist path: ${distPath}`);
|
||||
logger.info(`Server path: ${serverPath}`);
|
||||
|
||||
const watcher = watch([`${src}/**/*`], {
|
||||
persistent: true,
|
||||
ignoreInitial: true,
|
||||
});
|
||||
|
||||
watcher.on('change', (file) => debouncer.add(
|
||||
deploy,
|
||||
srcPath,
|
||||
distPath,
|
||||
serverPath,
|
||||
serviceName,
|
||||
file,
|
||||
true
|
||||
));
|
@ -1,48 +0,0 @@
|
||||
import { Logger } from '../utils/logger.js';
|
||||
import { buildScss } from './scss.js';
|
||||
import { buildFonts } from './fonts.js';
|
||||
import { buildTemplates } from './templates.js';
|
||||
import { copyTo } from './copy-to.js';
|
||||
import { restartService } from './restart-service.js';
|
||||
import { extname } from 'path';
|
||||
import browsersync from 'browser-sync';
|
||||
import { optimizeCss } from './optimize-css.js';
|
||||
|
||||
const logger = new Logger('deploy', 'info', 'brightMagenta');
|
||||
|
||||
const sync = browsersync.create('lugit')
|
||||
|
||||
export async function deploy(srcPath, distPath, serverPath, serviceName, file = null, live = false) {
|
||||
logger.info('Deploying...');
|
||||
|
||||
if(live && !sync.active) {
|
||||
sync.init({
|
||||
proxy: 'http://lugit.local',
|
||||
port: 8080,
|
||||
})
|
||||
}
|
||||
|
||||
let shouldRestart = true;
|
||||
|
||||
// check if it's an scss
|
||||
if (file !== null && file !== undefined && extname(file) === '.scss') {
|
||||
shouldRestart = false;
|
||||
}
|
||||
|
||||
try {
|
||||
await buildScss(srcPath, distPath).then(() => optimizeCss(distPath));
|
||||
await buildFonts(srcPath, distPath);
|
||||
// await buildImg(srcPath, distPath);
|
||||
await buildTemplates(srcPath, distPath);
|
||||
await copyTo(distPath, serverPath);
|
||||
shouldRestart && await restartService(serviceName);
|
||||
|
||||
if(!shouldRestart && live) {
|
||||
sync.reload();
|
||||
}
|
||||
|
||||
logger.info('Deployment successful!');
|
||||
} catch (error) {
|
||||
logger.error(`Deployment failed: ${error}`);
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
import { exec } from 'child_process';
|
||||
|
||||
import { Logger } from '../utils/logger.js';
|
||||
const logger = new Logger(restartService.name, 'info', 'brightRed');
|
||||
|
||||
export async function restartService(serviceName) {
|
||||
return new Promise((resolve, reject) => {
|
||||
logger.info(`Restarting '${serviceName}' service...`);
|
||||
|
||||
let command;
|
||||
let args;
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
command = 'cmd.exe';
|
||||
args = ['/c', 'net', 'stop', serviceName, '&&', 'net', 'start', serviceName];
|
||||
} else {
|
||||
command = 'sudo';
|
||||
args = ['systemctl', 'restart', serviceName];
|
||||
}
|
||||
|
||||
exec(`${command} ${args.join(' ')}`, (error, stdout) => {
|
||||
if (error) {
|
||||
logger.error(`Failed to restart '${serviceName}' service: ${error}`);
|
||||
reject(error);
|
||||
} else {
|
||||
logger.info(`'${serviceName}' service restarted!`);
|
||||
resolve(stdout);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|