-
Notifications
You must be signed in to change notification settings - Fork 310
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
Improved resilience by outputting more data in the HTML #139
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
46d31d6
Individual dataset pages viewable without JS.
dracos 7b71d0f
Organization pages now show data without JS.
dracos e8e2358
Correct an if statement.
dracos 1267c8b
Only show search filter if JS enabled.
dracos 5372e81
Datasets page works better without JavaScript.
dracos 5b4bf87
Merge branch 'gh-pages' into dracos-improved-resilience
timwis a5fc771
Use group_by filter to group organization filter on datasets page
timwis File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% assign sizes = '' | split: "" %} | ||
{% for category in include.categories %} | ||
{% assign c = site.datasets | where:"category", category | size %} | ||
{% assign sizes = sizes | push: c %} | ||
{% endfor %} | ||
{% assign sorted_sizes = sizes | sort | reverse | uniq %} | ||
{% for s in sorted_sizes %} | ||
{% for category in include.categories %} | ||
{% assign c = sizes[forloop.index0] %} | ||
{% if c == s %} | ||
<span class="list-group-item"> | ||
<li class="d-flex justify-content-between align-items-center"> | ||
{{ category }} | ||
<span class="badge badge-primary badge-pill">{{ s }}</span> | ||
</li> | ||
</span> | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% for org in include.organizations %} | ||
<a href="{{ site.baseurl }}{{ org.url }}" class="list-group-item"> | ||
<li class="d-flex justify-content-between align-items-center"> | ||
{{ org.name }} | ||
<span class="badge badge-primary badge-pill">{{ org.size }}</span> | ||
</li> | ||
</a> | ||
{% endfor %} |
This file contains 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
{ | ||
"title": {{ dataset.title | jsonify }}, | ||
"organization": {{ dataset.organization | jsonify }}{% if dataset.notes != "" %}, | ||
"notes": {{ dataset.notes | jsonify }}{% endif %}{% if dataset.notes != "" %}, | ||
"notes": {{ dataset.notes | jsonify }}{% endif %}{% if dataset.category != "" %}, | ||
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. Good catch! |
||
"category": {{ dataset.category | jsonify }}{% endif %}, | ||
"url": "{{ site.baseurl }}{{ dataset.url }}" | ||
}{% unless forloop.last %},{% endunless %}{% endfor %} | ||
|
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.
You can also use the Element.classList api via
document.documentElement.classList.replace('no-js', 'js')
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.
I don't know what your browser support level is, but
replace()
was only added in Chrome 61, and isn't in Edge or Safari.classList
itself is IE10+, and speaking only for myself I still have to support older than that sometimes. Seems like given it's easy to do here and clear what's happening, not sure there's a benefit to usingclassList
.