Skip to content

Commit

Permalink
Remove icons from fellow projects
Browse files Browse the repository at this point in the history
Fix tests

Fix tests

Fix tests

Fix tests

Fix tests
  • Loading branch information
akshaaatt committed Oct 5, 2023
1 parent fc0239b commit ce5011f
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 106 deletions.
5 changes: 2 additions & 3 deletions root/components/home/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/

import * as React from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
// eslint-disable-next-line import/no-unresolved
import {faCheckCircle} from '@fortawesome/free-solid-svg-icons';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import * as React from 'react';

const About = (): React.Element<'section'> => (
<section className="p-4">
Expand Down
4 changes: 2 additions & 2 deletions root/components/home/AppDownload.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/

import * as React from 'react';
import {faAndroid, faGooglePlay} from '@fortawesome/free-brands-svg-icons';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faGooglePlay, faAndroid} from '@fortawesome/free-brands-svg-icons';
import * as React from 'react';

const AppDownload = (): React.Element<'section'> => {
return (
Expand Down
6 changes: 3 additions & 3 deletions root/components/home/Facts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/

import * as React from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faMusic, faHeadphones, faCompactDisc, faUsers}
import {faCompactDisc, faHeadphones, faMusic, faUsers}
from '@fortawesome/free-solid-svg-icons';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import * as React from 'react';

const Facts = (): React.Element<'section'> => (
<section className="p-4">
Expand Down
4 changes: 2 additions & 2 deletions root/layout/components/BottomMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

import * as React from 'react';

import {CatalystContext} from '../../context';
import {VARTIST_GID} from '../../static/scripts/common/constants';
import {SanitizedCatalystContext} from '../../context.mjs';
import {VARTIST_GID} from '../../static/scripts/common/constants.js';

const AboutMenu = () => (
<li className="about" tabIndex="-1">
Expand Down
58 changes: 31 additions & 27 deletions root/layout/components/Footer.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
/*
* @flow strict-local
* @flow strict
* Copyright (C) 2022 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/

import * as React from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faChevronRight} from '@fortawesome/free-solid-svg-icons';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import * as React from 'react';

import {CatalystContext} from '../../context';
import {CatalystContext} from '../../context.mjs';
import logo from '../../static/images/meb-logos/musicbrainz.svg';
import {capitalize} from '../../static/scripts/common/utility/strings';
import {returnToCurrentPage} from '../../utility/returnUri';
import DBDefs from '../../static/scripts/common/DBDefs';
import DBDefs from '../../static/scripts/common/DBDefs.mjs';
import {capitalize} from '../../static/scripts/common/utility/strings.js';
import {returnToCurrentPage} from '../../utility/returnUri.js';

import type {LinkProps, LinkAndIconProps, LinkAndImgProps, Channel}
from './FooterData';
import {footerData} from './FooterData';
import type {Channel, LinkAndIconProps, LinkProps}
from './FooterData.js';
import {footerData} from './FooterData.js';


type LanguageMenuProps = {
Expand All @@ -32,7 +32,10 @@ type FooterChannelsElementProps = {
+$c: CatalystContextT,
};

function languageName(language, selected) {
const languageName = (
language: ?ServerLanguageT,
selected: boolean,
): string => {
if (!language) {
return '';
}
Expand All @@ -58,9 +61,12 @@ function languageName(language, selected) {
}

return text;
}
};

const LanguageLink = ({$c, language}) => (
const LanguageLink = ({
$c,
language,
}: { $c: CatalystContextT, language: ServerLanguageT }) => (
<a
className="dropdown-item"
href={
Expand Down Expand Up @@ -92,10 +98,16 @@ const LanguageMenu = ({
</button>
<ul aria-labelledby="language-dropdown" className="dropdown-menu">
{serverLanguages.map(function (language, index) {
let inner = <LanguageLink $c={$c} language={language} />;
let inner = null;

if (language.name === currentBCP47Language) {
inner = <strong>{inner}</strong>;
inner = (
<strong>
{<LanguageLink $c={$c} language={language} />}
</strong>
);
} else {
inner = <LanguageLink $c={$c} language={language} />;
}

return (
Expand Down Expand Up @@ -182,29 +194,21 @@ const UsefulLinksList = (): React.Element<'ul'> => {
};

const FellowProjectListElement = ({
img,
link,
}: LinkAndImgProps): React.Element<'li'> => {
href, text,
}: LinkProps): React.Element<'li'> => {
return (
<li>
<FontAwesomeIcon
className="me-3"
icon={faChevronRight}
size="sm"
/>
<img
alt={img.alt}
className="me-1"
height="24"
src={img.src}
width="24"
/>
<a
href={link.href}
href={href}
rel="noopener noreferrer"
target="_blank"
>
{l(link.text)}
{l(text)}
</a>
</li>
);
Expand Down
80 changes: 16 additions & 64 deletions root/layout/components/FooterData.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
/*
* @flow strict-local
* @flow strict
* Copyright (C) 2022 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/

import {faTwitter, faFacebook, faInstagram, faLinkedin}
from '@fortawesome/free-brands-svg-icons';
// eslint-disable-next-line import/no-unresolved
import type {IconLookup} from '@fortawesome/fontawesome-common-types';

import listenbrainzLogo from '../../static/images/meb-icons/ListenBrainz.svg';
import metabrainzLogo from '../../static/images/meb-icons/MetaBrainz.svg';
import critiquebrainzLogo
from '../../static/images/meb-icons/CritiqueBrainz.svg';
import picardLogo from '../../static/images/meb-icons/Picard.svg';
import bookbrainzLogo from '../../static/images/meb-icons/BookBrainz.svg';
import caaLogo from '../../static/images/meb-icons/CoverArtArchive.svg';
import {faFacebook, faInstagram, faLinkedin, faTwitter}
from '@fortawesome/free-brands-svg-icons';

export type LinkProps = {
href: string,
Expand All @@ -35,10 +27,6 @@ export type LinkAndIconProps = {
link: LinkProps,
};

export type LinkAndImgProps = {
img: ImgProps,
link: LinkProps,
};

export type Channel = {
href: string,
Expand All @@ -49,7 +37,7 @@ export type Channel = {

export type FooterData = {
channels: Channel[],
fellowProjects: LinkAndImgProps[],
fellowProjects: LinkProps[],
joinUsLinks: LinkProps[],
socialNetworks: LinkAndIconProps[],
usefulLinks: LinkProps[],
Expand Down Expand Up @@ -79,64 +67,28 @@ export const footerData: FooterData = {
],
fellowProjects: [
{
img: {
alt: 'ListenBrainz',
src: listenbrainzLogo,
},
link: {
href: 'https://listenbrainz.org/',
text: 'ListenBrainz',
},
href: 'https://listenbrainz.org/',
text: 'ListenBrainz',
},
{
img: {
alt: 'CritiqueBrainz',
src: critiquebrainzLogo,
},
link: {
href: 'https://critiquebrainz.org/',
text: 'CritiqueBrainz',
},
href: 'https://critiquebrainz.org/',
text: 'CritiqueBrainz',
},
{
img: {
alt: 'Picard',
src: picardLogo,
},
link: {
href: 'https://picard.musicbrainz.org/',
text: 'Picard',
},
href: 'https://picard.musicbrainz.org/',
text: 'Picard',
},
{
img: {
alt: 'BookBrainz',
src: bookbrainzLogo,
},
link: {
href: 'https://bookbrainz.org/',
text: 'BookBrainz',
},
href: 'https://bookbrainz.org/',
text: 'BookBrainz',
},
{
img: {
alt: 'CoverArtArchive',
src: caaLogo,
},
link: {
href: 'https://coverartarchive.org',
text: 'Cover Art Archive',
},
href: 'https://coverartarchive.org',
text: 'Cover Art Archive',
},
{
img: {
alt: 'MetaBrainz',
src: metabrainzLogo,
},
link: {
href: 'https://metabrainz.org/',
text: 'MetaBrainz',
},
href: 'https://metabrainz.org/',
text: 'MetaBrainz',
},
],
joinUsLinks: [
Expand Down
9 changes: 4 additions & 5 deletions root/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
import he from 'he';

import {ArtworkImage} from '../components/Artwork.js';
import About from '../components/home/About.js';
import AppDownload from '../components/home/AppDownload.js';
import Explore from '../components/home/Explore.js';
import Facts from '../components/home/Facts.js';
import Layout from '../layout/index.js';
import {CONTACT_URL} from '../static/scripts/common/constants.js';
import {reduceArtistCredit}
from '../static/scripts/common/immutable-entities.js';
import entityHref from '../static/scripts/common/utility/entityHref.js';
import AppDownload from '../components/home/AppDownload';
import About from '../components/home/About';
import Facts from '../components/home/Facts';
import Explore from '../components/home/Explore';

type BlogEntryT = {
+title: string,
Expand Down

0 comments on commit ce5011f

Please sign in to comment.