]> Untitled Git - lemmy-ui.git/commitdiff
Adding the support / donate page to the navbar. Fixes #86
authorDessalines <tyhou13@gmx.com>
Tue, 1 Dec 2020 15:27:27 +0000 (09:27 -0600)
committerDessalines <tyhou13@gmx.com>
Tue, 1 Dec 2020 15:27:27 +0000 (09:27 -0600)
src/shared/components/navbar.tsx
src/shared/components/symbols.tsx
src/shared/utils.ts

index 795368f76a822548554183a9b251b96c575fd548..0eed4f42ac69dca27f365b26ccfab5a6bd18d324 100644 (file)
@@ -29,6 +29,7 @@ import {
   notifyPrivateMessage,
   isBrowser,
   wsSubscribe,
+  supportLemmyUrl,
 } from '../utils';
 import { i18n } from '../i18next';
 import { PictrsImage } from './pictrs-image';
@@ -239,6 +240,17 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
                   {i18n.t('create_community')}
                 </Link>
               </li>
+              <li class="nav-item">
+                <a
+                  className="nav-link"
+                  title={i18n.t('support_lemmy')}
+                  href={supportLemmyUrl}
+                >
+                  <svg class="icon small">
+                    <use xlinkHref="#icon-beer"></use>
+                  </svg>
+                </a>
+              </li>
             </ul>
             <ul class="navbar-nav my-2">
               {this.canAdmin && (
index a85ed708b10135ba0ff029bd0f6ddc4e28709fd8..105e33fda8c478384977de95af78c015952edb96 100644 (file)
@@ -20,6 +20,9 @@ export class Symbols extends Component<any, any> {
         xmlnsXlink="http://www.w3.org/1999/xlink"
       >
         <defs>
+          <symbol id="icon-beer" viewBox="0 0 27 28">
+            <path d="M10 14v-6h-4v4c0 1.109 0.891 2 2 2h2zM26 21v3h-18v-3l2-3h-2c-3.313 0-6-2.688-6-6v-5l-1-1 0.5-2h7.5l0.5-2h15l0.5 3-1 0.5v12.5z"></path>
+          </symbol>
           <symbol id="icon-x" viewBox="0 0 24 24">
             <path d="M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z"></path>
           </symbol>
index 4053ad21b528462235b7cb4769f9917d820dcfd9..5a852bab0ad5b2838f4fda2da61e94d0f870612b 100644 (file)
@@ -71,6 +71,7 @@ export const favIconPngUrl = '/static/assets/apple-touch-icon.png';
 export const defaultFavIcon = 'test';
 export const repoUrl = 'https://github.com/LemmyNet';
 export const joinLemmyUrl = 'https://join.lemmy.ml';
+export const supportLemmyUrl = 'https://join.lemmy.ml/sponsors';
 export const helpGuideUrl = '/docs/about_guide.html';
 export const markdownHelpUrl = `${helpGuideUrl}#markdown-guide`;
 export const sortingHelpUrl = `${helpGuideUrl}#sorting`;