_navbar.html.erb 1.7 KB
Newer Older
1
<div id="navbar" class="container-fluid">
Zac Wood's avatar
Zac Wood committed
2
    <div class="row align-left align-sm-center align-md-right" id="navbar">
3
	<div class="col align-center">
Zac Wood's avatar
Zac Wood committed
4
	    <div class="center-vert">
Zac Wood's avatar
Zac Wood committed
5
6
7
8
		<a href="/" id="logo">
		    <i class="fas fa-calendar-alt"></i>
		    Schedules
		</a>
9
		<select id="semester-select" class="custom-select">
Zac Wood's avatar
Zac Wood committed
10
		    <% Semester.all.each do |semester| %>
11
12
13
14
			<option
			    value="<%= semester.id %>"
			    <% if @semester == semester %> selected <% end %>
			>
Zac Wood's avatar
Zac Wood committed
15
16
17
			    <%= "#{semester.season} #{semester.year}" %>
			</option>
		    <% end %>
Zac Wood's avatar
Zac Wood committed
18
		</select>
Zac Wood's avatar
Zac Wood committed
19
	    </div>
Zac Wood's avatar
Zac Wood committed
20
21
	</div>

22
23
	<div class="col-sm align-center order-0 order-sm-1">
	    <a id="cart-button" href="<%= schedule_path %>">
24
		<h1>
25
26
27
28
29
30
31
		    <span class="fa-layers fa-fw" id="schedule-icon">
			<i class="fas fa-shopping-cart"></i>
			<span class="fa-layers fa-fw">
			    <i class="fas fa-circle" data-fa-transform="shrink-3 up-12 right-12" style="color:gray"></i>
			    <span id="course-counter" class="fa-layers-text fa-inverse" data-fa-transform="shrink-10 up-12 right-12" style="font-weight:600">
				<%= @cart.length %>
			    </span>
Zac Wood's avatar
Zac Wood committed
32
33
			</span>
		    </span>
34
35
		</h1>
	    </a>
Zac Wood's avatar
Zac Wood committed
36
	</div>
Zac Wood's avatar
Zac Wood committed
37

38
	<div class="col order-1 order-sm-0">
Zach Perkins's avatar
Zach Perkins committed
39
	    <form action="/search" class="form">
Zac Wood's avatar
Zac Wood committed
40
		<div class="input-group" style="width:100%;">
Zac Wood's avatar
Zac Wood committed
41
42
43
44
45
46
		    <input
			id="searchbar"
			value="<%= params[:query] %>"
			name="query"
			type="text"
			class="form-control"
Zac Wood's avatar
Zac Wood committed
47
			placeholder="Search course or professor..."
Zac Wood's avatar
Zac Wood committed
48
49
50
			aria-describedby="basic-addon2"
			autocomplete="off"
		    >
Zac Wood's avatar
Zac Wood committed
51
		    <div class="input-group-append">
52
			<button type="submit" class="btn btn-secondary" type="button">
Zac Wood's avatar
Zac Wood committed
53
54
			    <i class="fas fa-search"></i>
			</button>
Zac Wood's avatar
Zac Wood committed
55
		    </div>
Zac Wood's avatar
Zac Wood committed
56
57
58
59
60
		</div>
	    </form>
	</div>
    </div>
</div>