diff --git a/app/assets/images/branding/apple-splash.png b/app/assets/images/branding/apple-splash.png deleted file mode 100644 index 8ba65c01d..000000000 Binary files a/app/assets/images/branding/apple-splash.png and /dev/null differ diff --git a/app/controllers/manifest_controller.rb b/app/controllers/manifest_controller.rb new file mode 100644 index 000000000..cf6f5c417 --- /dev/null +++ b/app/controllers/manifest_controller.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class ManifestController < ApplicationController + def show + render json: '{ + "short_name": "diaspora*", + "name": "diaspora*", + "description": "diaspora* is a free, decentralized and privacy respectful social network", + "icons": [ + { + "src": "/icon.png", + "type": "image/png", + "sizes": "192x192" + } + ], + "start_url": "/", + "background_color": "#000000", + "display": "standalone", + "theme_color": "#000000" + }' + end +end diff --git a/app/views/application/_head.haml b/app/views/layouts/_head.haml similarity index 92% rename from app/views/application/_head.haml rename to app/views/layouts/_head.haml index c8587e9d5..fcb5eba56 100644 --- a/app/views/application/_head.haml +++ b/app/views/layouts/_head.haml @@ -4,8 +4,6 @@ %meta{charset: "utf-8"}/ = content_for?(:meta_data) ? yield(:meta_data) : metas_tags -%meta{content: "yes", name: "mobile-web-app-capable"}/ - / favicon / For Apple devices %link{rel: "apple-touch-icon", href: image_path("apple-touch-icon.png")} diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index a50e428aa..63decb11f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -12,7 +12,7 @@ = load_javascript_locales = include_color_theme - = render "head" + = render "layouts/head" = translation_missing_warnings %body{class: "page-#{controller_name} action-#{action_name}"} diff --git a/app/views/layouts/application.mobile.haml b/app/views/layouts/application.mobile.haml index 233122575..7c57b496d 100644 --- a/app/views/layouts/application.mobile.haml +++ b/app/views/layouts/application.mobile.haml @@ -17,11 +17,6 @@ %meta{name: "MobileOptimized", content: "320"}/ %meta{"http-equiv" => "cleartype", :content => "on"}/ - / iOS mobile web app indicator - / NOTE(we will enable these once we don't have to rely on back/forward buttons anymore) - /%meta{:name => "apple-mobile-web-app-capable", :content => "yes"} - /%link{:rel => "apple-touch-startup-image", :href => "/images/apple-splash.png"} - %body #app = render "layouts/header" diff --git a/config/routes.rb b/config/routes.rb index 873299b9a..7f1e36102 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -239,4 +239,5 @@ Rails.application.routes.draw do end get ".well-known/openid-configuration", to: "api/openid_connect/discovery#configuration" + get "manifest.json", to: "manifest#show" end