Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Apple web-app meta tag #358 #359

Merged
merged 6 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions bookmarks/templates/bookmarks/layout.html
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. I did test this on iOS, and while opening the app correctly hides the status bar, navigating to any other page of the app (add bookmark, settings, ...) adds the status bar again, and shows an option to return to the app. I would expect that there is no status bar as long as you are on a URL within the app.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
<meta charset="UTF-8">
<link rel="icon" href="{% static 'favicon.png' %}"/>
<link rel="apple-touch-icon" href="{% static 'apple-touch-icon.png' %}">
<link rel="manifest" href="/manifest.json">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimal-ui">
<meta name="description" content="Self-hosted bookmark service">
<meta name="robots" content="index,follow">
Expand Down
6 changes: 6 additions & 0 deletions bookmarks/templates/metadata/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"short_name": "linkding",
"start_url": "bookmarks",
"display": "standalone",
"scope": "/"
}
5 changes: 4 additions & 1 deletion bookmarks/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from django.urls import re_path
from django.urls import path, include
from django.views.generic import RedirectView
from django.views.generic.base import TemplateView

from bookmarks.api.routes import router
from bookmarks import views
Expand Down Expand Up @@ -32,5 +33,7 @@
path('feeds/<str:feed_key>/all', AllBookmarksFeed(), name='feeds.all'),
path('feeds/<str:feed_key>/unread', UnreadBookmarksFeed(), name='feeds.unread'),
# Health check
path('health', views.health, name='health')
path('health', views.health, name='health'),
# Manifest
path("manifest.json", TemplateView.as_view(template_name="metadata/manifest.json", content_type="application/json"), )
acbgbca marked this conversation as resolved.
Show resolved Hide resolved
]