]> Untitled Git - lemmy-ui.git/commitdiff
Removing landing and donations page, adding joinlemmy. Fixes #63
authorDessalines <tyhou13@gmx.com>
Sat, 24 Oct 2020 15:48:27 +0000 (10:48 -0500)
committerDessalines <tyhou13@gmx.com>
Sat, 24 Oct 2020 15:48:27 +0000 (10:48 -0500)
lemmy-translations
src/shared/components/footer.tsx
src/shared/components/main.tsx
src/shared/components/navbar.tsx
src/shared/components/post.tsx
src/shared/components/sponsors.tsx [deleted file]
src/shared/routes.ts
src/shared/utils.ts

index 7dc391601135a52cddd3112ca75b505b99cec4fc..2a492580d773e50061bb3a2c9562dde1173c8941 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7dc391601135a52cddd3112ca75b505b99cec4fc
+Subproject commit 2a492580d773e50061bb3a2c9562dde1173c8941
index 41369a5147f74a9fdf568ad08e8203db327fa23a..5d132ee6b673e3d6d1d229ca4f8397130086c51a 100644 (file)
@@ -1,7 +1,7 @@
 import { Component } from 'inferno';
 import { Link } from 'inferno-router';
 import { i18n } from '../i18next';
-import { repoUrl } from '../utils';
+import { repoUrl, joinLemmyUrl } from '../utils';
 import { GetSiteResponse } from 'lemmy-js-client';
 
 interface FooterProps {
@@ -38,16 +38,16 @@ export class Footer extends Component<FooterProps, FooterState> {
                 {i18n.t('docs')}
               </a>
             </li>
-            <li class="nav-item">
-              <Link className="nav-link" to="/sponsors">
-                {i18n.t('donate')}
-              </Link>
-            </li>
             <li class="nav-item">
               <a className="nav-link" href={repoUrl}>
                 {i18n.t('code')}
               </a>
             </li>
+            <li class="nav-item">
+              <a className="nav-link" href={joinLemmyUrl}>
+                {i18n.t('join_lemmy')}
+              </a>
+            </li>
           </ul>
         </div>
       </nav>
index 149f9790874be2dabc87379ab12f3a5e1a4b0f2b..689a4d9f19522725d00430bb1e599e8bf5857012 100644 (file)
@@ -37,7 +37,6 @@ import { CommunityLink } from './community-link';
 import { BannerIconHeader } from './banner-icon-header';
 import {
   wsJsonToRes,
-  repoUrl,
   mdToHtml,
   fetchLimit,
   toast,
@@ -291,10 +290,6 @@ export class Main extends Component<any, MainState> {
             <div class="card border-secondary mb-3">
               <div class="card-body">{this.sidebar()}</div>
             </div>
-
-            <div class="card border-secondary">
-              <div class="card-body">{this.landing()}</div>
-            </div>
           </div>
         )}
       </div>
@@ -493,46 +488,6 @@ export class Main extends Component<any, MainState> {
     );
   }
 
-  landing() {
-    return (
-      <>
-        <h5>
-          {i18n.t('powered_by')}
-          <svg class="icon mx-2">
-            <use xlinkHref="#icon-mouse">#</use>
-          </svg>
-          <a href={repoUrl}>
-            Lemmy<sup>beta</sup>
-          </a>
-        </h5>
-        <p class="mb-0">
-          <T i18nKey="landing_0">
-            #
-            <a href="https://en.wikipedia.org/wiki/Social_network_aggregation">
-              #
-            </a>
-            <a href="https://en.wikipedia.org/wiki/Fediverse">#</a>
-            <br class="big"></br>
-            <code>#</code>
-            <br></br>
-            <b>#</b>
-            <br class="big"></br>
-            <a href={repoUrl}>#</a>
-            <br class="big"></br>
-            <a href="https://www.rust-lang.org">#</a>
-            <a href="https://actix.rs/">#</a>
-            <a href="https://infernojs.org">#</a>
-            <a href="https://www.typescriptlang.org/">#</a>
-            <br class="big"></br>
-            <a href="https://github.com/LemmyNet/lemmy/graphs/contributors?type=a">
-              #
-            </a>
-          </T>
-        </p>
-      </>
-    );
-  }
-
   posts() {
     return (
       <div class="main-content-wrapper">
index 04dae46012451d28863744694993f9d91589888f..63bc230c5a4c2e40ef3e519b66df6d284e722920 100644 (file)
@@ -254,17 +254,6 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
                   {i18n.t('create_community')}
                 </Link>
               </li>
-              <li className="nav-item">
-                <Link
-                  className="nav-link"
-                  to="/sponsors"
-                  title={i18n.t('donate_to_lemmy')}
-                >
-                  <svg class="icon">
-                    <use xlinkHref="#icon-coffee"></use>
-                  </svg>
-                </Link>
-              </li>
             </ul>
             <ul class="navbar-nav my-2">
               {this.canAdmin && (
index 201085843be899b69b7aad71896fcb5ae9266df3..c963690254740f9512d9b575beaa75699fc97059 100644 (file)
@@ -155,7 +155,6 @@ export class Post extends Component<any, PostState> {
 
       // let currentId = this.props.match.params.id;
       // WebSocketService.Instance.getPost(currentId);
-      // this.context.router.history.push('/sponsors');
       // this.context.refresh();
       // this.context.router.history.push(_lastProps.location.pathname);
     }
diff --git a/src/shared/components/sponsors.tsx b/src/shared/components/sponsors.tsx
deleted file mode 100644 (file)
index 0e7156c..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-import { Component } from 'inferno';
-import { Site } from 'lemmy-js-client';
-import { i18n } from '../i18next';
-import { T } from 'inferno-i18next';
-import { repoUrl, isBrowser } from '../utils';
-import { IsoData } from 'shared/interfaces';
-import { HtmlTags } from './html-tags';
-
-interface SilverUser {
-  name: string;
-  link?: string;
-}
-
-let general = [
-  'Brendan',
-  'mexicanhalloween',
-  'William Moore',
-  'Rachel Schmitz',
-  'comradeda',
-  'ybaumy',
-  'dude in phx',
-  'twilight loki',
-  'Andrew Plaza',
-  'Jonathan Cremin',
-  'Arthur Nieuwland',
-  'Ernest Wiśniewski',
-  'HN',
-  'Forrest Weghorst',
-  'Andre Vallestero',
-  'NotTooHighToHack',
-];
-let highlighted = ['DQW', 'DiscountFuneral', 'Oskenso Kashi', 'Alex Benishek'];
-let silver: SilverUser[] = [
-  {
-    name: 'Redjoker',
-    link: 'https://iww.org',
-  },
-];
-// let gold = [];
-// let latinum = [];
-
-interface SponsorsState {
-  site: Site;
-}
-
-export class Sponsors extends Component<any, SponsorsState> {
-  private emptyState: SponsorsState = {
-    site: undefined,
-  };
-  constructor(props: any, context: any) {
-    super(props, context);
-    this.state = this.emptyState;
-
-    let isoData: IsoData;
-    if (isBrowser()) {
-      isoData = window.isoData;
-    } else {
-      isoData = this.context.router.staticContext;
-    }
-
-    this.state.site = isoData.site.site;
-  }
-
-  componentDidMount() {
-    if (isBrowser()) {
-      window.scrollTo(0, 0);
-    }
-  }
-
-  get documentTitle(): string {
-    return `${i18n.t('sponsors')} - ${this.state.site.name}`;
-  }
-
-  render() {
-    return (
-      <div class="container text-center">
-        <HtmlTags
-          title={this.documentTitle}
-          path={this.context.router.route.match.url}
-        />
-        {this.topMessage()}
-        <hr />
-        {this.sponsors()}
-        <hr />
-        {this.bitcoin()}
-      </div>
-    );
-  }
-
-  topMessage() {
-    return (
-      <div>
-        <h5>{i18n.t('donate_to_lemmy')}</h5>
-        <p>
-          <T i18nKey="sponsor_message">
-            #<a href={repoUrl}>#</a>
-          </T>
-        </p>
-        <a class="btn btn-secondary" href="https://liberapay.com/Lemmy/">
-          {i18n.t('support_on_liberapay')}
-        </a>
-        <a
-          class="btn btn-secondary ml-2"
-          href="https://www.patreon.com/dessalines"
-        >
-          {i18n.t('support_on_patreon')}
-        </a>
-        <a
-          class="btn btn-secondary ml-2"
-          href="https://opencollective.com/lemmy"
-        >
-          {i18n.t('support_on_open_collective')}
-        </a>
-      </div>
-    );
-  }
-  sponsors() {
-    return (
-      <div class="container">
-        <h5>{i18n.t('sponsors')}</h5>
-        <p>{i18n.t('silver_sponsors')}</p>
-        <div class="row justify-content-md-center card-columns">
-          {silver.map(s => (
-            <div class="card col-12 col-md-2">
-              <div>
-                {s.link ? (
-                  <a href={s.link} target="_blank" rel="noopener">
-                    💎 {s.name}
-                  </a>
-                ) : (
-                  <div>💎 {s.name}</div>
-                )}
-              </div>
-            </div>
-          ))}
-        </div>
-        <p>{i18n.t('general_sponsors')}</p>
-        <div class="row justify-content-md-center card-columns">
-          {highlighted.map(s => (
-            <div class="card bg-primary col-12 col-md-2 font-weight-bold">
-              <div>{s}</div>
-            </div>
-          ))}
-          {general.map(s => (
-            <div class="card col-12 col-md-2">
-              <div>{s}</div>
-            </div>
-          ))}
-        </div>
-      </div>
-    );
-  }
-
-  bitcoin() {
-    return (
-      <div>
-        <h5>{i18n.t('crypto')}</h5>
-        <div class="table-responsive">
-          <table class="table table-hover text-center">
-            <tbody>
-              <tr>
-                <td>{i18n.t('bitcoin')}</td>
-                <td>
-                  <code>1Hefs7miXS5ff5Ck5xvmjKjXf5242KzRtK</code>
-                </td>
-              </tr>
-              <tr>
-                <td>{i18n.t('ethereum')}</td>
-                <td>
-                  <code>0x400c96c96acbC6E7B3B43B1dc1BB446540a88A01</code>
-                </td>
-              </tr>
-              <tr>
-                <td>{i18n.t('monero')}</td>
-                <td>
-                  <code>
-                    41taVyY6e1xApqKyMVDRVxJ76sPkfZhALLTjRvVKpaAh2pBd4wv9RgYj1tSPrx8wc6iE1uWUfjtQdTmTy2FGMeChGVKPQuV
-                  </code>
-                </td>
-              </tr>
-            </tbody>
-          </table>
-        </div>
-      </div>
-    );
-  }
-}
index 4178fa1243abd53dad05772411d1f8cc478af97f..1e45561b7fa86e918e6f442950c5c0d51516abdd 100644 (file)
@@ -14,7 +14,6 @@ import { Setup } from './components/setup';
 import { AdminSettings } from './components/admin-settings';
 import { Inbox } from './components/inbox';
 import { Search } from './components/search';
-import { Sponsors } from './components/sponsors';
 import { Instances } from './components/instances';
 
 interface IRoutePropsWithFetch extends IRouteProps {
@@ -136,7 +135,6 @@ export const routes: IRoutePropsWithFetch[] = [
     component: Search,
     fetchInitialData: (auth, path) => Search.fetchInitialData(auth, path),
   },
-  { path: `/sponsors`, component: Sponsors },
   {
     path: `/password_change/:token`,
     component: PasswordChange,
index 9bc9b230a4219fe664a07e2c5738159e28d8427b..33ba140b2bcf0e65ab871f1e41e95a907b14b726 100644 (file)
@@ -73,6 +73,7 @@ export const favIconPngUrl = '/static/assets/apple-touch-icon.png';
 // export const defaultFavIcon = `${window.location.protocol}//${window.location.host}${favIconPngUrl}`;
 export const defaultFavIcon = 'test';
 export const repoUrl = 'https://github.com/LemmyNet';
+export const joinLemmyUrl = 'https://join.lemmy.ml';
 export const helpGuideUrl = '/docs/about_guide.html';
 export const markdownHelpUrl = `${helpGuideUrl}#markdown-guide`;
 export const sortingHelpUrl = `${helpGuideUrl}#sorting`;