-
Notifications
You must be signed in to change notification settings - Fork 11
Split map SVG into separate route #538
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
Conversation
| <img alt="Map of states with departments in OpenOversight" | ||
| src="{{ url_for('main.render_map') }}" /> |
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.
Using <img> here which renders it non-interactively on the front page
| {% endif %} | ||
| {% endfor %} | ||
| </svg> | ||
| <object type="image/svg+xml" data="{{ url_for('main.render_map') }}"></object> |
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.
Using <object> here to embed the SVG interactively on the browse page
| </defs> | ||
| {% for state, path in map_paths.items() %} | ||
| {% if state in departments_by_state.keys() %} | ||
| <a href="{{ url_for('main.browse') }}#state-{{ state }}" target="_top"> |
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.
Setting target="_top" here to open the link in the top-level browser rather than only in the <object> frame
AetherUnbound
left a comment
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.
Sweet, looks great!
Description of Changes
Split map SVG into a separate route that can be reused
Notes for Deployment
None!
Screenshots (if appropriate)
N/A (Same as before)
Testing instructions
Checks
I have rebased my changes on
mainjust lintpassesjust testpasses