Browse Source

make a nice tagline, make the navbar look non-shit, move to 3 columns

instead of 4, make text wrap properly
master
wes 9 years ago
parent
commit
f2e2e26033
  1. 6
      Makefile
  2. 6
      src/scripts/class.tag
  3. 2
      src/scripts/results.tag
  4. 2
      src/scripts/row.tag
  5. 2
      src/scripts/search.tag
  6. 25
      src/styles/search.css
  7. 9
      src/templates/search.html

6
Makefile

@ -21,8 +21,8 @@ clean:
install: install:
$(MAKE) clean; $(MAKE) clean;
$(MAKE); $(MAKE);
rm -rf /srv/http/build/; rm -rf ${SRV_ROOT}build/;
cp -rT ./build /srv/http/build/; cp -rT ./build ${SRV_ROOT}build/;
cp -rT ./build/scripts/ ${SRV_ROOT}scripts/; cp -rT ./build/scripts/ ${SRV_ROOT}scripts/;
cp -rT ./build/styles/ ${SRV_ROOT}styles/; cp -rT ./build/styles/ ${SRV_ROOT}styles/;
cp search.ini /srv/http/build/; cp search.ini ${SRV_ROOT}build/;

6
src/scripts/class.tag

@ -1,8 +1,8 @@
<class> <class>
<div class="card-header"> <div class="card-header">
<div id='title'> { dept } { title } </div> <div class="text-center wraptext" id='title'> { dept } { title } </div>
<div id='prof'> { prof } </div> <div class="wraptext" id='prof'>Taught by: { prof } </div>
<div id='sem'> { sem } </div> <div class="wraptext" id='sem'>Running: { sem } </div>
</div> </div>
<div if={ books } class="card-body"> <div if={ books } class="card-body">
<button onclick={ makeShow(this) } class="btn btn-primary show-button"> <button onclick={ makeShow(this) } class="btn btn-primary show-button">

2
src/scripts/results.tag

@ -1,6 +1,6 @@
<results> <results>
<div class="courses container"> <div class="courses container">
<row class="columns" each={ rows } data="{ this }" classrow={ row }></row> <row class="course-row columns" each={ rows } data="{ this }" classrow={ row }></row>
</div> </div>
this.rows = []; this.rows = [];
var self = this; var self = this;

2
src/scripts/row.tag

@ -1,5 +1,5 @@
<row> <row>
<class class="course text-ellipsis text-justify rounded card column col-md-3" each="{ classrow }" data="{ this }"></class> <class class="course text-ellipsis text-justify rounded card column col-md-4" each="{ classrow }" data="{ this }"></class>
this.classrow = opts.classrow this.classrow = opts.classrow
</row> </row>

2
src/scripts/search.tag

@ -24,7 +24,7 @@ function submit(ev) {
$.getJSON("/search/fc?"+params, $.getJSON("/search/fc?"+params,
function(courses) { function(courses) {
var fcourses = filterCourses(courses); var fcourses = filterCourses(courses);
var cgroups = groupsof(4, fcourses); var cgroups = groupsof(3, fcourses);
results_passer.trigger("new_results", cgroups); results_passer.trigger("new_results", cgroups);
}); });
} }

25
src/styles/search.css

@ -2,6 +2,10 @@ header {
color: #1c75bc; color: #1c75bc;
} }
.wraptext {
white-space: pre-wrap !important;
}
.body { .body {
color: #1c75bc; color: #1c75bc;
} }
@ -16,14 +20,17 @@ a {
.courses { .courses {
margin-top: 100px; margin-top: 100px;
max-width: 85%; max-width: 75%;
} }
.course { .course {
margin-left: 5px !important; margin-left: 10px !important;
margin-right: 5px !important; margin-top: 20px !important;
margin-top: 5px !important; margin-right: 10px !important;
margin-bottom: 5px !important; }
.course-row {
margin-right: 50px !important;
} }
.search-form { .search-form {
@ -36,8 +43,8 @@ a {
} }
.form-item { .form-item {
margin-left: 15px; padding-left: 15px;
margin-right 15px; padding-right: 15px;
} }
#title { #title {
@ -105,9 +112,5 @@ a {
} }
.title-div { .title-div {
margin-right:1%;
margin-bottom: -3%;
margin-top:1%;
margin-left:30%;
font-size: 25px; font-size: 25px;
} }

9
src/templates/search.html

@ -2,15 +2,12 @@
{% block head %} {% block head %}
{{super()}} {{super()}}
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<header class="nav navbar"> <header class="text-center nav navbar">
<section class="navbar-section"> <section class="navbar-section">
<div class="title-div"> <div class="title-div">
<strong>Search For Books - by the <h1>TextBook Commons</h1>
<a href="https://mgoal.ca/blog" target="_blank">Guerilla Open Access League</a> <h5>Type in the name of your course and start saving money on your books</h5>
</strong>
</div> </div>
</section>
<section class="navbar-section">
<search class="search-form"></search> <search class="search-form"></search>
</section> </section>
</header> </header>

Loading…
Cancel
Save