feat: inject mermaid.js and Inter font into Docker image, add CultBR logo

pull/7973/head
Gabriel Mowses (Mouse) 2 weeks ago
parent 4bdf13a29f
commit a8a7feff48

@ -25,6 +25,12 @@ COPY --chown=node:node ./server ./server
COPY --chown=node:node ./dev/build/config.yml ./config.yml
COPY --chown=node:node ./LICENSE ./LICENSE
# Inject mermaid.js and Inter font into index.html
RUN sed -i 's|</head>|<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700\&display=swap" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"></script><script>document.addEventListener("DOMContentLoaded",function(){mermaid.initialize({startOnLoad:false,theme:"default"});new MutationObserver(function(){document.querySelectorAll(".codeblock-mermaid:not([data-processed])").forEach(function(el){el.setAttribute("data-processed","1");var code=el.querySelector("code");if(code){var d=document.createElement("div");d.className="mermaid";d.textContent=code.textContent;el.replaceWith(d)}});try{mermaid.run({querySelector:".mermaid:not([data-id])"})}catch(e){}}).observe(document.body,{childList:true,subtree:true})});</script></head>|' ./assets/index.html
# Replace Wiki.js branding
RUN sed -i 's/Wiki\.js/CultBR Wiki/g' ./assets/index.html
USER node
ENV NODE_ENV=production

@ -0,0 +1,7 @@
<svg width="204" height="51" viewBox="0 0 204 51" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M180.959 13.4894L184.687 43.9964C184.934 46.0329 187.591 46.6597 188.72 44.9426L203.633 22.3473C204.393 21.1965 203.924 19.6373 202.655 19.0995L184.013 11.1914C182.446 10.5279 180.751 11.8045 180.959 13.4894Z" fill="#FFCF00"/>
<path d="M173.449 28.4739C173.449 33.5783 177.585 37.719 182.691 37.719C183.085 37.719 183.473 37.6943 183.853 37.6438L181.611 19.293C177.016 19.8308 173.449 23.7348 173.449 28.4739Z" fill="#4CAC33"/>
<path d="M191.938 28.4729C191.938 23.3676 187.797 19.2314 182.693 19.2314C182.327 19.2314 181.968 19.2525 181.613 19.292L183.854 37.6428C188.414 37.0729 191.938 33.1873 191.938 28.4729Z" fill="#32529F"/>
<path d="M18.769 10.8194C21.8973 10.8194 24.6565 11.5093 27.0468 12.8889C29.4532 14.2685 31.2339 16.1214 32.3889 18.4475L27.1431 22.057C26.5816 20.8057 25.8036 19.779 24.8089 18.9769C23.8143 18.1588 22.8037 17.5973 21.777 17.2925C20.7663 16.9877 19.6995 16.8353 18.5765 16.8353C16.9402 16.8353 15.4563 17.1802 14.1248 17.87C12.8093 18.5438 11.7425 19.4422 10.9244 20.5651C10.1223 21.6881 9.50466 22.9313 9.07152 24.2949C8.63838 25.6425 8.42181 27.0301 8.42181 28.4579C8.42181 30.5273 8.84694 32.4604 9.69718 34.2572C10.5474 36.0539 11.7666 37.5057 13.3548 38.6126C14.943 39.7196 16.7156 40.273 18.6728 40.273C19.7957 40.273 20.8946 40.1046 21.9695 39.7677C23.0443 39.4148 24.071 38.8292 25.0496 38.0111C26.0442 37.1769 26.7982 36.1582 27.3115 34.955L32.8702 38.1554C32.1804 39.8238 31.0414 41.2917 29.4532 42.559C27.881 43.8103 26.1404 44.7488 24.2314 45.3745C22.3384 45.9841 20.4214 46.2889 18.4803 46.2889C16.5392 46.2889 14.6783 45.952 12.8976 45.2782C11.1169 44.6044 9.54478 43.682 8.18118 42.5109C6.83363 41.3238 5.64651 39.9762 4.61981 38.4683C3.60915 36.9442 2.83912 35.3079 2.30972 33.5593C1.78033 31.7947 1.51562 30.03 1.51562 28.2654C1.51562 26.1157 1.90867 24.0062 2.69474 21.9367C3.49685 19.8673 4.61178 18.0064 6.03955 16.354C7.46731 14.7017 9.28809 13.3702 11.5019 12.3595C13.7157 11.3328 16.1381 10.8194 18.769 10.8194ZM36.5519 36.3507V20.1801H43.1452V34.9069C43.1452 38.8854 44.573 40.8746 47.4285 40.8746C48.76 40.8746 50.0193 40.4735 51.2065 39.6714C52.3936 38.8693 53.3561 37.7063 54.0941 36.1822V20.1801H60.6874V38.6126C60.6874 39.3185 60.8078 39.8238 61.0484 40.1286C61.289 40.4174 61.6981 40.5858 62.2756 40.634V46.0001C61.2168 46.1926 60.2623 46.2889 59.4121 46.2889C58.225 46.2889 57.2544 46.0242 56.5004 45.4948C55.7625 44.9493 55.3373 44.1953 55.2251 43.2328L55.0807 41.1634C53.9417 42.912 52.4738 44.2355 50.6771 45.1338C48.8803 46.0322 46.8831 46.4814 44.6853 46.4814C42.0223 46.4814 40.001 45.6231 38.6213 43.9066C37.2417 42.1901 36.5519 39.6714 36.5519 36.3507ZM67.2086 10.0254H73.802V37.7223C73.802 38.8613 73.9865 39.6474 74.3554 40.0805C74.7244 40.5137 75.2779 40.7302 76.0158 40.7302C77.0746 40.7302 78.1093 40.4976 79.12 40.0324L80.0103 45.0616C79.144 45.4627 78.1254 45.7835 76.9543 46.0242C75.7832 46.2648 74.7003 46.3851 73.7057 46.3851C71.6523 46.3851 70.0561 45.8317 68.9171 44.7247C67.7781 43.6178 67.2086 42.0537 67.2086 40.0324V10.0254ZM98.0819 44.6766C95.451 45.8477 93.0206 46.4332 90.7907 46.4332C89.8442 46.4332 88.9779 46.3129 88.1919 46.0723C87.4058 45.8317 86.7 45.4707 86.0743 44.9894C85.4487 44.4921 84.9594 43.8264 84.6064 42.9922C84.2535 42.158 84.077 41.1874 84.077 40.0805V25.2575H80.6841V20.1801H84.077V11.806H90.6945V20.1801H96.1087V25.2575H90.6945V37.8667C90.7426 39.5511 91.5608 40.3933 93.1489 40.3933C94.0794 40.3933 95.2826 40.0805 96.7584 39.4549L98.0819 44.6766Z" fill="black"/>
<path d="M100.564 46.1766V12.5511H120.318C127.001 12.5511 131.709 16.376 131.709 21.7981C131.709 25.4549 129.103 28.3131 125.32 28.9015C129.565 29.532 132.508 32.5162 132.508 36.3411C132.508 42.0995 127.296 46.1766 119.898 46.1766H100.564ZM106.448 40.5863H119.898C123.807 40.5863 126.581 38.821 126.581 36.3411C126.581 33.6511 123.975 31.7597 120.318 31.7597H106.448V40.5863ZM106.448 26.1694H119.52C123.177 26.1694 125.783 24.3621 125.783 21.7981C125.783 19.6545 123.345 18.1414 119.94 18.1414H106.448V26.1694ZM139.64 46.1766V14.3585L142.036 13.8541C142.12 13.8121 142.204 13.8121 142.288 13.7701C143.969 13.3918 147.878 12.4671 152.165 12.1729C154.687 12.0468 156.957 12.1308 158.933 12.4671C161.496 12.9294 163.682 13.8121 165.321 15.1151C166.582 16.1238 167.549 17.3428 168.222 18.8139C168.894 20.285 169.23 22.0083 169.23 23.8997C169.23 25.9172 168.432 27.9768 166.834 29.9943C166.204 30.835 165.405 31.6336 164.523 32.4322C166.877 36.7614 167.549 41.427 168.095 46.1766H162.421C162.127 43.7807 161.833 41.7632 161.202 39.4935C160.824 38.1065 160.362 36.8455 159.773 35.6686C158.344 36.4672 156.789 37.1397 155.276 37.6441C152.922 38.4427 150.61 38.9051 148.635 38.9051C147.5 38.9051 146.449 38.779 145.524 38.5268V46.1766H139.64ZM145.524 31.2553C145.65 32.18 145.987 32.4742 146.155 32.6003C146.617 32.9786 147.5 33.1887 148.635 33.1887C150.778 33.1887 153.51 32.4322 156.116 31.1292C155.192 30.4567 154.057 29.8682 152.838 29.4059C150.568 28.5652 148.256 28.3131 146.785 28.7334C146.113 28.9856 145.65 29.2798 145.524 30.1625V31.2553ZM145.524 23.1852C146.449 22.933 147.416 22.8069 148.467 22.8069C148.971 22.8069 149.433 22.8489 149.938 22.891C151.535 23.0591 153.216 23.4374 154.813 24.0678C157.251 24.9505 159.437 26.2955 161.076 27.8087C161.581 27.3463 162.001 26.926 162.379 26.4637C163.136 25.4969 163.556 24.6143 163.556 23.8997C163.556 22.6388 163.346 20.8314 161.791 19.5704C160.025 18.2254 156.831 17.595 152.544 17.8892C149.896 18.0573 147.332 18.5196 145.524 18.8979V23.1852Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB

Loading…
Cancel
Save