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

FEATURE: Implement component for displaying Favicons in frontend #176

Open
wants to merge 4 commits into
base: 8.4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions NodeTypes/Document/Document.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ prototype(Neos.Demo:Document) < prototype(Neos.Fusion:Component) {
site = Neos.Demo:Presentation.Javascript
}
metadata = '<meta name="viewport" content="width=device-width, initial-scale=1.0">'
favicons = Neos.Demo:Presentation.Favicons
structuredData = ${props.structuredData}
}
body = ${props.content}
Expand Down
13 changes: 13 additions & 0 deletions Resources/Private/Fusion/Presentation/Favicons.fusion
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
prototype(Neos.Demo:Presentation.Favicons) < prototype(Neos.Fusion:Component) {

renderer = afx`
<link rel="apple-touch-icon" sizes="180x180" href={StaticResource.uri('Neos.Demo', 'Public/Assets/Favicons/apple-touch-icon.png')} />
<link rel="icon" type="image/png" sizes="16x16" href={StaticResource.uri('Neos.Demo', 'Public/Assets/Favicons/favicon-16x16.png')} />
<link rel="icon" type="image/png" sizes="70x70" href={StaticResource.uri('Neos.Demo', 'Public/Assets/Favicons/mstile-70x70.png')} />
<link rel="icon" type="image/png" sizes="192x192" href={StaticResource.uri('Neos.Demo', 'Public/Assets/Favicons/android-chrome-192x192.png')} />
<link rel="manifest" href={StaticResource.uri('Neos.Demo', 'Public/Assets/Favicons/site.webmanifest')} />
<link rel="mask-icon" href={StaticResource.uri('Neos.Demo', 'Public/Assets/Favicons/safari-pinned-tab.svg')} color="#5bbad5" />
<meta name="msapplication-TileColor" content="#2d89ef" />
<meta name="theme-color" content="#ffffff" />
`
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions Resources/Public/Assets/Favicons/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#00adee</TileColor>
</tile>
</msapplication>
</browserconfig>
Binary file added Resources/Public/Assets/Favicons/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/Public/Assets/Favicons/favicon.ico
Binary file not shown.
Binary file added Resources/Public/Assets/Favicons/mstile-70x70.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions Resources/Public/Assets/Favicons/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Neos",
"short_name": "Neos",
"prefer_related_applications": true,
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/apple-touch-icon.png",
"sizes": "180x180",
"type": "image/png"
},
{
"src": "/favicon-16x16.png",
"sizes": "16x16",
"type": "image/png"
},
{
"src": "/mstile-70x70.png",
"sizes": "70x70",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff"
}