Skip to content

Commit

Permalink
Update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
tnaccarato committed Aug 14, 2024
1 parent c6b43c4 commit 061cd40
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 33 deletions.
11 changes: 11 additions & 0 deletions vis_phewas/static/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,15 @@
button{
text-shadow: 1px 0 3px black;
color: white; !important;
}

.btn-info.dataAction.btn {
background-color: #a043e1 !important;
border-color: #a043e1 !important;
border-radius: 20px !important;
}

.btn-info.dataAction.btn:hover {
background-color: #7a2cbf !important;
border-color: #7a2cbf !important;
}
12 changes: 1 addition & 11 deletions vis_phewas/static/mainapp/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ html, body, .container-fluid {
height: 100%;
z-index: 1; /* Set a lower z-index to ensure it's below the options tab */
position: relative; /* Ensure it follows the stacking context */
background-color: aliceblue;
background-color: #d4e9fb;
}

.right-column {
Expand Down Expand Up @@ -351,14 +351,4 @@ input:checked + .slider:before {

.toggle-button .down {
transform: rotate(0deg);
}

.btn-info{
background-color: #a043e1 !important;
border-color: #a043e1 !important;
}

.btn-info:hover{
background-color: #7a2cbf !important;
border-color: #7a2cbf !important;
}
2 changes: 1 addition & 1 deletion vis_phewas/templates/mainapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<button class="button btn btn-success applyFilters" onclick="applyFilters()">
Apply Filters
</button>
<button class="button btn btn-info exportQuery" style="color: white" onclick="exportQuery()">
<button class="button btn btn-info dataAction exportQuery" style="color: white" onclick="exportQuery()">
Export Filtered Data
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions vis_phewas/templates/mainapp/tools.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ <h4>Resolution</h4>

<div id="som_options" style="align-items: center; display: flex; flex-direction: column">
<h4>Generate SOM for Disease Clustering</h4>
<button class="button btn btn-info" onclick="generateSOM('', 'disease', 5)" style="color: white; margin-bottom: 1%">Generate Disease SOM</button>
<button class="button btn btn-info" onclick="generateSOM('', 'allele', 7)" style="color: white; background-color: ">Generate Allele SOM</button>
<button class="button btn btn-info dataAction" onclick="generateSOM('', 'disease', 5)" style="color: white; margin-bottom: 1%">Generate Disease SOM</button>
<button class="button btn btn-info dataAction" onclick="generateSOM('', 'allele', 7)" style="color: white;">Generate Allele SOM</button>
</div>
</div>

22 changes: 3 additions & 19 deletions vis_phewas/templates/som/som_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ <h2 style="align-self: center">Filter by Disease Category</h2>
<div class="checkbox-container">
{% for category in categories %}
<input type="checkbox" id="{{ category }}" name="filters" value="{{ category }}"
{% if category in filters %} checked {% endif %}>
{% if category in cleaned_filters %} checked {% endif %}>
<!-- Check the checkbox if it is in the selected filters -->
<label for="{{ category }}">{{ category }}</label>
{% endfor %}
Expand All @@ -53,11 +53,11 @@ <h2 style="align-self: center">Filter by Disease Category</h2>
<div style="display: flex;flex-direction: row;justify-content: space-around;margin-top: 10px;">

<!-- Add a button to submit the form -->
<button type="submit" class="button btn btn-success" style="align-self: normal;">
<button type="submit" class="button btn btn-success" style="align-self: normal; border-radius: 20px">
Generate SOM with Selection
</button>
<!-- Add a button to download the cluster results CSV -->
<button class="button btn btn-info" type="button">
<button class="btn btn-info dataAction" type="button">
<a style="text-decoration: none;color: whitesmoke;text-shadow: 1px 0 3px black;" href="{{ csv_path }}" download="cluster_results.csv">Download Cluster Results CSV</a>
</button>
</div>
Expand Down Expand Up @@ -86,22 +86,6 @@ <h2 style="align-self: center">Filter by Disease Category</h2>
return encodeURIComponent(joinedFilters);
}

// Function to load selected filters from localStorage on page load
function loadSelectedFilters() {
const selectedFilters = JSON.parse(localStorage.getItem('selectedFilters'));
if (selectedFilters) {
selectedFilters.forEach((filter) => {
const category = filter.replace('category_string:==:', '');
const checkbox = document.getElementById(category);
if (checkbox) {
checkbox.checked = true;
}
});
}
}

// Call the function to load selected filters on page load
document.addEventListener('DOMContentLoaded', loadSelectedFilters);

// Function to handle form submission
function handleSubmit(event) {
Expand Down

0 comments on commit 061cd40

Please sign in to comment.