Browse files

Working on overview page

  • Loading branch information...
1 parent c3250fb commit fef111809c6bc84ca2355082d12d1e9f7bac7465 David committed Dec 27, 2011
View
34 assets/css/subway.css
@@ -4,6 +4,40 @@
text-align: center;
}
+#overview{
+ width: 500px;
+ margin:10% auto 0px auto;
+ text-align: center;
+}
+
+#overview ul{
+ padding: 10px;
+ background: whiteSmoke;
+ border: 2px solid #DDD;
+}
+
+#overview ul li{
+ display: inline-block;
+ padding: 10px;
+ margin:0px 10px 0px 10px;
+ text-align: center;
+}
+
+#overview ul li:hover{
+ background: #A7DBD8;
+ cursor: pointer;
+ border-radius: 5px;
+}
+
+#overview ul li img{
+ height: 75px;
+}
+
+#overview li span{
+ display: block;
+ font-weight: bold;
+}
+
#channels{
margin-top: 25px;
}
View
3 assets/images/connection.svg
@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" width="100px" height="100px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve">
+<polygon fill="#000000" points="80.562,41.754 52.861,41.754 67.299,0 19.437,58.247 47.14,58.247 32.702,100 "/>
+</svg>
View
25 assets/images/settings.svg
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="73.041px" height="100px" viewBox="0 0 73.041 100" enable-background="new 0 0 73.041 100" xml:space="preserve">
+<path d="M21.462,72.617c0-3.271,2.651-5.919,5.921-5.919c3.269,0,5.919,2.648,5.919,5.919c0,3.27-2.65,5.919-5.919,5.919
+ C24.114,78.536,21.462,75.886,21.462,72.617z M29.671,45.33c-1.523-0.128-3.055-0.128-4.578,0l-2.707,7.382
+ c-1.968,0.493-3.833,1.281-5.531,2.294l-7.151-3.303c-1.167,0.987-2.249,2.07-3.236,3.237l3.307,7.135
+ c-1.044,1.738-1.806,3.616-2.29,5.532l-7.391,2.721c-0.127,1.523-0.127,3.054,0,4.579l7.383,2.706
+ c0.492,1.968,1.28,3.834,2.292,5.529l-3.301,7.152c0.987,1.166,2.069,2.25,3.236,3.236l7.135-3.306
+ c1.739,1.043,3.616,1.805,5.532,2.287l2.721,7.393c1.523,0.127,3.054,0.127,4.578,0l2.707-7.384c1.968-0.491,3.833-1.279,5.53-2.292
+ l7.151,3.302c1.166-0.986,2.25-2.07,3.237-3.236l-3.308-7.134c1.044-1.74,1.806-3.617,2.29-5.534l7.391-2.72
+ c0.127-1.525,0.127-3.056,0-4.579l-7.382-2.706c-0.493-1.969-1.282-3.834-2.294-5.531l3.302-7.15
+ c-0.986-1.167-2.07-2.25-3.236-3.237l-7.134,3.307c-1.74-1.043-3.617-1.805-5.533-2.29L29.671,45.33z"/>
+<path d="M41.483,28.352c-1.25-3.021,0.185-6.483,3.205-7.735c3.02-1.25,6.484,0.185,7.733,3.205
+ c1.252,3.021-0.184,6.483-3.203,7.734C46.198,32.807,42.735,31.373,41.483,28.352z M38.626,0c-1.458,0.465-2.871,1.051-4.23,1.751
+ l0.325,7.858c-1.63,1.208-3.052,2.649-4.232,4.235l-7.871-0.315c-0.7,1.359-1.286,2.773-1.752,4.23l5.786,5.326
+ c-0.299,2.005-0.285,4.031,0.002,5.987l-5.788,5.341c0.465,1.457,1.051,2.871,1.752,4.23l7.857-0.325
+ c1.207,1.63,2.649,3.053,4.235,4.232l-0.315,7.87c1.359,0.701,2.773,1.286,4.23,1.752l5.326-5.786
+ c2.006,0.298,4.031,0.285,5.986-0.002l5.344,5.788c1.455-0.466,2.869-1.053,4.229-1.753l-0.323-7.855
+ c1.628-1.208,3.051-2.65,4.23-4.236l7.871,0.315c0.7-1.359,1.285-2.773,1.752-4.23l-5.786-5.326
+ c0.298-2.007,0.284-4.031-0.003-5.986l5.788-5.344c-0.466-1.457-1.051-2.871-1.751-4.229l-7.858,0.325
+ c-1.206-1.63-2.649-3.052-4.234-4.232l0.314-7.871C58.151,1.051,56.737,0.465,55.281,0l-5.325,5.785
+ c-2.008-0.298-4.032-0.284-5.987,0.002L38.626,0z"/>
+</svg>
View
1 assets/js/client.js
@@ -16,5 +16,6 @@ var ChatApplicationRouter = Backbone.Router.extend({
});
$(function() {
+ window.connected = false;
window.app = new ChatApplicationRouter({});
})
View
2 assets/js/models/chat.js
@@ -0,0 +1,2 @@
+var ChatModel = Backbone.Model.extend({
+});
View
10 assets/js/views/chat.js
@@ -0,0 +1,10 @@
+var ChatView = Backbone.View.extend({
+ initialize: function() {
+ this.render();
+ },
+
+ render: function() {
+ $('content').html(this.el);
+ return this;
+ }
+});
View
7 assets/js/views/chat_application.js
@@ -8,7 +8,12 @@ var ChatApplicationView = Backbone.View.extend({
className: 'container-fluid',
render: function() {
- $('body').html($(this.el).append(ich.chat_window()));
+ $('body').html($(this.el).append(ich.chat_application()));
@akavlie
akavlie added a note Dec 28, 2011

Where does this ich come from?

I'd like to stick to camelCase variable names; that's the convention in JS (contra Python & Ruby where underscore_separated variables are the convention).

@thedjpetersen
Owner

ich is the templating it is declared when ICanHaz.js is imported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ if(!window.connected) {
+ var overview_view = new OverViewView({});
+ this.$('content').html(overview_view.render());
+ } else {
+ }
return this;
}
});
View
14 assets/js/views/overview.js
@@ -0,0 +1,14 @@
+var OverViewView = Backbone.View.extend({
+ initialize: function() {
+ this.render();
+ },
+
+ tagName: 'div',
@akavlie
akavlie added a note Dec 28, 2011

tagName: 'div' need not be specified here, as that's the default for a Backbone view -- see here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+
+ className: 'container-fluid',
+
+ render: function() {
+ $('.content').html($(this.el).html(ich.overview()));
+ return this;
+ }
+});
View
2 views/layout.jade
@@ -2,9 +2,11 @@
html
head
title Subway
+ link(href='/assets/images/favicon.ico', rel='icon', type='image/x-icon')
!= css('bootstrap')
!= css('subway')
!= js('client')
include templates/chat_window_template
+ include templates/overview_template
body
block content
View
2 views/templates/chat_window_template.jade
@@ -1,4 +1,4 @@
-script(id="chat_window", type="text/html")
+script(id="chat_application", type="text/html")
.sidebar
#logo
img(src='/assets/images/subway.png')
View
9 views/templates/overview_template.jade
@@ -0,0 +1,9 @@
+script(id="overview", type="text/html")
+ #overview
+ ul
+ li
+ img(src="/assets/images/connection.svg")
+ span New Connection
+ li
+ img(src="/assets/images/settings.svg")
+ span Settings

0 comments on commit fef1118

Please sign in to comment.