diff --git a/app/Http/Resources/ProviderResource.php b/app/Http/Resources/ProviderResource.php index 4c126b6a..75f16695 100644 --- a/app/Http/Resources/ProviderResource.php +++ b/app/Http/Resources/ProviderResource.php @@ -14,6 +14,8 @@ public function toArray(Request $request): array return [ "name" => $this->name, "url" => $this->url, + "android_url" => $this->android_url, + "ios_url" => $this->ios_url, "color" => $this->color, ]; } diff --git a/database/migrations/2023_06_15_132726_create_providers.php b/database/migrations/2023_06_15_132726_create_providers.php index 6ca84af4..794c7f9f 100644 --- a/database/migrations/2023_06_15_132726_create_providers.php +++ b/database/migrations/2023_06_15_132726_create_providers.php @@ -12,6 +12,8 @@ public function up(): void Schema::create("providers", function (Blueprint $table): void { $table->string("name")->unique(); $table->string("url")->nullable(); + $table->string("android_url")->nullable(); + $table->string("ios_url")->nullable(); $table->string("color"); $table->timestamps(); }); diff --git a/database/seeders/ProviderSeeder.php b/database/seeders/ProviderSeeder.php index 69f39543..e3bed569 100644 --- a/database/seeders/ProviderSeeder.php +++ b/database/seeders/ProviderSeeder.php @@ -36,36 +36,39 @@ class ProviderSeeder extends Seeder public function run(): void { $providers = [ - ["name" => BeamDataImporter::getProviderName(), "color" => "#7347ff"], - ["name" => BerylDataImporter::getProviderName(), "color" => "#00e3c2"], - ["name" => BinBinDataImporter::getProviderName(), "color" => "#3dbcc8"], - ["name" => BirdDataImporter::getProviderName(), "color" => "#26ccf0"], - ["name" => BitMobilityDataImporter::getProviderName(), "color" => "#8da6e3"], - ["name" => BoltDataImporter::getProviderName(), "color" => "#24f0a0"], - ["name" => DottDataImporter::getProviderName(), "color" => "#f5c604"], - ["name" => HopDataImporter::getProviderName(), "color" => "#ea1821"], - ["name" => HoppDataImporter::getProviderName(), "color" => "#1ce5be"], - ["name" => HulajDataImporter::getProviderName(), "color" => "#d6213f"], - ["name" => LimeDataImporter::getProviderName(), "color" => "#00de00"], - ["name" => LinkDataImporter::getProviderName(), "color" => "#def700"], - ["name" => NeuronDataImporter::getProviderName(), "color" => "#445261"], - ["name" => QuickDataImporter::getProviderName(), "color" => "#009ac7"], - ["name" => SpinDataImporter::getProviderName(), "color" => "#ff5436"], - ["name" => SixtDataImporter::getProviderName(), "color" => "#f25a04"], - ["name" => TierDataImporter::getProviderName(), "color" => "#0E1A50"], - ["name" => VoiDataImporter::getProviderName(), "color" => "#f46c63"], - ["name" => UrentDataImporter::getProviderName(), "color" => "#9400FF"], - ["name" => ZwingsDataImporter::getProviderName(), "color" => "#abb8c3"], - ["name" => RydeDataImporter::getProviderName(), "color" => "#4dcb1f"], - ["name" => VeoDataImporter::getProviderName(), "color" => "#000000"], - ["name" => WindDataImporter::getProviderName(), "color" => "#fffa00"], - ["name" => WheeMoveDataImporter::getProviderName(), "color" => "#31682d"], + ["name" => BeamDataImporter::getProviderName(), "color" => "#7347ff", "url" => "https://www.ridebeam.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.escooterapp&pli=1", "ios_url" => "https://apps.apple.com/app/id1427114484"], + ["name" => BerylDataImporter::getProviderName(), "color" => "#00e3c2", "url" => "https://beryl.cc/", "android_url" => "https://play.google.com/store/apps/details?id=cc.beryl.basis", "ios_url" => "https://apps.apple.com/app/id1386768364"], + ["name" => BinBinDataImporter::getProviderName(), "color" => "#3dbcc8", "url" => "https://www.binbin.tech/", "android_url" => "https://play.google.com/store/apps/details?id=com.BINBIN&hl=en_US", "ios_url" => "https://apps.apple.com/us/app/binbin-scooters/id1483635924"], + ["name" => BirdDataImporter::getProviderName(), "color" => "#26ccf0", "url" => "https://www.bird.co/", "android_url" => "https://play.google.com/store/apps/details?id=co.bird.android", "ios_url" => "https://apps.apple.com/us/app/bird-be-free-enjoy-the-ride/id1260842311"], + ["name" => BitMobilityDataImporter::getProviderName(), "color" => "#8da6e3", "url" => "https://bitmobility.it/en/", "android_url" => "https://play.google.com/store/apps/details?id=it.bitmobility.bit", "ios_url" => "https://apps.apple.com/it/app/bit/id1464155063"], + ["name" => BoltDataImporter::getProviderName(), "color" => "#24f0a0", "url" => "https://bolt.eu/pl-pl/scooters/", "android_url" => "https://play.google.com/store/apps/details?id=ee.mtakso.client&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/pl/app/bolt-przejazdy-hulajnogi/id675033630?l=pl"], + ["name" => DottDataImporter::getProviderName(), "color" => "#f5c604", "url" => "https://ridedott.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.ridedott.rider&pli=1", "ios_url" => "https://apps.apple.com/us/app/dott-unlock-your-city/id1440301673"], + ["name" => HopDataImporter::getProviderName(), "color" => "#ea1821", "url" => "https://hop.bike/en/", "android_url" => "https://play.google.com/store/apps/details?id=com.hoplagit.rider&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/pl/app/hop-enjoy-the-city/id1487640704?l=pl"], + ["name" => HoppDataImporter::getProviderName(), "color" => "#1ce5be", "url" => "https://hopp.bike/", "android_url" => "https://play.google.com/store/apps/details?id=bike.hopp", "ios_url" => "https://apps.apple.com/us/app/hopp-scooters/id1471324642?ls=1"], + ["name" => HulajDataImporter::getProviderName(), "color" => "#d6213f", "url" => "https://hulaj.eu/", "android_url" => "https://play.google.com/store/apps/details?id=eu.hulaj&hl=pl&gl=US"], + ["name" => LimeDataImporter::getProviderName(), "color" => "#00de00", "url" => "https://www.li.me/", "android_url" => "https://play.google.com/store/apps/details?id=com.limebike", "ios_url" => "https://apps.apple.com/app/id1199780189"], + ["name" => LinkDataImporter::getProviderName(), "color" => "#def700", "url" => "https://link.city/", "android_url" => "https://play.google.com/store/apps/details?id=com.superpedestrian.link", "ios_url" => "https://apps.apple.com/US/app/id1487864428?mt=8"], + ["name" => NeuronDataImporter::getProviderName(), "color" => "#445261", "url" => "https://www.rideneuron.com/", "android_url" => "https://go.onelink.me/app/Neuron", "ios_url" => "https://go.onelink.me/app/NeuroniOS"], + ["name" => QuickDataImporter::getProviderName(), "color" => "#009ac7", "url" => "https://quick-app.eu/en/", "android_url" => "https://play.google.com/store/apps/details?id=eu.quick_app.eu", "ios_url" => "https://apps.apple.com/us/app/quickapp/id1461661144"], + ["name" => SpinDataImporter::getProviderName(), "color" => "#ff5436", "url" => "https://www.spin.app/", "android_url" => "https://play.google.com/store/apps/details?hl=en_US&id=pm.spin", "ios_url" => "https://apps.apple.com/us/app/spin-electric-scooters/id1241808993"], + ["name" => SixtDataImporter::getProviderName(), "color" => "#f25a04", "url" => "https://www.sixt.com/share/#/", "android_url" => "https://play.google.com/store/apps/details?id=com.sixt.reservation&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/us/app/sixt-rent-share-ride-plus/id295079411"], + ["name" => TierDataImporter::getProviderName(), "color" => "#0E1A50", "url" => "https://www.tier.app/", "android_url" => "https://play.google.com/store/apps/details?id=com.tier.app&hl=en&gl=US", "ios_url" => "https://apps.apple.com/app/id1436140272?mt=8"], + ["name" => VoiDataImporter::getProviderName(), "color" => "#f46c63", "url" => "https://www.voiscooters.com/", "android_url" => "https://play.google.com/store/apps/details?id=io.voiapp.voi&hl=pl&gl=US", "ios_url" => "https://apps.apple.com/us/app/voi-e-scooter-e-bike-hire/id1395921017?mt=8"], + ["name" => UrentDataImporter::getProviderName(), "color" => "#9400FF", "url" => "https://urent.ru/", "android_url" => "https://play.google.com/store/apps/details?id=ru.urentbike.app", "ios_url" => "https://apps.apple.com/gb/app/urent-e-scooters-and-bikes/id1352346712"], + ["name" => ZwingsDataImporter::getProviderName(), "color" => "#abb8c3", "url" => "https://www.zwings.co.uk/", "android_url" => "https://play.google.com/store/apps/details?id=com.zwings", "ios_url" => "https://apps.apple.com/us/app/zwings/id1503019815"], + ["name" => RydeDataImporter::getProviderName(), "color" => "#4dcb1f", "url" => "https://www.ryde-technology.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.ryde_android&hl=no", "ios_url" => "https://apps.apple.com/no/app/id1495605028"], + ["name" => VeoDataImporter::getProviderName(), "color" => "#000000", "url" => "https://www.veoride.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.pgt.veoride", "ios_url" => "https://apps.apple.com/us/app/veoride/id1279820696"], + ["name" => WindDataImporter::getProviderName(), "color" => "#fffa00", "url" => "https://www.wind.co/", "android_url" => "https://play.google.com/store/apps/details?id=com.zen.zbike&referrer=utm_source%3Dofficialweb%26utm_medium%3Dother%26utm_term%3Dglobal", "ios_url" => "https://apps.apple.com/cn/app/yango-wind-e-scooter-sharing/id1247826304?utm_source=officialweb&utm_medium=other&time=1703025387273&utm_term=global"], + ["name" => WheeMoveDataImporter::getProviderName(), "color" => "#31682d", "url" => "https://www.wheemove.com/", "android_url" => "https://play.google.com/store/apps/details?id=com.whee.android", "ios_url" => "https://apps.apple.com/us/app/whee-e-scooter-sharing/id1465111214?l=es&ls=1"], ]; foreach ($providers as $provider) { Provider::create([ "name" => $provider["name"], "color" => $provider["color"], + "url" => $provider["url"] ?? null, + "android_url" => $provider["android_url"] ?? null, + "ios_url" => $provider["ios_url"] ?? null, ]); } } diff --git a/public/icons/android.svg b/public/icons/android.svg new file mode 100644 index 00000000..8272bac1 --- /dev/null +++ b/public/icons/android.svg @@ -0,0 +1,100 @@ + + + + diff --git a/public/icons/apple.svg b/public/icons/apple.svg new file mode 100644 index 00000000..2c87d819 --- /dev/null +++ b/public/icons/apple.svg @@ -0,0 +1,44 @@ + + diff --git a/public/icons/globe.svg b/public/icons/globe.svg new file mode 100644 index 00000000..afb61ac7 --- /dev/null +++ b/public/icons/globe.svg @@ -0,0 +1,38 @@ + + diff --git a/resources/css/app.css b/resources/css/app.css index 6cd0f405..9430c6ad 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -1,7 +1,6 @@ @tailwind base; @tailwind components; @tailwind utilities; - @layer utilities { .no-scrollbar::-webkit-scrollbar { display: none; @@ -10,7 +9,6 @@ -ms-overflow-style: none; scrollbar-width: none; } - .scrollbar::-webkit-scrollbar { width: 15px; height: 12px; @@ -27,5 +25,57 @@ .scrollbar::-webkit-scrollbar-thumb:hover { background: #d3d3d3; } + .provider-buttons { + position: absolute; + transition: all 0.15s ease-in-out; + opacity: 0; + transform: translate(-50%, -50%); + visibility: hidden; + top: 20%; + left: 50%; + padding: 8px; + border-radius: 7px; + z-index: 50; + } + .provider-buttons > a { + position: relative; + margin-bottom: 4px; + } + .provider-buttons>a:last-of-type { + margin-bottom: 0; + } + .provider-buttons.show { + transform: translate(-50%, -50%); + opacity: 1; + visibility: visible; + top: 30%; + left: 50%; + scale: 1; + } + .provider-text::after { + content: ""; + display: inline-block; + border: 8px solid transparent; + border-left-color: #fff; + opacity: 0; + transition: all 0.15s ease-in-out; + height: 0px; + } + a>.provider-text { + transition: all 0.15s ease-in-out; + transform: scale(1); + } + a:hover>.provider-text { + text-decoration: none; + transform: scale(1.1); + } + a:hover>.provider-text::after { + opacity: 1; + } + .provider-buttons>a:hover{ + box-shadow: inset 0 0 8px 1px #315cb8c5; + } + .provider-buttons>a{ + transition: all 0.15s ease-in-out; + } } - diff --git a/resources/js/Pages/City/Index.vue b/resources/js/Pages/City/Index.vue index 785fa0b5..023550da 100644 --- a/resources/js/Pages/City/Index.vue +++ b/resources/js/Pages/City/Index.vue @@ -85,7 +85,7 @@ function createOpinion() {