_navbar.html.erb 2.98 KB
Newer Older
Zac Wood's avatar
Zac Wood committed
1
2
3
4
5
6
7
8
<!-- <div id="navbar" class="container-fluid">
     <div class="row align-left align-sm-center align-md-right" id="navbar">
     <div class="col align-center">
     <div class="center-vert">
     <a href="/" id="logo">
     <i class="fas fa-calendar-alt"></i>
     Schedules
     </a>
Zac Wood's avatar
Zac Wood committed
9

Zac Wood's avatar
Zac Wood committed
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
     </div>
     </div>

     <div class="col-sm align-center order-0 order-sm-1">
     <a id="cart-button" href="<%= schedule_path %>">
     <h1>
     <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>
     </span>
     </span>
     </h1>
     </a>
     </div>

     <div class="col order-1 order-sm-0">
     <form action="/search" class="form">
     <div class="input-group" style="width:100%;">
     <input
     id="searchbar"
     value="<%= params[:query] %>"
     name="query"
     type="text"
     class="form-control"
     placeholder="Search course or professor..."
     aria-describedby="basic-addon2"
     autocomplete="off"
     >
     <div class="input-group-append">
     <button type="submit" class="btn btn-secondary" type="button">
     <i class="fas fa-search"></i>
     </button>
     </div>
     </div>
     </form>
     </div>
     </div>
     </div> -->


<nav class="navbar navbar-expand-lg navbar-dark" style="background-color: #006633">
    <div class="container">
	<a class="navbar-brand mb-0 h1" href="/">
	    <i class="fas fa-calendar-alt"></i>
	    Schedules
	</a>
	<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
	    <span class="navbar-toggler-icon"></span>
	</button>
Zac Wood's avatar
Zac Wood committed
63

Zac Wood's avatar
Zac Wood committed
64
65
66
67
68
	<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
	    <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
		<li class="nav-item">
		    <a href="/schedule" class="nav-link">Your Schedule (<span id="cart-counter"><%= @cart.length %></span>)</a>
		</li>
Zac Wood's avatar
Zac Wood committed
69
70
71
		<li class="nav-item">
		    <a href="/about" class="nav-link">About Schedules</a>
		</li>
Zac Wood's avatar
Zac Wood committed
72
73
74
	    </ul>
	    
	    <form action="/search" class="form-inline">
Zac Wood's avatar
Zac Wood committed
75
76
77
78
79
80
81
82
83
84
85
		<select id="semester-select" class="custom-select">
		    <% Semester.all.each do |semester| %>
			<option
			    value="<%= semester.id %>"
			    <% if @semester == semester %> selected <% end %>
			>
			    <%= "#{semester.season} #{semester.year}" %>
			</option>
		    <% end %>
		</select>

Zac Wood's avatar
Zac Wood committed
86
87
		<input
		    id="searchbar"
Zac Wood's avatar
Zac Wood committed
88
89
90
91
			value="<%= params[:query] %>"
			name="query"
			type="text"
			class="form-control"
Zac Wood's avatar
Zac Wood committed
92
			placeholder="Search course or professor..."
Zac Wood's avatar
Zac Wood committed
93
94
			aria-describedby="basic-addon2"
			autocomplete="off"
Zac Wood's avatar
Zac Wood committed
95
		>
Zac Wood's avatar
Zac Wood committed
96
		
Zac Wood's avatar
Zac Wood committed
97
		<button class="btn btn-secondary my-2 my-sm-0" type="submit">Search</button>
Zac Wood's avatar
Zac Wood committed
98
	    </form>
Zac Wood's avatar
Zac Wood committed
99
	    
Zac Wood's avatar
Zac Wood committed
100
101
	</div>
    </div>
Zac Wood's avatar
Zac Wood committed
102
</nav>