From 401a99a127bd2d59cb22c94bb1224a5ccbd55d0a Mon Sep 17 00:00:00 2001 From: mgabdev <> Date: Thu, 14 May 2020 19:07:58 -0400 Subject: [PATCH] Testing themed splash screens --- app/helpers/application_helper.rb | 5 +++++ app/views/layouts/application.html.haml | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8fe38990..bdeb8cf1 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -122,4 +122,9 @@ module ApplicationHelper text = word_wrap(text, line_width: line_width - 2, break_sequence: break_sequence) text.split("\n").map { |line| '> ' + line }.join("\n") end + + def theme + # : todo : + return 'light' + end end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 4b470128..4523d6d6 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -15,16 +15,16 @@ %link{ rel: 'apple-touch-icon', sizes: '180x180', href: '/apple-touch-icon.png' }/ %link{ rel: 'mask-icon', href: '/mask-icon.svg', color: '#2B90D9' }/ - %link{ href: 'splash/light/iphone5_splash.png', media: '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/iphone6_splash.png', media: '(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/iphoneplus_splash.png', media: '(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/iphonex_splash.png', media: '(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/iphonexr_splash.png', media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/iphonexsmax_splash.png', media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/ipad_splash.png', media: '(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/ipadpro1_splash.png', media: '(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/ipadpro3_splash.png', media: '(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ - %link{ href: 'splash/light/ipadpro2_splash.png', media: '(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/iphone5_splash.png", media: '(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/iphone6_splash.png", media: '(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/iphoneplus_splash.png", media: '(device-width: 621px) and (device-height: 1104px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/iphonex_splash.png", media: '(device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/iphonexr_splash.png", media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/iphonexsmax_splash.png", media: '(device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/ipad_splash.png", media: '(device-width: 768px) and (device-height: 1024px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/ipadpro1_splash.png", media: '(device-width: 834px) and (device-height: 1112px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/ipadpro3_splash.png", media: '(device-width: 834px) and (device-height: 1194px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ + %link{ href: "splash/#{theme}/ipadpro2_splash.png", media: '(device-width: 1024px) and (device-height: 1366px) and (-webkit-device-pixel-ratio: 2)', rel: 'apple-touch-startup-image' }/ %link{ rel: 'manifest', href: '/manifest.json' }/ %meta{ name: 'msapplication-config', content: '/browserconfig.xml' }/