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

Improvements to loaders and appearance #160

Merged
merged 3 commits into from
Nov 28, 2023
Merged
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
Binary file added simple_app/static/images/404image.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 simple_app/static/images/loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions simple_app/templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ <h2 class="display-3">Holdings</h2>
check out the <a href="https://github.com/SIMPLE-AstroDB/SIMPLE-db/wiki/Original-Notes" target="_blank">
archived running notes in the Wiki</a>.
</p>
<h3 class="display-5">Publications:</h3>
<p class="display-6">
<a href="https://zenodo.org/records/8048528" target="_blank">Cool Stars 2021 Poster</a><br>
<a href="https://zenodo.org/records/8414808" target="_blank">ADASS 2021 Poster</a>
</p>
<h2 class="display-3">Getting Involved</h2>
<p class="display-6">
If you'd like to take part or just stay in the loop as this project progresses,
Expand Down
4 changes: 4 additions & 0 deletions simple_app/templates/bad_request.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ <h2 class="display-3" style="text-align: center">Something went wrong!</h2>
<h3 class="display-6">Please send the above error code and what you were trying to do, to the
<a href="https://github.com/SIMPLE-AstroDB/SIMPLE-web/issues/new/choose" target="_blank">developers</a>.
</h3>
{% if e.code == 404 %}
<img src="{{ url_for('static', filename='images/404image.png') }}"
class="rounded img-fluid mx-auto d-block" alt="">
{% endif %}
</div>

{% endblock %}
7 changes: 7 additions & 0 deletions simple_app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
.dataTables_info,
.form-control.form-control-sm,
.form-select.form-select-sm {color: aliceblue !important;}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.spinner {
animation: spin 4s linear infinite;
}
</style>

{{ resources|safe }}
Expand Down
73 changes: 43 additions & 30 deletions simple_app/templates/full_text_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,40 @@ <h2 class="display-3">Exploring the Database</h2>
<button type="submit" class="btn btn-primary">Search</button>
</form>
</div>


<div id="loadingDiv" class="container align-items-center justify-content-center">
<div class="ml-auto align-items-center" role="status" aria-hidden="true">
<img src="{{ url_for('static', filename='images/loading.png') }}" class="spinner" alt="Loading">
<span class="sr-only">Loading...</span>
</div>
</div>

<div class="container" id="tables" style="display: none">
{% if query != '' and results|length > 0 %}
<h2 class="display-3"><a href="{{ url_for('create_files_for_multi_download') }}">
Results</a> for: {{ query|safe }}</h2>
{% else %}
<h2 class="display-3">Results for: {{ query|safe }}</h2>
{% endif %}
{% for tabname, df in results.items() %}
<div class="container table-responsive">
{% if query != '' %}
<h3 class="display-4"><a href="{{ url_for('create_file_for_full_download', key=tabname) }}">
{{ tabname|safe }}</a></h3>
{% else %}
<h3 class="display-4">{{ tabname|safe }}</h3>
{% endif %}
<p class="display-6">{{ df|safe }}</p>
</div>
{% endfor %}
{% if query != '' %}
<p class="display-6">Are we missing any expected data? Please open an
<a href="https://github.com/SIMPLE-AstroDB/SIMPLE-db/issues/new?assignees=&labels=data+ingestion&projects=&template=missing-source.md&title=Ingest+request%3A+%3Csource+name%3E" target="_blank">
issue</a>!</p>
{% endif %}
</div>

<script>
function delay(callback, ms) {
let timer = 0;
Expand Down Expand Up @@ -55,39 +89,18 @@ <h2 class="display-3">Exploring the Database</h2>
setCaretPosition(searchvalue, searchvalue.value.length);
};
</script>
<div class="container">
{% if query != '' and results|length > 0 %}
<h2 class="display-3"><a href="{{ url_for('create_files_for_multi_download') }}">
Results</a> for: {{ query|safe }}</h2>
{% else %}
<h2 class="display-3">Results for: {{ query|safe }}</h2>
{% endif %}
{% for tabname, df in results.items() %}
<div class="container table-responsive">
{% if query != '' %}
<h3 class="display-4"><a href="{{ url_for('create_file_for_full_download', key=tabname) }}">
{{ tabname|safe }}</a></h3>
{% else %}
<h3 class="display-4">{{ tabname|safe }}</h3>
{% endif %}
<p class="display-6">{{ df|safe }}</p>
</div>
{% endfor %}
{% if query != '' %}
<p class="display-6">Are we missing any expected data? Please open an
<a href="https://github.com/SIMPLE-AstroDB/SIMPLE-db/issues/new?assignees=&labels=data+ingestion&projects=&template=missing-source.md&title=Ingest+request%3A+%3Csource+name%3E" target="_blank">
issue</a>!</p>
{% endif %}
</div>
<script>
$(document).ready(function() {
$("table").each(function() {
$(this).DataTable( {
responsive: true,
autoWidth: false
$('#loadingDiv').hide();
$('#tables').show().promise().done(function () {
$("table").each(function() {
$(this).DataTable( {
responsive: true,
autoWidth: false
});
});
});
}
})
}
);
</script>

Expand Down
6 changes: 4 additions & 2 deletions simple_app/templates/load_fulltext.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

<div class="container">
<div id="loadingDiv" class="d-flex align-items-center">
<strong>Loading...</strong>
<div class="spinner-border ml-auto" role="status" aria-hidden="true" style="float: right"></div>
<div class="ml-auto align-items-center" role="status" aria-hidden="true">
<img src="{{ url_for('static', filename='images/loading.png') }}" class="spinner" alt="Loading">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>

Expand Down
6 changes: 4 additions & 2 deletions simple_app/templates/load_multi_plot.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

<div class="container">
<div id="loadingDiv" class="d-flex align-items-center">
<strong>Loading...</strong>
<div class="spinner-border ml-auto" role="status" aria-hidden="true" style="float: right"></div>
<div class="ml-auto align-items-center" role="status" aria-hidden="true">
<img src="{{ url_for('static', filename='images/loading.png') }}" class="spinner" alt="Loading">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>

Expand Down
6 changes: 4 additions & 2 deletions simple_app/templates/load_solo.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

<div class="container">
<div id="loadingDiv" class="d-flex align-items-center">
<strong>Loading...</strong>
<div class="spinner-border ml-auto" role="status" aria-hidden="true" style="float: right"></div>
<div class="ml-auto align-items-center" role="status" aria-hidden="true">
<img src="{{ url_for('static', filename='images/loading.png') }}" class="spinner" alt="Loading">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions simple_app/templates/solo_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ <h2 class="display-3"><a href="{{ url_for('create_file_for_download', key='Sourc
</p>
{% endif %}
</div>

<div class="row">
<div class="col-md-6 table-responsive">
{% if everything.names %}
Expand Down
Loading