-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Community page #2262
Community page #2262
Conversation
…styling, changes table logic and rm animation
Link check report. 554131 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
1 similar comment
Link check report. 554131 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 554131 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 554131 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 554131 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 554129 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 554129 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 554129 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 554129 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 560376 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
1 similar comment
Link check report. 560376 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 560370 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 560370 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 579172 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 579172 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
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.
Still a couple fixes that need to go in before we should merge this.
template/page-community.html.jinja
Outdated
<script type="text/javascript"> | ||
document.addEventListener("DOMContentLoaded", function() { | ||
const events = [ | ||
{ "name": _("New Horizon: Innovate Without Limits: New Horizons Await"), |
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.
The _(...)
function for translation doesn't work in this context. You can use it in {% set ... %}
blocks which are handled by the Jinja preprocessor (which performs translation at build time) but you can't just use it in client-side JavaScript. The page is throwing an error in the browser console about _
being undefined because of this.
One workaround is to wrap the entire events array here in {{ ... }}
which evaluates it as Jinja syntax first, which will do translation and output a dictionary which happens to be compatible with JS syntax… as long as you consistently quote the keys (i.e. the unquoted key literals on lines 291–324 throw an error).
Another problem confounding this is that you have the event details defined in two places and this one is (currently) not being used, the one in contribute-carousel.js
is. It's possible to work around that and make it use the translatable one from this file. But you have to do all of the following:
- remove the
events
definition fromcontribute-carousel.js
- use
var
instead ofconst
- move the script tag for
contribute-carousel.js
below the one that definesevents
- plus fix the things with translatability I mentioned in the previous paragraph.
Since that's complicated, I've pushed a commit ( 1e6c237 ) that does all of that. But you probably want to look at the updated events list and confirm that it works.
Link check report. 579172 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Co-authored-by: Rome Reginelli <rome@ripple.com>
Link check report. 579172 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
Link check report. 579093 links checked. Preview: https://XRPLF.github.io/xrpl-dev-portal/pr-preview/community-page/ |
No description provided.