Add twitter and mastodon links, fix #846

This commit is contained in:
pietervdvn 2022-06-03 19:15:59 +02:00
parent 631108954e
commit b4f8debb77
9 changed files with 2455 additions and 716 deletions

View file

@ -25,6 +25,7 @@ import Img from "../Base/Img";
import {TypedTranslation} from "../i18n/Translation";
import TranslatorsPanel from "./TranslatorsPanel";
import {MapillaryLink} from "./MapillaryLink";
import FullWelcomePaneWithTabs from "./FullWelcomePaneWithTabs";
export class OpenIdEditor extends VariableUiElement {
constructor(state: { locationControl: UIEventSource<Loc> }, iconStyle?: string, objectId?: string) {
@ -119,6 +120,16 @@ export default class CopyrightPanel extends Combine {
url: Utils.OsmChaLinkFor(31, state.layoutToUse.id),
newTab: true
}),
new SubtleButton(Svg.mastodon_ui().SetStyle(iconStyle),
new Combine([t.followOnMastodon.SetClass("font-bold"), t.followBridge]).SetClass("flex flex-col"),
{
url:"https://en.osm.town/web/notifications",
newTab: true
}),
new SubtleButton(Svg.twitter_ui().SetStyle(iconStyle), t.followOnTwitter, {
url:"https://twitter.com/mapcomplete",
newTab: true
}),
new OpenIdEditor(state, iconStyle),
new MapillaryLink(state, iconStyle),
new OpenJosm(state, iconStyle),
@ -178,7 +189,7 @@ export default class CopyrightPanel extends Combine {
CopyrightPanel.CodeContributors(contributors, t.codeContributionsBy),
CopyrightPanel.CodeContributors(translators, t.translatedBy),
new FixedUiElement("MapComplete " + Constants.vNumber).SetClass("font-bold"),
new Combine(actionButtons).SetClass("block w-full"),
new Combine(actionButtons).SetClass("block w-full link-no-underline"),
new Title(t.iconAttribution.title, 3),
...iconAttributions
].map(e => e?.SetClass("mt-4")));

View file

@ -179,7 +179,7 @@ export default class NearbyImages extends Lazy {
towardscenter: false
})
).map(images => {
if (images === undefined && nearbyImages.length === 0) {
if (images === undefined) {
return undefined
}
images = (images ?? []).concat(nearbyImages)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

2376
assets/SocialImageBanner.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 3.1 MiB

View file

@ -803,6 +803,16 @@
"https://www.mapillary.com/"
]
},
{
"path": "mastodon.svg",
"license": "Logo; GNU Affero General Public License",
"authors": [
"Mastodon"
],
"sources": [
"https://commons.wikimedia.org/wiki/File:Mastodon_Logotype_(Simple).svg"
]
},
{
"path": "min.svg",
"license": "CC0; trivial",
@ -1309,6 +1319,16 @@
"https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_language-ltr.svg"
]
},
{
"path": "twitter.svg",
"license": "Logo - all rights reserved",
"authors": [
"Twitter Inc."
],
"sources": [
"https://about.twitter.com/en/who-we-are/brand-toolkit"
]
},
{
"path": "up.svg",
"license": "CC0; trivial",

4
assets/svg/mastodon.svg Normal file
View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="61.076954mm" height="65.47831mm" viewBox="0 0 216.4144 232.00976">
<path fill="#2b90d9" d="M211.80734 139.0875c-3.18125 16.36625-28.4925 34.2775-57.5625 37.74875-15.15875 1.80875-30.08375 3.47125-45.99875 2.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125 0 2.53375.15625 4.94625.46875 7.2025 3.38375 25.68625 25.47 27.225 46.39125 27.9425 21.11625.7225 39.91875-5.20625 39.91875-5.20625l.8675 19.09s-14.77 7.93125-41.08125 9.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234 213.82 1.40609 165.31125.20859 116.09125c-.365-14.61375-.14-28.39375-.14-39.91875 0-50.33 32.97625-65.0825 32.97625-65.0825C49.67234 3.45375 78.20359.2425 107.86484 0h.72875c29.66125.2425 58.21125 3.45375 74.8375 11.09 0 0 32.975 14.7525 32.975 65.0825 0 0 .41375 37.13375-4.59875 62.915"/>
<path fill="#fff" d="M177.50984 80.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025 0-17.4175 7.5075-17.4175 22.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375 0-15.74 6.32875-15.74 18.7975v59.15H38.90484V80.077c0-12.455 3.17125-22.3525 9.54125-29.675 6.56875-7.3225 15.17125-11.07625 25.85-11.07625 12.355 0 21.71125 4.74875 27.8975 14.2475l6.01375 10.08125 6.015-10.08125c6.185-9.49875 15.54125-14.2475 27.8975-14.2475 10.6775 0 19.28 3.75375 25.85 11.07625 6.36875 7.3225 9.54 17.22 9.54 29.675"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because it is too large Load diff

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 139 KiB

16
assets/svg/twitter.svg Normal file
View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 248 204" style="enable-background:new 0 0 248 204;" xml:space="preserve">
<style type="text/css">
.st0{fill:#1D9BF0;}
</style>
<g id="Logo_1_">
<path id="white_background" class="st0" d="M221.95,51.29c0.15,2.17,0.15,4.34,0.15,6.53c0,66.73-50.8,143.69-143.69,143.69v-0.04
C50.97,201.51,24.1,193.65,1,178.83c3.99,0.48,8,0.72,12.02,0.73c22.74,0.02,44.83-7.61,62.72-21.66
c-21.61-0.41-40.56-14.5-47.18-35.07c7.57,1.46,15.37,1.16,22.8-0.87C27.8,117.2,10.85,96.5,10.85,72.46c0-0.22,0-0.43,0-0.64
c7.02,3.91,14.88,6.08,22.92,6.32C11.58,63.31,4.74,33.79,18.14,10.71c25.64,31.55,63.47,50.73,104.08,52.76
c-4.07-17.54,1.49-35.92,14.61-48.25c20.34-19.12,52.33-18.14,71.45,2.19c11.31-2.23,22.15-6.38,32.07-12.26
c-3.77,11.69-11.66,21.62-22.2,27.93c10.01-1.18,19.79-3.86,29-7.95C240.37,35.29,231.83,44.14,221.95,51.29z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -82,6 +82,9 @@
"donate": "Support MapComplete financially",
"editId": "Open the OpenStreetMap online editor here",
"editJosm": "Edit here with JOSM",
"followBridge": "The Mastodon- and Twitter-accounts are bridged",
"followOnMastodon": "Follow MapComplete on Mastodon",
"followOnTwitter": "Follow MapComplete on twitter",
"iconAttribution": {
"title": "Used icons"
},