From e36dfa0b9f3b38ecbf670262276d347b9ba7cf93 Mon Sep 17 00:00:00 2001 From: pascaloliv Date: Tue, 22 Nov 2022 17:10:51 +0100 Subject: [PATCH 1/3] QMAPS-2828 - Add back to qwant on poi + change i18n + add logo qwant blue --- language/message/de.po | 2 +- language/message/en.po | 2 +- language/message/es.po | 2 +- language/message/fr.po | 2 +- language/message/it.po | 2 +- public/images/qwant-search-logo.svg | 6 ++++++ src/components/BackToQwantButton.jsx | 2 ++ src/components/ui/icons.ts | 1 + src/libs/url_utils.js | 2 +- src/scss/includes/components/backToQwantButton.scss | 9 +++++++++ 10 files changed, 24 insertions(+), 6 deletions(-) create mode 100644 public/images/qwant-search-logo.svg diff --git a/language/message/de.po b/language/message/de.po index a413754b3..2723d6a81 100644 --- a/language/message/de.po +++ b/language/message/de.po @@ -1042,7 +1042,7 @@ msgid "Your position" msgstr "Ihr Standort" msgid "Back to Qwant.com" -msgstr "Zurück zu Qwant.com" +msgstr "Search" msgid "Qwant Maps uses OpenStreetMap data." msgstr "Qwant Maps verwendet OpenStreetMap-Daten." diff --git a/language/message/en.po b/language/message/en.po index 9ac428c1f..b7dd27c9a 100644 --- a/language/message/en.po +++ b/language/message/en.po @@ -1031,7 +1031,7 @@ msgid "Your position" msgstr "" msgid "Back to Qwant.com" -msgstr "" +msgstr "Search" msgid "Qwant Maps uses OpenStreetMap data." msgstr "" diff --git a/language/message/es.po b/language/message/es.po index 9abe0ab3f..c59b5fe6c 100644 --- a/language/message/es.po +++ b/language/message/es.po @@ -1040,7 +1040,7 @@ msgid "Your position" msgstr "Tu localización" msgid "Back to Qwant.com" -msgstr "Volver a Qwant.com" +msgstr "Search" msgid "Qwant Maps uses OpenStreetMap data." msgstr "Qwant Maps usa datos de OpenStreetMaps." diff --git a/language/message/fr.po b/language/message/fr.po index 2d0f78dbc..4552121a7 100644 --- a/language/message/fr.po +++ b/language/message/fr.po @@ -1035,7 +1035,7 @@ msgid "Your position" msgstr "Votre position" msgid "Back to Qwant.com" -msgstr "Retour à Qwant.com" +msgstr "Search" msgid "Qwant Maps uses OpenStreetMap data." msgstr "Qwant Maps utilise les données OpenStreetMap." diff --git a/language/message/it.po b/language/message/it.po index 99418893c..f2293c563 100644 --- a/language/message/it.po +++ b/language/message/it.po @@ -1043,7 +1043,7 @@ msgid "Your position" msgstr "La tua posizione" msgid "Back to Qwant.com" -msgstr "Torna su Qwant.com" +msgstr "Search" msgid "Qwant Maps uses OpenStreetMap data." msgstr "Qwant Maps usa i dati di OpenStreetMap." diff --git a/public/images/qwant-search-logo.svg b/public/images/qwant-search-logo.svg new file mode 100644 index 000000000..d403ed217 --- /dev/null +++ b/public/images/qwant-search-logo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/components/BackToQwantButton.jsx b/src/components/BackToQwantButton.jsx index 620339aaf..cd6c72a6d 100644 --- a/src/components/BackToQwantButton.jsx +++ b/src/components/BackToQwantButton.jsx @@ -1,5 +1,6 @@ import React, { useEffect } from 'react'; import { Button, IconArrowLeftLine } from '@qwant/qwant-ponents'; +import { QwantLogoBlue } from 'src/components/ui/icons'; import { useI18n } from 'src/hooks'; const hiddenAttributeClassName = 'map_control__scale_attribute_container--hidden'; @@ -24,6 +25,7 @@ export const BackToQwantButton = ({ isMobile }) => { onClick={() => window.history.back()} > + {_('Back to Qwant.com')} ); diff --git a/src/components/ui/icons.ts b/src/components/ui/icons.ts index fb63af276..94eb4ea3a 100644 --- a/src/components/ui/icons.ts +++ b/src/components/ui/icons.ts @@ -33,3 +33,4 @@ export { ReactComponent as IconDirectionsArrow } from '../../../public/images/di export { ReactComponent as IconAndroid } from '../../../public/images/mobile/android.svg'; export { ReactComponent as IconApple } from '../../../public/images/mobile/i-os.svg'; +export { ReactComponent as QwantLogoBlue } from '../../../public/images/qwant-search-logo.svg'; diff --git a/src/libs/url_utils.js b/src/libs/url_utils.js index 352e37f19..9c1f268db 100644 --- a/src/libs/url_utils.js +++ b/src/libs/url_utils.js @@ -76,7 +76,7 @@ export function updateQueryString(queriesObject) { export function shouldShowBackToQwant() { const params = parseQueryString(window.location.search); - return params.client && params.client === 'search-ia-maps-multi'; + return params?.client === 'search-ia-maps-multi' || params?.client === 'search-ia-maps-single'; } const getDrawerUrl = drawer => getAppRelativePathname() + updateQueryString({ drawer }); diff --git a/src/scss/includes/components/backToQwantButton.scss b/src/scss/includes/components/backToQwantButton.scss index 4c8e49385..52016e83f 100644 --- a/src/scss/includes/components/backToQwantButton.scss +++ b/src/scss/includes/components/backToQwantButton.scss @@ -1,4 +1,13 @@ .backToQwantButton { + border-radius: 18px !important; + padding: var(--spacing-xxs) var(--spacing-s) !important; + + .qwant-logo { + width: 24px !important; + height: 24px !important; + margin: 0 var(--spacing-xs) 0 0; + } + @media (max-width: 640px) { background-color: white !important; box-shadow: 0 1px 4px 0 rgba(12, 12, 14, 0.2), 0 0 2px 0 rgba(12, 12, 14, 0.12); From aee98340005b7b892f0f89f4f1d5924143f71e94 Mon Sep 17 00:00:00 2001 From: pascaloliv Date: Tue, 22 Nov 2022 17:10:59 +0100 Subject: [PATCH 2/3] QMAPS-3063 - Add Go to Qwant on desktop in header menu --- src/components/TopBar/TopBar.jsx | 18 +++++++++++++++++- src/scss/includes/menu.scss | 12 ++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/components/TopBar/TopBar.jsx b/src/components/TopBar/TopBar.jsx index 4b3b3f970..bbe005844 100644 --- a/src/components/TopBar/TopBar.jsx +++ b/src/components/TopBar/TopBar.jsx @@ -2,8 +2,14 @@ import React, { useEffect, useState, useRef } from 'react'; import cx from 'classnames'; import Telemetry from 'src/libs/telemetry'; import { Suggest } from 'src/components/ui'; -import { IconArrowBackward, IconCloseCircled, IconDirectionsArrow } from 'src/components/ui/icons'; +import { + IconArrowBackward, + IconCloseCircled, + IconDirectionsArrow, + QwantLogoBlue, +} from 'src/components/ui/icons'; import { IconClose, Flex, IconMenu, IconApps } from '@qwant/qwant-ponents'; + import { useConfig, useDevice, useI18n } from 'src/hooks'; import { handleFocus } from 'src/libs/input'; import { selectItem, fetchSuggests } from 'src/libs/suggest'; @@ -203,6 +209,16 @@ const TopBar = ({ value, setUserInputValue, inputRef, onSuggestToggle, backButto {_('Products', 'menu')} )} + {!isMobile && ( + + + {_('Back to Qwant.com')} + + )} {config.direction.enabled && ( diff --git a/src/scss/includes/menu.scss b/src/scss/includes/menu.scss index 9d3064283..4facfd7e3 100644 --- a/src/scss/includes/menu.scss +++ b/src/scss/includes/menu.scss @@ -160,7 +160,7 @@ $productDrawerWidth: 744px; &-appButton { &:not(:first-child) { margin-left: 8px; - } + } } } @@ -171,7 +171,6 @@ $productDrawerWidth: 744px; text-align: center; margin-bottom: $spacing-s; padding: $spacing-xxl-3 $spacing-l; - } @media (max-width: 640px) { @@ -228,6 +227,7 @@ $productDrawerWidth: 744px; padding: $spacing-s; border-radius: 8px; box-shadow: $shadow; + text-decoration: none !important; &:hover { color: $grey-black; @@ -243,6 +243,14 @@ $productDrawerWidth: 744px; &--noShadow { box-shadow: none; } + + &--icon { + padding: var(--spacing-xs); + + svg { + margin-right: var(--spacing-xxs); + } + } } .menu-top { From 79adf2957d4bef712c01598f94650784cdfee966 Mon Sep 17 00:00:00 2001 From: pascaloliv Date: Tue, 22 Nov 2022 17:16:08 +0100 Subject: [PATCH 3/3] QMAPS-3063 - Remove products wording on topbar --- src/components/TopBar/TopBar.jsx | 3 +-- src/scss/includes/components/backToQwantButton.scss | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/TopBar/TopBar.jsx b/src/components/TopBar/TopBar.jsx index bbe005844..07fd069f1 100644 --- a/src/components/TopBar/TopBar.jsx +++ b/src/components/TopBar/TopBar.jsx @@ -205,8 +205,7 @@ const TopBar = ({ value, setUserInputValue, inputRef, onSuggestToggle, backButto })} onClick={() => setProductsDrawerOpen(!isProductsDrawerOpen)} > - - {_('Products', 'menu')} + )} {!isMobile && ( diff --git a/src/scss/includes/components/backToQwantButton.scss b/src/scss/includes/components/backToQwantButton.scss index 52016e83f..df5884064 100644 --- a/src/scss/includes/components/backToQwantButton.scss +++ b/src/scss/includes/components/backToQwantButton.scss @@ -1,10 +1,10 @@ .backToQwantButton { - border-radius: 18px !important; + border-radius: 18px; padding: var(--spacing-xxs) var(--spacing-s) !important; .qwant-logo { - width: 24px !important; - height: 24px !important; + width: 24px; + height: 24px; margin: 0 var(--spacing-xs) 0 0; }