Browse Source

Merge branch 'master' of github.com:finalsclubdev/FinalsClub

Joseph Snow 8 years ago
parent
commit
981d956dd6

+ 195 - 1
public/assets/css/screen.css

@@ -314,7 +314,9 @@ body {
     margin-bottom: 0; }
 
 .content {
-  background-color: #fff; }
+  background-color: #fff;
+  padding: 1em 3%;
+  min-height: 25em; }
 
 /* 2.`navigation
 ============================================== */
@@ -569,3 +571,195 @@ body {
 
 .centered-rt-parent {
   margin: 0 auto; }
+
+
+
+
+#messages {
+	text-align:  center;
+	background: #adf;
+	color: black;
+	font-weight: bold;
+	padding: 0.5em 0;
+}
+
+div.school {
+
+	cursor: pointer; cursor: hand;
+	margin: 1%; 
+	padding: 2%;
+	border: solid 1px #888;
+	-moz-border-radius: 0.20em;
+	-webkit-border-radius: 0.20em;
+	-webkit-box-shadow: 0 0.2em 0.3em rgba(0, 0, 0, .1);
+	-moz-box-shadow: 0 0.2em 0.3em rgba(0, 0, 0, .1);
+	/*
+	*/
+}
+
+div.school div.name {
+	font-weight: bold;
+	font-size: 120%;
+	margin: 0 0;
+}
+
+div.school div.desc {
+	font-size: 90%;
+	color: #888;
+	font-style: italic;
+	margin: 0 0;
+}
+
+
+div.course {
+	margin: 1em 0;
+}
+
+
+div.press {
+	margin: 2em 0;
+}
+img.press {
+	height: 2.5em;
+	float: left;
+	zborder: solid 1px #aaa;
+	margin: 0 2em 1em 0;
+}
+
+div.press p.date {
+	font-size: 90%;
+	color: #68a;
+}
+
+div.press p.readmore {
+	font-size: 90%;
+	font-style: italic;
+}
+
+div.press p.readmore a {
+	color: #48c;
+}
+
+div.conduct { text-align: center; }
+div.conduct p.academic {
+	padding: 2em 0;
+}
+div.conduct img {
+	display: inline;
+	padding: 20px; 
+	border: solid 1px #888;
+	background: -webkit-gradient(linear, left top, left bottom, from(#fdfdfd), to(#f8f8f8));
+	background: -moz-linear-gradient(top,  #fdfdfd,  #f8f8f8);
+	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcff', endColorstr='#f4f4ff');
+	-webkit-border-radius: .2em; 
+	-moz-border-radius: .2em;
+	border-radius: .2em;
+	-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.5);
+	-moz-box-shadow: 0 1px 2px rgba(0,0,0,.5);
+	box-shadow: 0 1px 2px rgba(0,0,0,.5);
+}
+div.conduct p.vague {
+	font-style: italic;
+	font-size: 80%;
+	color: #888;
+}
+
+
+
+.row {
+	display: table-row;
+}
+.row .label {
+	width: 50%;
+	text-align: right;
+	display: table-cell;
+	padding: 0.8em 3% 0.8em 0%;
+	white-space: nowrap;
+	font-weight: bold;
+}
+.row .field {
+	width: 300px;
+
+	display: table-cell;
+	padding: 0.2em 0;
+}
+.row .field input {
+	width: 90%;
+}
+
+div.content h1 {
+	color: #000;
+	text-align: left;
+	font-weight: bold;
+	font-family: Georgia, Helvetica;
+}
+
+.content h1 {
+	border-bottom: 2px solid #5c6572;
+	zbackground: transparent url("/images/bg_main-heading.gif") 0 100% repeat-x;
+	font-family: Georgia, helvetica;
+	font-weight: normal;
+	font-size: 140%;
+	padding: 0.2em 0;
+	margin-bottom: 1em;
+}
+
+.note, .notes_instructor, .notes_head {
+	margin: 1.0em 0;
+}
+
+.notes_head {
+	font-weight: bold;
+}
+
+.notes_instructor, .notes_head {
+	color: #888;
+}
+
+.notes_instructor {
+	padding-bottom: 1.0em;
+	border-bottom: solid 1px #aaa;
+}
+
+.note .name {
+	font-size: 110%;
+}
+.note .visits {
+	font-style: italic;
+	color: #aaa;
+}
+
+
+.lecture, .lectures_instructor, .lectures_head {
+	margin: 1.0em 0;
+}
+
+.lectures_head {
+	font-weight: bold;
+}
+
+.lectures_instructor, .lectures_head {
+	color: #888;
+}
+
+.lectures_instructor {
+	padding-bottom: 1.0em;
+	border-bottom: solid 1px #aaa;
+}
+
+.lecture .name {
+	font-size: 110%;
+}
+.lecture .created {
+	font-style: italic;
+	color: #aaa;
+}
+
+.lecture {
+	margin: 0.5em 0;
+	padding: 0.5em 1em;
+	border: solid 1px #888;
+	-moz-border-radius: 0.20em;
+	-webkit-border-radius: 0.20em;
+}
+

+ 24 - 88
public/index.html

@@ -3,9 +3,9 @@
 
 	<head>
 		
-		<link rel="stylesheet" href="assets/css/include.css" type="text/css" media="screen" />
-		<script type="text/javascript" src="assets/js/modernizr.custom.js"></script>
-		<script type="text/javascript" src="assets/js/load.js"></script>
+		<link rel="stylesheet" href="/assets/css/include.css" type="text/css" media="screen" />
+		<script type="text/javascript" src="/assets/js/modernizr.custom.js"></script>
+		<script type="text/javascript" src="/assets/js/load.js"></script>
 		<script type="text/javascript" src="http://use.typekit.com/cbx6gxx.js"></script>
 		<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
 
@@ -22,27 +22,25 @@
 			<div class="container-12 highlight">
 					<div class="grid-3">
 						<a id="logo" href="/">
-							<img src="assets/img/logo-light.png" alt="FinalsClub" />
+							<img src="/assets/img/logo-light.png" alt="FinalsClub" />
 						</a>
 					</div>
 					<div class="grid-9">
-<div id="login_status" style="display:none;">Currently logged in as <span class="username"></span></div>
 						<nav id="user-nav" class="small">
 							<ul>
-								<li>Hi, <span class="username"></span></li>
-								<li><a href="#">Logout</a></li>
+								<li><span class="username">Guest</span></li>
+								<li><a id=login_link href="/login">Login</a></li>
 							</ul>
 						</nav>
 						<nav id="main-nav" class="small">
 							<ul>
-								<li><a href="/schools" class="active"><em class="icon"></em>Courses</a></li>
+								<li><a href="/schools" id=school_link class="nav"><em class="icon"></em>Courses</a></li>
 								<li><a href="http://blog.finalsclub.org"><em class="icon"></em>Blog</a></li>
-								<li><a href="/archive"><em class="icon"></em>Library</a></li>
-								<li><a href="/press"><em class="icon"></em>Press</a></li>
-								<li id=register_link><a href="/register"><em class="icon"></em>Register</a></li>
-								<li id=profile_link><a href="/profile"><em class="icon"></em>Profile</a></li>
-								<li id=login_link><a href="/login"><em class="icon"></em>Profile</a></li>
-								<li><a href="#" class="donate"><em class="icon"></em><em class="lc yellow">Donate</em></a></li>
+								<li><a href="/archive" id=archive_link class="nav"><em class="icon"></em>Library</a></li>
+								<li><a href="/press" id=press_link class="nav"><em class="icon"></em>Press</a></li>
+								<li><a href="/register" id=register_link class="nav"><em class="icon"></em>Register</a></li>
+								<li><a href="/profile" id=profile_link class="nav"><em class="icon"></em>Profile</a></li>
+								<!-- li><a href="#" class="donate"><em class="icon"></em><em class="lc yellow">Donate</em></a></li -->
 							</ul>
 						</nav>
 					</div>
@@ -53,84 +51,22 @@
 		<div id="messages" class="page"><span id="PROTO_message" class="__type__">__msg__</span></div>
 		<div class="content">
 
-
-			<!--
-			***********************************************************
-				<div class="grid-12">
-					<div class="padded-loose">
-						<h1 class="large-huge spaced centered">Welcome to FinalsClub! <span class="small">Collaborate. Learn. Share.</span></h1>
-					</div>
-				</div>
-				<div class="grid-10 grid-centered">
-					<div class="padded-loose">
-						<p class="no-top-margin">
-							Thank you for visiting FinalsClub.org, a 501(c)(3) non-profit open education
-							project dedicated to helping college students share knowledge freely online.  While you learn better, faster, and smarter by using FinalsClub with your classmates,
-							we also encourage you to share your scholarship to benefit curious minds everywhere.
-						</p>
-						<p>
-							Getting started is easy.  Just register with your school email address and confirm
-							your account.  Then find your courses or add a new ones.  You can also browse our
-							Library to learn something new.  Thank you for helping us improve access to education,
-							one lecture at a time.
-						</p>
-					</div>
-				</div>
-				<div class="grid-12">
-					<div class="button-set vertical half-width centered-rt-parent half-width-buttons">
-						<button class="green">Sign Up</button>
-						<button class="blue">Learn Something</button>
-					</div>
-				</div>
-			</div>
-			<div class="container-12 spacer">
-			  <hr class="stripes spacer" />
-
-				<div class="grid-6">
-					<h3 class="heading">Check out our Screencasts</h3>
-					<div class="video-wrapper">
-						<iframe src="http://player.vimeo.com/video/30647271?title=0&amp;byline=0&amp;portrait=0&amp;color=367da9" width="460" height="259" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>		</div>
-					</div>
-				<div class="grid-6">
-					<h3 class="heading">We currently support the following schools</h3>
-					<div class="schools">
-						<ul>
-							<li><em class="sprite-school brown">Brown Logo</em></li>
-							<li><em class="sprite-school columbia">Columbia Logo</em></li>
-							<li><em class="sprite-school cornell">Cornell Logo</em></li>
-							<li><em class="sprite-school dartmouth">Dartmouth Logo</em></li>
-							<li><em class="sprite-school shield">School Logo</em></li>
-							<li><em class="sprite-school mit">MIT Logo</em></li>
-							<li><em class="sprite-school lock_haven">Lock Haven Logo</em></li>
-							<li><em class="sprite-school cal">Cal Tech Logo</em></li>
-							<li><em class="sprite-school texas">University of Texas Logo</em></li>
-							<li><em class="sprite-school yale">Yale Logo</em></li>
-							<li><em class="sprite-school penn">Penn Logo</em></li>
-							<li><em class="sprite-school harvard">Harvad Logo</em></li>
-						</ul>
-					</div>
-				</div>
-			</div>
-			***********************************************************
-			-->
-
 			<style>
 				/* The is here is because it's related less to "styling" and more to UI "behavior" */
 				.page { display: none; }
 			</style>
 
-      <noscript>
-        This site requires JavaScript to properly function. Please enable JavaScript or use a modern browser such as <a href="http://google.com/chrome">Google Chrome</a> or <a href="http://firefox.com">Firefox</a>.
-      </noscript>
+			<noscript>
+				This site requires JavaScript to properly function.
+				Please enable JavaScript or use a modern browser such as
+				<a href="http://google.com/chrome">Google Chrome</a>
+				or
+				<a href="http://firefox.com">Firefox</a>.
+			</noscript>
 
 
 			<div class=page id=pg_home>
 
-
-
-
-
-
 				<div class="grid-12">
 					<div class="padded-loose">
 						<h1 class="large-huge spaced centered">Welcome to FinalsClub! <span class="small">Collaborate. Learn. Share.</span></h1>
@@ -750,11 +686,11 @@
 				<div class="grid-12">
 					<nav id="footer-nav">
 						<ul>
-							<li><a href="#">Code of Conduct</a></li>
-							<li><a href="#">About</a></li>
-							<li><a href="#">Contact</a></li>
-							<li><a href="#">Legal</a></li>
-							<li><a href="#">Team</a></li>
+							<li><a href="/conduct">Code of Conduct</a></li>
+							<li><a href="http://blog.finalsclub.org/about.html">About</a></li>
+							<li><a href="http://blog.finalsclub.org/contact.html">Contact</a></li>
+							<li><a href="http://blog.finalsclub.org/legal.html">Legal</a></li>
+							<li><a href="http://blog.finalsclub.org/team.html">Team</a></li>
 						</ul>
 					</nav>
 					<p>Copyright 2011 Finals Club.  All rights reserved.</p>

+ 21 - 5
public/javascripts/main.js

@@ -29,6 +29,7 @@ var router = {
     }
   },
   run: function(name, path) {
+    $('.nav').removeClass('active');
     checkUser(function() {
       if (router.routes[name].useAjax) {
         $.get(path, {cache: false}, function(data) {
@@ -46,13 +47,13 @@ var router = {
 
 function render(pageId, response) {
   if (user.name) {
-    $('.username').text(user.name);
+    $('.username').text("Hi, "+user.name+"!");
     $("#login_status").show();
     $('#login_link').text('Logout').attr('href', '/logout');
     $('#register_link').hide();
     $('#profile_link').show();
   } else {
-    $('.username').text('');
+    $('.username').text('Guest');
     $("#login_status").hide();
     $('#login_link').text('Login').attr('href', '/login');
     $('#register_link').show();
@@ -99,6 +100,7 @@ router.add('404', false, function() {
 
 router.add('home', false, function(cb) {
   $('#learnsomething').unbind();
+  $('.nav').removeClass('active');
 	cb("home");
   $('#learnsomething').click(function(e) {
     $.get('/learn/random', function(data) {
@@ -108,7 +110,7 @@ router.add('home', false, function(cb) {
     })
   });
   if ($('#vimeo-screencast').length === 0) {
-    $('#screencast').html('<iframe id="vimeo-screencast" src="http://player.vimeo.com/video/30647271?title=0&amp;byline=0&amp;portrait=0" width="350" height="250" frameborder="0" webkitallowfullscreen="webkitAllowFullScreen" allowfullscreen="allowFullScreen"></iframe>');
+    $('.video-wrapper').html('<iframe id="vimeo-screencast" src="http://player.vimeo.com/video/30647271?title=0&amp;byline=0&amp;portrait=0&amp;color=367da9" width="460" height="259" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>');
   }
 });
 
@@ -116,7 +118,7 @@ router.add('home', false, function(cb) {
 
 // go to the page that lists the schools
 router.add('schools', function(data, cb) {
-
+  $('#school_link').addClass('active');
   var response = {
     id: 'school',
     data: data.schools
@@ -129,6 +131,7 @@ router.add('schools', function(data, cb) {
 
 // go to the page that lists the courses for a specific school
 router.add('school', function(data, cb) {
+  $('#school_link').addClass('active');
   $('.sub_menu').hide();
   $('#new_course').unbind();
   $('#form_course').hide().unbind();
@@ -171,6 +174,7 @@ router.add('school', function(data, cb) {
 
 // go to the page that lists the lectures for a specific course
 router.add('course', function(data, cb) {
+  $('#school_link').addClass('active');
   $('.sub_menu').hide();
   $('#new_lecture').unbind();
   $('#form_lecture').hide().unbind();;
@@ -240,6 +244,7 @@ router.add('course', function(data, cb) {
 
 // go to the page that lists the note taking sessions for a specific lecture
 router.add('lecture', function(data, cb) {
+  $('#school_link').addClass('active');
   $('.sub_menu').hide();
   $('#new_note').unbind();
   $('#form_note').hide().unbind();;
@@ -304,6 +309,7 @@ router.add('lecture', function(data, cb) {
 
 // go to the page that lists the archived subject names
 router.add('archive', function(data, cb) {
+  $('#archive_link').addClass('active');
 
   var response = {
     id: 'archive_subject',
@@ -316,6 +322,8 @@ router.add('archive', function(data, cb) {
 
 
 router.add('archivesubject', function(data, cb) {
+  $('.nav').removeClass('active');
+  $('#archive_link').addClass('active');
 
   var response = {
     id: 'archive_course',
@@ -328,6 +336,7 @@ router.add('archivesubject', function(data, cb) {
 
 
 router.add('archivecourse', function(data, cb) {
+  $('#archive_link').addClass('active');
 
   var response = {
     id: 'archive_note',
@@ -340,6 +349,7 @@ router.add('archivecourse', function(data, cb) {
 
 
 router.add('archivenote', function(data, cb) {
+  $('#archive_link').addClass('active');
 
   var response = {
     id: 'archive_note_display',
@@ -353,6 +363,7 @@ router.add('archivenote', function(data, cb) {
 
 // go to the account registration page
 router.add('register', false, function(cb) {
+  $('#register_link').addClass('active');
   $('#form_register').submit(function(e) {
     e.preventDefault();
 
@@ -377,6 +388,7 @@ router.add('activate', function(data, cb) {
 });
 
 router.add('profile', false, function(cb) {
+  $('#profile_link').addClass('active');
   var form = $('#form_profile');
   $('input[type=password]','#form_profile').val('');
   $('#affiliation').attr('value', user.affil);
@@ -466,6 +478,7 @@ router.add('resetpw', false, function(cb) {
 
 // go to the press articles page
 router.add('press', false, function(cb) {
+  $('#press_link').addClass('active');
 	cb("press");
 });
 
@@ -529,10 +542,12 @@ function goPage(path) {
 var popped = false;
 function goBack(event) {
   popped = true;
+  console.timeEnd('pop')
 	showPage( topQueue.pop() );
 }
 
-
+console.time('pop')
+console.time('no-pop')
 window.onpopstate = goBack
 
 $(document).ready(function() {
@@ -554,6 +569,7 @@ $(document).ready(function() {
 
 	// xxx older FF browsers don't fire a page load/reload - deal with it somehow.
   setTimeout(function() {
+    console.timeEnd('no-pop')
     if (!popped) {
       showPage( 0 );		// needed for some older browsers, redundant for chrome
     }

+ 1 - 2
public/stylesheets/fc2.css

@@ -631,8 +631,6 @@ div.school {
 	-moz-box-shadow: 0 0.2em 0.3em rgba(0, 0, 0, .1);
 	/*
 	*/
-
-
 }
 
 /*
@@ -873,6 +871,7 @@ div.conduct p.academic {
 	padding: 2em 0;
 }
 div.conduct img {
+	display: inline;
 	padding: 20px; 
 	border: solid 1px #888;
 	background: -webkit-gradient(linear, left top, left bottom, from(#fcfcff), to(#f4f4ff));

+ 0 - 0
util/reboot-restart.sh


+ 0 - 0
util/start-fc-epl-monitor.sh