about summary refs log tree commit diff
path: root/app/views/shared
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2022-11-10 08:50:11 -0600
committerStarfall <us@starfall.systems>2022-11-10 08:50:11 -0600
commit67d1a0476d77e2ed0ca15dd2981c54c2b90b0742 (patch)
tree152f8c13a341d76738e8e2c09b24711936e6af68 /app/views/shared
parentb581e6b6d4a5ba9ed4ae17427b7f2d5d158be4e5 (diff)
parentee7e49d1b1323618e16026bc8db8ab7f9459cc2d (diff)
Merge remote-tracking branch 'glitch/main'
- Remove Helm charts
- Lots of conflicts with our removal of recommended settings and custom
  icons
Diffstat (limited to 'app/views/shared')
-rw-r--r--app/views/shared/_og.html.haml6
-rw-r--r--app/views/shared/_web_app.html.haml16
2 files changed, 19 insertions, 3 deletions
diff --git a/app/views/shared/_og.html.haml b/app/views/shared/_og.html.haml
index 7feae1b8b..2941b566e 100644
--- a/app/views/shared/_og.html.haml
+++ b/app/views/shared/_og.html.haml
@@ -1,14 +1,14 @@
 - thumbnail     = @instance_presenter.thumbnail
-- description ||= strip_tags(@instance_presenter.site_short_description.presence || t('about.about_mastodon_html'))
+- description ||= strip_tags(@instance_presenter.description.presence || t('about.about_mastodon_html'))
 
 %meta{ name: 'description', content: description }/
 
 = opengraph 'og:site_name', t('about.hosted_on', domain: site_hostname)
 = opengraph 'og:url', url_for(only_path: false)
 = opengraph 'og:type', 'website'
-= opengraph 'og:title', @instance_presenter.site_title
+= opengraph 'og:title', @instance_presenter.title
 = opengraph 'og:description', description
-= opengraph 'og:image', full_asset_url(thumbnail&.file&.url || asset_pack_path('media/images/preview.png', protocol: :request))
+= opengraph 'og:image', full_asset_url(thumbnail&.file&.url(:'@1x') || asset_pack_path('media/images/preview.png', protocol: :request))
 = opengraph 'og:image:width', thumbnail ? thumbnail.meta['width'] : '1200'
 = opengraph 'og:image:height', thumbnail ? thumbnail.meta['height'] : '630'
 = opengraph 'twitter:card', 'summary_large_image'
diff --git a/app/views/shared/_web_app.html.haml b/app/views/shared/_web_app.html.haml
new file mode 100644
index 000000000..b9a0ce1fc
--- /dev/null
+++ b/app/views/shared/_web_app.html.haml
@@ -0,0 +1,16 @@
+- content_for :header_tags do
+  - if user_signed_in?
+    = preload_pack_asset 'features/compose.js', crossorigin: 'anonymous'
+    = preload_pack_asset 'features/home_timeline.js', crossorigin: 'anonymous'
+    = preload_pack_asset 'features/notifications.js', crossorigin: 'anonymous'
+
+  %meta{ name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key }
+
+  = render_initial_state
+
+.notranslate.app-holder#mastodon{ data: { props: Oj.dump(default_props) } }
+  %noscript
+    = image_pack_tag 'logo.svg', alt: 'Mastodon'
+
+    %div
+      = t('errors.noscript_html', apps_path: 'https://joinmastodon.org/apps')