Skip to content

Commit

Permalink
Merge pull request #70 from brauliorivas/feat/new-filters
Browse files Browse the repository at this point in the history
Add new filters for other collections
  • Loading branch information
kjvbrt authored Aug 9, 2024
2 parents e572361 + 3e4e4d2 commit 4ba0b9b
Show file tree
Hide file tree
Showing 53 changed files with 2,096 additions and 1,080 deletions.
82 changes: 82 additions & 0 deletions css/clean-switch.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#toggles {
margin-bottom: 10px;
}
.toggle {
display: flex;
justify-content: space-between;
max-width: 100%;
padding-right: 12px;
}

/*
https://miladd3.github.io/clean-switch/
MIT License
*/
.cl-switch input[type="checkbox"] {
display: none;
visibility: hidden;
}
.switcher {
display: inline-block;
border-radius: 100px;
width: 35px;
height: 15px;
background-color: #ccc;
position: relative;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
vertical-align: middle;
}
.switcher {
cursor: pointer;
}
.switcher:before {
content: "";
display: block;
width: 20px;
height: 20px;
background-color: #fff;
border-radius: 50%;
margin-top: -2.5px;
position: absolute;
top: 0;
left: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin-right: 0;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
}
.switcher:active:before {
transition: all, 0.1s;
}
.toggle-label {
font-family: sans-serif;
font-size: 16px;
vertical-align: middle;
}
.cl-switch input[type="checkbox"]:checked + .switcher {
background-color: #8591d5;
}
.cl-switch input[type="checkbox"]:checked + .switcher:before {
left: 100%;
margin-left: -20px;
background-color: #3f51b5;
}
.cl-switch [disabled]:not([disabled="false"]) + .switcher {
background: #ccc !important;
}
.cl-switch [disabled]:not([disabled="false"]) + .switcher:before {
background-color: #e2e2e2 !important;
}
.cl-switch.cl-switch-black input[type="checkbox"]:checked + .switcher {
background-color: #676767;
}
.cl-switch.cl-switch-black input[type="checkbox"]:checked + .switcher:before {
background-color: #343434;
}
1 change: 1 addition & 0 deletions css/event.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
transform: translateX(-50%);
background-color: #e1e1e1;
padding: 5px 10px;
border: 1px solid #000;
border-radius: 5px;
}

Expand Down
139 changes: 125 additions & 14 deletions css/filter.css
Original file line number Diff line number Diff line change
@@ -1,49 +1,160 @@
#filter {
min-width: 100px;
#filters {
display: none;
position: fixed;
flex-direction: column;
background-color: #e1e1e1;
border-radius: 5px;
border: 1px solid #000;
padding: 10px;
top: 10px;
right: 10px;
z-index: 1;
width: 300px;
max-height: 65vh;
padding: 10px;
background-color: #e1e1e1;
border-radius: 5px;
border: 1px solid #000;
}

#filter-header {
#filters-header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
max-height: 5vh;
}

#filters-title {
font-weight: bold;
}

#filter-button {
#filters-content {
width: 100%;
}

#filter-menu-handler {
cursor: pointer;
width: 20px;
height: 20px;
}

#close-filter {
display: none;
}

#filter-content {
#filters-body {
display: none;
flex-direction: column;
align-items: center;
margin-top: 10px;
overflow-y: auto;
max-height: 60vh;
padding-right: 5px;
}

#filters {
#filters-body::-webkit-scrollbar {
width: 7px;
}

#filters-body::-webkit-scrollbar-track {
background: #e1e1e1;
border-radius: 5px;
}

#filters-body::-webkit-scrollbar-thumb {
background: #afafaf;
border-radius: 5px;
}

#filters-body::-webkit-scrollbar-thumb:hover {
background: #858585;
}

#invert-filters-section {
font-style: italic;
display: flex;
flex-direction: column;
padding: 10px 0;
flex-direction: row;
}

#filters-buttons {
margin-top: 10px;
width: fit-content;
}

.filter-action {
font-weight: 500;
padding: 5px;
margin: 0 5px;
border-radius: 5px;
font-weight: 500;
border: 1px solid #000;
}

.filter-action:hover {
background-color: #c5c5c5;
}

.filter-collection-title {
font-weight: bold;
text-align: center;
margin: 5px 0;
}

.filter-collection-subtitle {
font-weight: 500;
}

.range-input {
width: 45px;
margin: 0 5px;
padding: 4px;
border-radius: 3px;
border: 1px solid #000;
text-align: center;
}

.range-input:focus-visible {
outline: none;
}

.filter-collection-container {
width: 100%;
display: flex;
flex-direction: column;
margin-bottom: 10px;
}

.range-filter {
margin: 4px 0;
display: grid;
align-items: center;
grid-template-columns: 1fr 140px 40px;
}

.range-inputs {
display: flex;
flex-direction: row;
justify-content: space-between;
}

.range-unit {
text-align: right;
}

.filter-sub-container {
padding: 5px 0;
}

.filter-checkbox-container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

.checkbox-title-container {
display: flex;
flex-direction: row;
padding: 2px;
background-color: #c5c5c5;
border-radius: 5px;
margin: 2px;
}

.filter-checkbox {
margin: 2px;
}
8 changes: 4 additions & 4 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ body {
font-size: 16px;
}

.manipulation-tool {
display: none;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
Expand All @@ -30,3 +26,7 @@ button {
background: none;
padding: 0;
}

#input-file {
cursor: pointer;
}
73 changes: 0 additions & 73 deletions css/toggle.css

This file was deleted.

Loading

0 comments on commit 4ba0b9b

Please sign in to comment.