-
Notifications
You must be signed in to change notification settings - Fork 296
Svg sprite plugin #762
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
Open
zoran995
wants to merge
8
commits into
main
Choose a base branch
from
svg-sprite-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,640
−1,087
Open
Svg sprite plugin #762
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a2dabf7
feat: use terriajs svg-sprite plugin
zoran995 ead80ff
wait for index.html to exists before starting terriajs-servre
zoran995 0f9d9ce
implement sprite loader instead of injecting sprites into html
zoran995 b56e89a
put sprites in DOM under svg-sprites id
zoran995 57ea78e
Merge remote-tracking branch 'origin/main' into svg-sprite-plugin
zoran995 bee0ac8
use script injected in main output file
zoran995 b48e159
pass correct namespace
zoran995 6dd8c43
pass baseHref as param to webpack
zoran995 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,104 @@ | ||
<!DOCTYPE html> | ||
<html lang="en" class="terria"> | ||
<head> | ||
<base href="<%= baseHref %>"> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <!-- Use Chrome Frame in IE --> | ||
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
<meta name="description" content="A web map built on Terria Map"> | ||
<meta name="apple-mobile-web-app-capable" content="yes"> | ||
<head> | ||
<base href="<%= baseHref %>" /> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" /> | ||
<!-- Use Chrome Frame in IE --> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" | ||
/> | ||
<meta name="description" content="A web map built on Terria Map" /> | ||
<meta name="apple-mobile-web-app-capable" content="yes" /> | ||
|
||
<link rel="apple-touch-icon" sizes="57x57" href="favicons/apple-icon-57x57.png"> | ||
<link rel="apple-touch-icon" sizes="60x60" href="favicons/apple-icon-60x60.png"> | ||
<link rel="apple-touch-icon" sizes="72x72" href="favicons/apple-icon-72x72.png"> | ||
<link rel="apple-touch-icon" sizes="76x76" href="favicons/apple-icon-76x76.png"> | ||
<link rel="apple-touch-icon" sizes="114x114" href="favicons/apple-icon-114x114.png"> | ||
<link rel="apple-touch-icon" sizes="120x120" href="favicons/apple-icon-120x120.png"> | ||
<link rel="apple-touch-icon" sizes="144x144" href="favicons/apple-icon-144x144.png"> | ||
<link rel="apple-touch-icon" sizes="152x152" href="favicons/apple-icon-152x152.png"> | ||
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-icon-180x180.png"> | ||
<link rel="icon" type="image/png" sizes="192x192" href="favicons/android-icon-192x192.png"> | ||
<link rel="icon" type="image/png" sizes="32x32" href="favicons/favicon-32x32.png"> | ||
<link rel="icon" type="image/png" sizes="96x96" href="favicons/favicon-96x96.png"> | ||
<link rel="icon" type="image/png" sizes="16x16" href="favicons/favicon-16x16.png"> | ||
<link rel="manifest" href="favicons/manifest.json"> | ||
<meta name="msapplication-TileColor" content="#282D32"> | ||
<meta name="msapplication-TileImage" content="favicons/ms-icon-144x144.png"> | ||
<meta name="theme-color" content="#282D32"> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="57x57" | ||
href="favicons/apple-icon-57x57.png" | ||
/> | ||
Comment on lines
+15
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are these formatting changes from prettier? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I don't think this file was prettified before |
||
<link | ||
rel="apple-touch-icon" | ||
sizes="60x60" | ||
href="favicons/apple-icon-60x60.png" | ||
/> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="72x72" | ||
href="favicons/apple-icon-72x72.png" | ||
/> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="76x76" | ||
href="favicons/apple-icon-76x76.png" | ||
/> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="114x114" | ||
href="favicons/apple-icon-114x114.png" | ||
/> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="120x120" | ||
href="favicons/apple-icon-120x120.png" | ||
/> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="144x144" | ||
href="favicons/apple-icon-144x144.png" | ||
/> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="152x152" | ||
href="favicons/apple-icon-152x152.png" | ||
/> | ||
<link | ||
rel="apple-touch-icon" | ||
sizes="180x180" | ||
href="favicons/apple-icon-180x180.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="192x192" | ||
href="favicons/android-icon-192x192.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="32x32" | ||
href="favicons/favicon-32x32.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="96x96" | ||
href="favicons/favicon-96x96.png" | ||
/> | ||
<link | ||
rel="icon" | ||
type="image/png" | ||
sizes="16x16" | ||
href="favicons/favicon-16x16.png" | ||
/> | ||
<link rel="manifest" href="favicons/manifest.json" /> | ||
<meta name="msapplication-TileColor" content="#282D32" /> | ||
<meta | ||
name="msapplication-TileImage" | ||
content="favicons/ms-icon-144x144.png" | ||
/> | ||
<meta name="theme-color" content="#282D32" /> | ||
|
||
<title>Terria Map</title> | ||
<link rel="stylesheet" type="text/css" href="build/TerriaMap.css"> | ||
|
||
<!-- Leaflet --> | ||
<script>L_PREFER_CANVAS = true;</script> | ||
</head> | ||
<script> | ||
L_PREFER_CANVAS = true; | ||
</script> | ||
</head> | ||
|
||
<body> | ||
|
||
<div id='ui'></div> | ||
<script src="build/TerriaMap.js"></script> | ||
</body> | ||
<body> | ||
<div id="svg-sprites" style="display: none"></div> | ||
<div id="ui"></div> | ||
</body> | ||
</html> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
namespace
function is currently returning a new name for each icon in the plugin. It should instead just return the package name, something like:namespace: (svgPath) => packageNames[svgPath] || "terriajs-plugin"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching this. It was definitely not intended