Event Filters

Example


Code

HTML

<aside class="event-filters">
  <header>
    <img src="/icons/filter.svg" aria-hidden="true" alt="filter icon" /> Filter
    Events
  </header>
  <div class="filters">
    <p>
      Use the filters and search below to find an upcoming event. The
      UM-Dearborn campus community can <a href="#">submit events</a> to post on
      this calendar, or visit <a href="#">VictorsLink</a> for more on student
      activities and organizations.
    </p>
    <hr />
    <form action="#">
      <label for="search-filter"
        >Search for events by keyword or date range</label
      >
      <input
        type="text"
        id="search-filter"
        class="form-control"
        placeholder="enter search"
      />
      <label for="start">Start date:</label>
      <input
        type="date"
        id="start"
        class="form-control"
        placeholder="mm-dd-yyyy"
        name="date"
        value="2019-09-09"
        min="2018-01-01"
        max="2025-12-31"
      />
      <label for="end">Start date:</label>
      <input
        type="date"
        id="end"
        class="form-control"
        placeholder="mm-dd-yyyy"
        name="date"
        value=""
        min="2019-09-09"
        max="2025-12-31"
      />
      <div class="btn-group">
        <button class="button blue" type="reset">Apply</button>
        <button class="button grey" type="submit">Clear</button>
      </div>
      <div class="pill-header">You have selected:</div>
      <div class="pills">
        <a href="#" class="pill">
          Workshop/Training
          <svg
            width="22"
            height="22"
            viewBox="0 0 22 22"
            xmlns="http://www.w3.org/2000/svg"
          >
            <g
              transform="translate(1 1)"
              stroke-width="2"
              fill="none"
              fill-rule="evenodd"
              stroke-linecap="round"
              stroke-linejoin="round"
            >
              <circle stroke="#FAFAFA" fill="#FAFAFA" cx="10" cy="10" r="10" />
              <path d="M13 7l-6 6M7 7l6 6" stroke="#00274C" />
            </g>
          </svg>
        </a>
        <a href="#" class="pill">
          Staff
          <svg
            width="22"
            height="22"
            viewBox="0 0 22 22"
            xmlns="http://www.w3.org/2000/svg"
          >
            <g
              transform="translate(1 1)"
              stroke-width="2"
              fill="none"
              fill-rule="evenodd"
              stroke-linecap="round"
              stroke-linejoin="round"
            >
              <circle stroke="#FAFAFA" fill="#FAFAFA" cx="10" cy="10" r="10" />
              <path d="M13 7l-6 6M7 7l6 6" stroke="#00274C" />
            </g>
          </svg>
        </a>
        <a href="#" class="pill">
          Free Food
          <svg
            width="22"
            height="22"
            viewBox="0 0 22 22"
            xmlns="http://www.w3.org/2000/svg"
          >
            <g
              transform="translate(1 1)"
              stroke-width="2"
              fill="none"
              fill-rule="evenodd"
              stroke-linecap="round"
              stroke-linejoin="round"
            >
              <circle stroke="#FAFAFA" fill="#FAFAFA" cx="10" cy="10" r="10" />
              <path d="M13 7l-6 6M7 7l6 6" stroke="#00274C" />
            </g>
          </svg>
        </a>
      </div>
      <div class="lists">
        <section>
          <h3>Event Type</h3>
          <ul>
            <li>
              <input type="checkbox" id="career-network" /><label
                for="career-network"
                >Career / Networking (6)</label
              >
            </li>
            <li>
              <input type="checkbox" id="workshop" /><label for="workshop"
                >Workshop / Training (4)</label
              >
            </li>
            <li>
              <input type="checkbox" id="info-sess" /><label for="info-sess"
                >Information Session (3)</label
              >
            </li>
            <li>
              <input type="checkbox" id="presentation" /><label
                for="presentation"
                >Presentation (3)</label
              >
            </li>
            <li>
              <input type="checkbox" id="open-house" /><label for="open-house"
                >Open House (1)</label
              >
            </li>
            <li class="container">
              <input type="checkbox" id="check_id" />
              <label class="more-less" for="check_id"></label>
              <ul>
                <li>
                  <input type="checkbox" id="2354657" /><label for="2354657"
                    >Surprise Networking (1)</label
                  >
                </li>
                <li>
                  <input type="checkbox" id="456657" /><label for="456657"
                    >Surprise Session (1)</label
                  >
                </li>
                <li>
                  <input type="checkbox" id="8975647" /><label for="8975647"
                    >Surprise House (1)</label
                  >
                </li>
                <li>
                  <input type="checkbox" id="545454554" /><label for="545454554"
                    >Surprise Training (&infin;)</label
                  >
                </li>
              </ul>
            </li>
          </ul>
        </section>
      </div>
    </form>
  </div>
</aside>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178

CSS

aside.event-filters {
  background-color: #fafafa;
  -webkit-box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.1);
  box-shadow: 1px 1px 0 0 rgba(0, 0, 0, 0.1);
  color: #131516;
}
aside.event-filters header {
  color: #fafafa;
  background-color: #00274c;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  padding: 0.6875rem 1.25rem;
}
aside.event-filters .filters {
  padding: 0.6875rem 1.25rem;
}
aside.event-filters .filters p {
  font-size: 0.875rem;
  line-height: 1.618;
}
aside.event-filters .filters p a {
  text-decoration: underline;
}
aside.event-filters .filters form {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}
aside.event-filters .filters label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  letter-spacing: -0.12px;
  line-height: 18px;
}
aside.event-filters .filters input.form-control {
  background-color: #fafafa;
  border: 1px solid #e6e6e6;
  color: #131516;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  margin-bottom: 1.5rem;
  padding: 0.9375rem 0 0.9375rem 1.25rem;
}
aside.event-filters .filters input.form-control:focus {
  border: 1px solid #c0c0c0;
  outline-width: 0;
}
aside.event-filters .filters .btn-group {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  margin-bottom: 2.5rem;
}
aside.event-filters .filters button {
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 0.9375rem 1.875rem;
  text-align: center;
  text-transform: uppercase;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  width: 46.25%;
}
@media screen and (max-width: 39.9375em) {
  aside.event-filters .filters button {
    width: 100%;
  }
}
aside.event-filters .filters button.blue {
  background: #00274c;
  border: 1px solid #04192d;
  color: #fafafa;
}
aside.event-filters .filters button.grey {
  background: #97a6b4;
  border: 1px solid transparent;
  color: #131516;
}
aside.event-filters .filters button.blue:hover,
aside.event-filters .filters button.blue:focus {
  background: #ffcb05;
  border: 1px solid #ffcb05;
  color: #00274c;
}
aside.event-filters .filters button.grey:hover,
aside.event-filters .filters button.grey:focus {
  background: #131516;
  border: 1px solid #131516;
  color: #fafafa;
}
aside.event-filters .filters .pill-header {
  font-size: 0.75rem;
  margin-bottom: 0.625rem;
}
aside.event-filters .filters .pills {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
}
aside.event-filters .filters .pills .pill {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  background: #00274c;
  border: 1px solid #02182e;
  border-radius: 100px;
  color: #fafafa;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 0.625rem;
  opacity: 0.9;
  padding: 0.625rem;
  -webkit-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
}
aside.event-filters .filters .pills .pill:hover,
aside.event-filters .filters .pills .pill:focus {
  background: #9b301c;
  border: 1px solid #932e1b;
}
aside.event-filters .filters .pills .pill:hover svg path,
aside.event-filters .filters .pills .pill:focus svg path {
  stroke: #9b301c;
}
aside.event-filters .filters .pills .pill svg {
  margin-left: 0.625rem;
}
aside.event-filters .filters .lists h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 24px;
}
aside.event-filters .filters .lists ul {
  list-style: none;
  margin-bottom: 2rem;
  padding: 0;
}
aside.event-filters .filters .lists label {
  color: #1c5184;
  cursor: pointer;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.875rem;
  line-height: 1.5;
  margin-left: 0.625rem;
}
aside.event-filters .filters .lists .container {
  height: auto;
  position: relative;
}
aside.event-filters .filters .lists .container [type='checkbox']#check_id {
  position: absolute;
  left: -9999px;
}
aside.event-filters .filters .lists .container .more-less {
  display: block;
  line-height: 1;
  margin-top: 10px;
  position: relative;
  width: 100%;
}
aside.event-filters .filters .lists .container .more-less:before,
aside.event-filters .filters .lists .container .more-less:after {
  position: absolute;
}
aside.event-filters .filters .lists .container .more-less:before {
  background-image: url("data:image/svg+xml,%0A%3Csvg width='13px' height='13px' viewBox='0 0 13 13' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg id='The-Difference-theme' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Events' transform='translate(-155.000000, -1751.000000)'%3E%3Cg id='filter-bar' transform='translate(135.000000, 874.000000)'%3E%3Cg id='Group-9' transform='translate(20.000000, 682.000000)'%3E%3Cg id='plus-square' transform='translate(0.000000, 195.000000)'%3E%3Crect id='Rectangle' stroke='%231C5184' fill='%231C5184' x='0.5' y='0.5' width='12' height='12' rx='1.44444444'%3E%3C/rect%3E%3Cpath d='M6.5,3.61111111 L6.5,9.38888889' id='Path' stroke='%23FAFAFA' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3Cpath d='M3.61111111,6.5 L9.38888889,6.5' id='Path' stroke='%23FAFAFA' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  content: '';
  height: 13px;
  left: -7px;
  width: 13px;
}
aside.event-filters .filters .lists .container .more-less:after {
  content: 'View all';
  font-weight: 700;
  left: 19px;
}
aside.event-filters .filters .lists .container [type='checkbox']#check_id ~ ul {
  width: 100%;
  display: none;
}
aside.event-filters
  .filters
  .lists
  .container
  [type='checkbox']#check_id:checked
  ~ ul {
  display: block;
}
aside.event-filters
  .filters
  .lists
  .container
  [type='checkbox']#check_id:checked
  + .more-less {
  position: absolute;
  top: 100%;
}
aside.event-filters
  .filters
  .lists
  .container
  [type='checkbox']#check_id:checked
  + .more-less:before {
  background-image: url("data:image/svg+xml,%0A%3Csvg width='13px' height='13px' viewBox='0 0 13 13' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Cg stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='Events' transform='translate(-155.000000, -2293.000000)'%3E%3Cg id='filter-bar' transform='translate(135.000000, 874.000000)'%3E%3Cg id='Group-9-Copy' transform='translate(20.000000, 914.000000)'%3E%3Cg id='plus-square' transform='translate(0.000000, 505.000000)'%3E%3Crect id='Rectangle' stroke='%231C5184' fill='%231C5184' x='0.5' y='0.5' width='12' height='12' rx='1.44444444'%3E%3C/rect%3E%3Cpath d='M3.61111111,6.5 L9.38888889,6.5' id='Path' stroke='%23FAFAFA' stroke-linecap='round' stroke-linejoin='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  content: '';
}
aside.event-filters
  .filters
  .lists
  .container
  [type='checkbox']#check_id:checked
  + .more-less:after {
  content: 'View less';
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239