Skip to content
Browse files

style foo

  • Loading branch information...
1 parent 7572f62 commit 5e085bba7950eac7376bf25c239be9507d210faf @banacorn committed Feb 14, 2013
View
14 index.html
@@ -7,7 +7,19 @@
<script data-main="/scripts/main" src="/scripts/jam/require.js"></script>
</head>
<body>
- <div class="container">
+ <div class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+ <a class="brand" href="/">Cedar</a>
+ </div>
+ </div>
+ </div>
+ <div id="main" class="container">
</div>
</body>
</html>
View
67 scripts/layout.js
@@ -1,67 +0,0 @@
-// Generated by CoffeeScript 1.4.0
-(function() {
- var __hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
-
- define(['jquery', 'backbone', 'template', 'backbone.marionette'], function($, Backbone, $$) {
- var Layout, layout;
- Backbone.remoteSync = Backbone.sync;
- Backbone.sync = function(method, model, option) {
- var data, url;
- if (typeof model.url === 'function') {
- url = model.url();
- } else {
- url = model.url;
- }
- switch (method) {
- case 'read':
- model.on('reset', function() {
- return localStorage[url] = JSON.stringify(model.toJSON());
- });
- if ((typeof localStorage !== "undefined" && localStorage !== null ? localStorage[url] : void 0) != null) {
- data = JSON.parse(localStorage[url]);
- if (model instanceof Backbone.Collection) {
- model.reset(data);
- }
- if (model instanceof Backbone.Model) {
- model.set(data);
- }
- }
- break;
- case 'create':
- if (typeof localStorage !== "undefined" && localStorage !== null) {
- localStorage[url] = JSON.stringify(model.toJSON());
- }
- break;
- case 'update':
- if (typeof localStorage !== "undefined" && localStorage !== null) {
- localStorage[url] = JSON.stringify(model.toJSON());
- }
- }
- return Backbone.remoteSync.apply(this, arguments);
- };
- Backbone.Marionette.Renderer.render = function(template, data) {
- return template.render(data);
- };
- Layout = (function(_super) {
-
- __extends(Layout, _super);
-
- function Layout() {
- return Layout.__super__.constructor.apply(this, arguments);
- }
-
- Layout.prototype.template = $$.layout;
-
- Layout.prototype.regions = {
- main: '#main'
- };
-
- return Layout;
-
- })(Backbone.Marionette.Layout);
- layout = new Layout;
- return layout;
- });
-
-}).call(this);
View
1 scripts/main.js
@@ -8,7 +8,6 @@
jquery: 'jam/jquery/jquery',
underscore: 'jam/underscore/underscore',
backbone: 'jam/backbone/backbone',
- 'backbone.marionette': 'jam/Backbone.Marionette/lib/amd/backbone.marionette',
hogan: 'jam/hogan/hogan',
router: 'router',
template: 'template'
View
78 scripts/router.js
@@ -3,8 +3,43 @@
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
- define(['collections/file', 'collections/project', 'layout', 'models/project', 'regions/main', 'views/home', 'views/project/list', 'views/project', 'jquery', 'backbone'], function(CollectionFile, CollectionProject, Layout, ModelProject, RegionMain, ViewHome, ViewProjectList, ViewProject, $, Backbone) {
+ define(['views/home', 'views/project/list', 'jquery', 'backbone'], function(ViewHome, ViewProjectList, $, Backbone) {
var Router;
+ Backbone.remoteSync = Backbone.sync;
+ Backbone.sync = function(method, model, option) {
+ var data, url;
+ if (typeof model.url === 'function') {
+ url = model.url();
+ } else {
+ url = model.url;
+ }
+ switch (method) {
+ case 'read':
+ model.on('reset', function() {
+ return localStorage[url] = JSON.stringify(model.toJSON());
+ });
+ if ((typeof localStorage !== "undefined" && localStorage !== null ? localStorage[url] : void 0) != null) {
+ data = JSON.parse(localStorage[url]);
+ if (model instanceof Backbone.Collection) {
+ model.reset(data);
+ }
+ if (model instanceof Backbone.Model) {
+ model.set(data);
+ }
+ }
+ break;
+ case 'create':
+ if (typeof localStorage !== "undefined" && localStorage !== null) {
+ localStorage[url] = JSON.stringify(model.toJSON());
+ }
+ break;
+ case 'update':
+ if (typeof localStorage !== "undefined" && localStorage !== null) {
+ localStorage[url] = JSON.stringify(model.toJSON());
+ }
+ }
+ return Backbone.remoteSync.apply(this, arguments);
+ };
Router = (function(_super) {
__extends(Router, _super);
@@ -13,52 +48,21 @@
return Router.__super__.constructor.apply(this, arguments);
}
- Router.prototype.initialize = function() {
- Layout.render();
- return $('body').html($(Layout.el).children());
- };
-
Router.prototype.routes = {
'': 'home',
- 'project': 'projectList',
- 'project/:id': 'project'
+ 'project': 'projectList'
};
Router.prototype.home = function() {
var homeView;
homeView = new ViewHome;
- return RegionMain.show(homeView);
+ return $('#main').html(homeView.el);
};
Router.prototype.projectList = function() {
- var projectList, projectListView;
- projectList = new CollectionProject;
- projectListView = new ViewProjectList({
- collection: projectList
- });
- RegionMain.show(projectListView);
- projectList.fetch();
- return projectList.on('reset', function() {
- return console.log(projectList.toJSON());
- });
- };
-
- Router.prototype.project = function(id) {
- var files, project, projectView;
- project = new ModelProject({
- id: id
- });
- files = new CollectionFile({
- projectID: id,
- localeID: 1
- });
- projectView = new ViewProject({
- model: project,
- collection: files
- });
- RegionMain.show(projectView);
- project.fetch();
- return files.fetch();
+ var projectListView;
+ projectListView = new ViewProjectList;
+ return $('#main').html(projectListView.el);
};
return Router;
View
7 scripts/views/home.js
@@ -19,8 +19,13 @@
Home.prototype.template = $$.home;
+ Home.prototype.initialize = function() {
+ return this.render();
+ };
+
Home.prototype.render = function() {
- return this.$el.html(this.template.render());
+ this.$el.html(this.template.render());
+ return this;
};
return Home;
View
14 scripts/views/project/list.js
@@ -3,7 +3,7 @@
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
- define(['views/project/listitem', 'jquery', 'backbone', 'template', 'backbone.marionette'], function(ViewProjectListitem, $, Backbone, $$) {
+ define(['jquery', 'backbone', 'template'], function($, Backbone, $$) {
var ProjectList;
return ProjectList = (function(_super) {
@@ -13,19 +13,23 @@
return ProjectList.__super__.constructor.apply(this, arguments);
}
- ProjectList.prototype.tagName = 'article';
+ ProjectList.prototype.tagName = 'section';
ProjectList.prototype.id = 'project-list';
ProjectList.prototype.template = $$.projectList;
- ProjectList.prototype.itemView = ViewProjectListitem;
+ ProjectList.prototype.initialize = function() {
+ return this.render();
+ };
- ProjectList.prototype.itemViewContainer = 'ol';
+ ProjectList.prototype.render = function() {
+ return this.$el.html(this.template.render());
+ };
return ProjectList;
- })(Backbone.Marionette.CompositeView);
+ })(Backbone.View);
});
}).call(this);
View
55 src/layout.coffee
@@ -1,55 +0,0 @@
-define [
- 'jquery',
- 'backbone',
- 'template',
- 'backbone.marionette'
-], ($, Backbone, $$) ->
-
- # save the original Backbone.Sync here
- Backbone.remoteSync = Backbone.sync
-
- # modified Backbone.Sync that will check localStorage cache first
- Backbone.sync = (method, model, option) ->
-
- # get url, could be a value or a function
- if typeof model.url is 'function'
- url = model.url()
- else
- url = model.url
-
- switch method
- when 'read'
-
-
- # update localStorage if synced from remote
- model.on 'reset', ->
- localStorage[url] = JSON.stringify model.toJSON()
-
- # fetch localStorage
- if localStorage?[url]?
-
- data = JSON.parse localStorage[url]
-
- if model instanceof Backbone.Collection
- model.reset data
- if model instanceof Backbone.Model
- model.set data
-
- when 'create'
- localStorage?[url] = JSON.stringify model.toJSON()
- when 'update'
- localStorage?[url] = JSON.stringify model.toJSON()
-
- Backbone.remoteSync.apply @, arguments
-
- # customize marionette.renderer::render
- # placed here because this is the earliest module loaded
- Backbone.Marionette.Renderer.render = (template, data) -> template.render data
-
- class Layout extends Backbone.Marionette.Layout
- template: $$.layout
- regions:
- main: '#main'
-
- layout = new Layout
- return layout
View
1 src/main.coffee
@@ -3,7 +3,6 @@ require.config
jquery : 'jam/jquery/jquery'
underscore : 'jam/underscore/underscore'
backbone : 'jam/backbone/backbone'
- 'backbone.marionette' : 'jam/Backbone.Marionette/lib/amd/backbone.marionette'
hogan : 'jam/hogan/hogan'
router : 'router'
template : 'template'
View
83 src/router.coffee
@@ -1,63 +1,64 @@
define [
- 'collections/file',
- 'collections/project',
- 'layout',
- 'models/project',
- 'regions/main',
'views/home',
'views/project/list',
- 'views/project',
'jquery',
'backbone'
-], (CollectionFile, CollectionProject, Layout, ModelProject, RegionMain, ViewHome, ViewProjectList, ViewProject, $, Backbone) ->
+], (ViewHome, ViewProjectList, $, Backbone) ->
- class Router extends Backbone.Router
- initialize: ->
- Layout.render()
- $('body').html $(Layout.el).children()
+ # save the original Backbone.Sync here
+ Backbone.remoteSync = Backbone.sync
- routes:
- '' : 'home'
- 'project' : 'projectList'
- 'project/:id' : 'project'
+ # modified Backbone.Sync that will check localStorage cache first
+ Backbone.sync = (method, model, option) ->
- #
- home: ->
- homeView = new ViewHome
- RegionMain.show homeView
+ # get url, could be a value or a function
+ if typeof model.url is 'function'
+ url = model.url()
+ else
+ url = model.url
- # project
- projectList: ->
+ switch method
+ when 'read'
- projectList = new CollectionProject
- projectListView = new ViewProjectList
- collection: projectList
- RegionMain.show projectListView
- projectList.fetch()
- projectList.on 'reset', ->
- console.log projectList.toJSON( )
- # project/:id
- project: (id) ->
+ # update localStorage if synced from remote
+ model.on 'reset', ->
+ localStorage[url] = JSON.stringify model.toJSON()
- project = new ModelProject
- id: id
+ # fetch localStorage
+ if localStorage?[url]?
- files = new CollectionFile
- projectID: id
- localeID: 1 # zh-tw
+ data = JSON.parse localStorage[url]
- projectView = new ViewProject
- model: project
- collection: files
+ if model instanceof Backbone.Collection
+ model.reset data
+ if model instanceof Backbone.Model
+ model.set data
- RegionMain.show projectView
- project.fetch()
- files.fetch()
+ when 'create'
+ localStorage?[url] = JSON.stringify model.toJSON()
+ when 'update'
+ localStorage?[url] = JSON.stringify model.toJSON()
+ Backbone.remoteSync.apply @, arguments
+ class Router extends Backbone.Router
+ routes:
+ '' : 'home'
+ 'project' : 'projectList'
+ # 'project/:id' : 'project'
+
+ #
+ home: ->
+ homeView = new ViewHome
+ $('#main').html homeView.el
+
+
+ projectList: ->
+ projectListView = new ViewProjectList
+ $('#main').html projectListView.el
return new Router
View
8 src/stylus/style.styl
@@ -1 +1,7 @@
-@import "bootstrap.css"
+@import "bootstrap.css"
+
+body
+ // for the fixed navbar
+ padding-top: 40px
+
+ background: url('/images/light_noise_diagonal.png')
View
5 src/views/home.coffee
@@ -8,4 +8,7 @@ define [
tagName: 'article'
id: 'home'
template: $$.home
- render: -> @$el.html @template.render()
+ initialize: -> @render()
+ render: ->
+ @$el.html @template.render()
+ return @
View
15 src/views/project/list.coffee
@@ -1,16 +1,13 @@
define [
- 'views/project/listitem',
'jquery',
'backbone',
- 'template',
- 'backbone.marionette'
-], (ViewProjectListitem, $, Backbone, $$) ->
+ 'template'
+], ($, Backbone, $$) ->
- class ProjectList extends Backbone.Marionette.CompositeView
- tagName: 'article'
+ class ProjectList extends Backbone.View
+ tagName: 'section'
id: 'project-list'
template: $$.projectList
- itemView: ViewProjectListitem
- itemViewContainer: 'ol'
-
+ initialize: -> @render()
+ render: -> @$el.html @template.render()
View
425 stylesheets/bootstrap.css
@@ -1,5 +1,5 @@
/*!
- * Bootstrap v2.2.2
+ * Bootstrap v2.3.0
*
* Copyright 2012 Twitter, Inc
* Licensed under the Apache License v2.0
@@ -8,6 +8,38 @@
* Designed and built with all the love in the world @twitter by @mdo and @fat.
*/
+.clearfix {
+ *zoom: 1;
+}
+
+.clearfix:before,
+.clearfix:after {
+ display: table;
+ line-height: 0;
+ content: "";
+}
+
+.clearfix:after {
+ clear: both;
+}
+
+.hide-text {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+
+.input-block-level {
+ display: block;
+ width: 100%;
+ min-height: 30px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
article,
aside,
details,
@@ -189,38 +221,6 @@ textarea {
}
}
-.clearfix {
- *zoom: 1;
-}
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- line-height: 0;
- content: "";
-}
-
-.clearfix:after {
- clear: both;
-}
-
-.hide-text {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-
-.input-block-level {
- display: block;
- width: 100%;
- min-height: 30px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-
body {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -235,7 +235,8 @@ a {
text-decoration: none;
}
-a:hover {
+a:hover,
+a:focus {
color: #005580;
text-decoration: underline;
}
@@ -678,42 +679,59 @@ cite {
color: #999999;
}
-a.muted:hover {
+a.muted:hover,
+a.muted:focus {
color: #808080;
}
.text-warning {
color: #c09853;
}
-a.text-warning:hover {
+a.text-warning:hover,
+a.text-warning:focus {
color: #a47e3c;
}
.text-error {
color: #b94a48;
}
-a.text-error:hover {
+a.text-error:hover,
+a.text-error:focus {
color: #953b39;
}
.text-info {
color: #3a87ad;
}
-a.text-info:hover {
+a.text-info:hover,
+a.text-info:focus {
color: #2d6987;
}
.text-success {
color: #468847;
}
-a.text-success:hover {
+a.text-success:hover,
+a.text-success:focus {
color: #356635;
}
+.text-left {
+ text-align: left;
+}
+
+.text-right {
+ text-align: right;
+}
+
+.text-center {
+ text-align: center;
+}
+
h1,
h2,
h3,
@@ -823,8 +841,10 @@ ol.inline {
ul.inline > li,
ol.inline > li {
display: inline-block;
+ *display: inline;
padding-right: 5px;
padding-left: 5px;
+ *zoom: 1;
}
dl {
@@ -899,9 +919,9 @@ blockquote {
blockquote p {
margin-bottom: 0;
- font-size: 16px;
+ font-size: 17.5px;
font-weight: 300;
- line-height: 25px;
+ line-height: 1.25;
}
blockquote small {
@@ -1646,9 +1666,11 @@ select:focus:invalid:focus {
.input-append,
.input-prepend {
- margin-bottom: 5px;
+ display: inline-block;
+ margin-bottom: 10px;
font-size: 0;
white-space: nowrap;
+ vertical-align: middle;
}
.input-append input,
@@ -1658,7 +1680,9 @@ select:focus:invalid:focus {
.input-append .uneditable-input,
.input-prepend .uneditable-input,
.input-append .dropdown-menu,
-.input-prepend .dropdown-menu {
+.input-prepend .dropdown-menu,
+.input-append .popover,
+.input-prepend .popover {
font-size: 14px;
}
@@ -2049,30 +2073,36 @@ table {
}
.table-bordered thead:first-child tr:first-child > th:first-child,
-.table-bordered tbody:first-child tr:first-child > td:first-child {
+.table-bordered tbody:first-child tr:first-child > td:first-child,
+.table-bordered tbody:first-child tr:first-child > th:first-child {
-webkit-border-top-left-radius: 4px;
border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
}
.table-bordered thead:first-child tr:first-child > th:last-child,
-.table-bordered tbody:first-child tr:first-child > td:last-child {
+.table-bordered tbody:first-child tr:first-child > td:last-child,
+.table-bordered tbody:first-child tr:first-child > th:last-child {
-webkit-border-top-right-radius: 4px;
border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
}
.table-bordered thead:last-child tr:last-child > th:first-child,
.table-bordered tbody:last-child tr:last-child > td:first-child,
-.table-bordered tfoot:last-child tr:last-child > td:first-child {
+.table-bordered tbody:last-child tr:last-child > th:first-child,
+.table-bordered tfoot:last-child tr:last-child > td:first-child,
+.table-bordered tfoot:last-child tr:last-child > th:first-child {
-webkit-border-bottom-left-radius: 4px;
border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
}
.table-bordered thead:last-child tr:last-child > th:last-child,
.table-bordered tbody:last-child tr:last-child > td:last-child,
-.table-bordered tfoot:last-child tr:last-child > td:last-child {
+.table-bordered tbody:last-child tr:last-child > th:last-child,
+.table-bordered tfoot:last-child tr:last-child > td:last-child,
+.table-bordered tfoot:last-child tr:last-child > th:last-child {
-webkit-border-bottom-right-radius: 4px;
border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
@@ -2113,8 +2143,8 @@ table {
background-color: #f9f9f9;
}
-.table-hover tbody tr:hover td,
-.table-hover tbody tr:hover th {
+.table-hover tbody tr:hover > td,
+.table-hover tbody tr:hover > th {
background-color: #f5f5f5;
}
@@ -2211,35 +2241,35 @@ table th[class*="span"],
margin-left: 0;
}
-.table tbody tr.success td {
+.table tbody tr.success > td {
background-color: #dff0d8;
}
-.table tbody tr.error td {
+.table tbody tr.error > td {
background-color: #f2dede;
}
-.table tbody tr.warning td {
+.table tbody tr.warning > td {
background-color: #fcf8e3;
}
-.table tbody tr.info td {
+.table tbody tr.info > td {
background-color: #d9edf7;
}
-.table-hover tbody tr.success:hover td {
+.table-hover tbody tr.success:hover > td {
background-color: #d0e9c6;
}
-.table-hover tbody tr.error:hover td {
+.table-hover tbody tr.error:hover > td {
background-color: #ebcccc;
}
-.table-hover tbody tr.warning:hover td {
+.table-hover tbody tr.warning:hover > td {
background-color: #faf2cc;
}
-.table-hover tbody tr.info:hover td {
+.table-hover tbody tr.info:hover > td {
background-color: #c4e3f3;
}
@@ -2257,7 +2287,7 @@ table th[class*="span"],
background-repeat: no-repeat;
}
-/* White icons with optional class, or on hover/active states of certain elements */
+/* White icons with optional class, or on hover/focus/active states of certain elements */
.icon-white,
.nav-pills > .active > a > [class^="icon-"],
@@ -2267,11 +2297,15 @@ table th[class*="span"],
.navbar-inverse .nav > .active > a > [class^="icon-"],
.navbar-inverse .nav > .active > a > [class*=" icon-"],
.dropdown-menu > li > a:hover > [class^="icon-"],
+.dropdown-menu > li > a:focus > [class^="icon-"],
.dropdown-menu > li > a:hover > [class*=" icon-"],
+.dropdown-menu > li > a:focus > [class*=" icon-"],
.dropdown-menu > .active > a > [class^="icon-"],
.dropdown-menu > .active > a > [class*=" icon-"],
.dropdown-submenu:hover > a > [class^="icon-"],
-.dropdown-submenu:hover > a > [class*=" icon-"] {
+.dropdown-submenu:focus > a > [class^="icon-"],
+.dropdown-submenu:hover > a > [class*=" icon-"],
+.dropdown-submenu:focus > a > [class*=" icon-"] {
background-image: url("../img/glyphicons-halflings-white.png");
}
@@ -2741,6 +2775,7 @@ table th[class*="span"],
}
.icon-folder-close {
+ width: 16px;
background-position: -384px -120px;
}
@@ -2909,7 +2944,7 @@ table th[class*="span"],
border-bottom: 1px solid #ffffff;
}
-.dropdown-menu li > a {
+.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
@@ -2919,9 +2954,10 @@ table th[class*="span"],
white-space: nowrap;
}
-.dropdown-menu li > a:hover,
-.dropdown-menu li > a:focus,
-.dropdown-submenu:hover > a {
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus,
+.dropdown-submenu:hover > a,
+.dropdown-submenu:focus > a {
color: #ffffff;
text-decoration: none;
background-color: #0081c2;
@@ -2934,8 +2970,9 @@ table th[class*="span"],
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
-.dropdown-menu .active > a,
-.dropdown-menu .active > a:hover {
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
background-color: #0081c2;
@@ -2949,12 +2986,14 @@ table th[class*="span"],
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
-.dropdown-menu .disabled > a,
-.dropdown-menu .disabled > a:hover {
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
color: #999999;
}
-.dropdown-menu .disabled > a:hover {
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
text-decoration: none;
cursor: default;
background-color: transparent;
@@ -3130,7 +3169,8 @@ table th[class*="span"],
filter: alpha(opacity=20);
}
-.close:hover {
+.close:hover,
+.close:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
@@ -3167,11 +3207,11 @@ button.close {
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
- border: 1px solid #bbbbbb;
+ border: 1px solid #cccccc;
*border: 0;
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- border-bottom-color: #a2a2a2;
+ border-bottom-color: #b3b3b3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
@@ -3184,6 +3224,7 @@ button.close {
}
.btn:hover,
+.btn:focus,
.btn:active,
.btn.active,
.btn.disabled,
@@ -3202,7 +3243,8 @@ button.close {
*margin-left: 0;
}
-.btn:hover {
+.btn:hover,
+.btn:focus {
color: #333333;
text-decoration: none;
background-position: 0 -15px;
@@ -3306,11 +3348,6 @@ input[type="button"].btn-block {
color: rgba(255, 255, 255, 0.75);
}
-.btn {
- border-color: #c5c5c5;
- border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
-}
-
.btn-primary {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
@@ -3329,6 +3366,7 @@ input[type="button"].btn-block {
}
.btn-primary:hover,
+.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.disabled,
@@ -3361,6 +3399,7 @@ input[type="button"].btn-block {
}
.btn-warning:hover,
+.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.btn-warning.disabled,
@@ -3393,6 +3432,7 @@ input[type="button"].btn-block {
}
.btn-danger:hover,
+.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.btn-danger.disabled,
@@ -3425,6 +3465,7 @@ input[type="button"].btn-block {
}
.btn-success:hover,
+.btn-success:focus,
.btn-success:active,
.btn-success.active,
.btn-success.disabled,
@@ -3457,6 +3498,7 @@ input[type="button"].btn-block {
}
.btn-info:hover,
+.btn-info:focus,
.btn-info:active,
.btn-info.active,
.btn-info.disabled,
@@ -3489,6 +3531,7 @@ input[type="button"].btn-block {
}
.btn-inverse:hover,
+.btn-inverse:focus,
.btn-inverse:active,
.btn-inverse.active,
.btn-inverse.disabled,
@@ -3552,13 +3595,15 @@ input[type="submit"].btn.btn-mini {
border-radius: 0;
}
-.btn-link:hover {
+.btn-link:hover,
+.btn-link:focus {
color: #005580;
text-decoration: underline;
background-color: transparent;
}
-.btn-link[disabled]:hover {
+.btn-link[disabled]:hover,
+.btn-link[disabled]:focus {
color: #333333;
text-decoration: none;
}
@@ -3744,8 +3789,6 @@ input[type="submit"].btn.btn-mini {
margin-left: 0;
}
-.btn-mini .caret,
-.btn-small .caret,
.btn-large .caret {
margin-top: 6px;
}
@@ -3756,6 +3799,11 @@ input[type="submit"].btn.btn-mini {
border-left-width: 5px;
}
+.btn-mini .caret,
+.btn-small .caret {
+ margin-top: 8px;
+}
+
.dropup .btn-large .caret {
border-bottom-width: 5px;
}
@@ -3899,7 +3947,8 @@ input[type="submit"].btn.btn-mini {
display: block;
}
-.nav > li > a:hover {
+.nav > li > a:hover,
+.nav > li > a:focus {
text-decoration: none;
background-color: #eeeeee;
}
@@ -3945,7 +3994,8 @@ input[type="submit"].btn.btn-mini {
}
.nav-list > .active > a,
-.nav-list > .active > a:hover {
+.nav-list > .active > a:hover,
+.nav-list > .active > a:focus {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
background-color: #0088cc;
@@ -4016,12 +4066,14 @@ input[type="submit"].btn.btn-mini {
border-radius: 4px 4px 0 0;
}
-.nav-tabs > li > a:hover {
+.nav-tabs > li > a:hover,
+.nav-tabs > li > a:focus {
border-color: #eeeeee #eeeeee #dddddd;
}
.nav-tabs > .active > a,
-.nav-tabs > .active > a:hover {
+.nav-tabs > .active > a:hover,
+.nav-tabs > .active > a:focus {
color: #555555;
cursor: default;
background-color: #ffffff;
@@ -4040,7 +4092,8 @@ input[type="submit"].btn.btn-mini {
}
.nav-pills > .active > a,
-.nav-pills > .active > a:hover {
+.nav-pills > .active > a:hover,
+.nav-pills > .active > a:focus {
color: #ffffff;
background-color: #0088cc;
}
@@ -4082,7 +4135,8 @@ input[type="submit"].btn.btn-mini {
-moz-border-radius-bottomleft: 4px;
}
-.nav-tabs.nav-stacked > li > a:hover {
+.nav-tabs.nav-stacked > li > a:hover,
+.nav-tabs.nav-stacked > li > a:focus {
z-index: 2;
border-color: #ddd;
}
@@ -4113,7 +4167,8 @@ input[type="submit"].btn.btn-mini {
border-bottom-color: #0088cc;
}
-.nav .dropdown-toggle:hover .caret {
+.nav .dropdown-toggle:hover .caret,
+.nav .dropdown-toggle:focus .caret {
border-top-color: #005580;
border-bottom-color: #005580;
}
@@ -4134,28 +4189,32 @@ input[type="submit"].btn.btn-mini {
border-bottom-color: #555555;
}
-.nav > .dropdown.active > a:hover {
+.nav > .dropdown.active > a:hover,
+.nav > .dropdown.active > a:focus {
cursor: pointer;
}
.nav-tabs .open .dropdown-toggle,
.nav-pills .open .dropdown-toggle,
-.nav > li.dropdown.open.active > a:hover {
+.nav > li.dropdown.open.active > a:hover,
+.nav > li.dropdown.open.active > a:focus {
color: #ffffff;
background-color: #999999;
border-color: #999999;
}
.nav li.dropdown.open .caret,
.nav li.dropdown.open.active .caret,
-.nav li.dropdown.open a:hover .caret {
+.nav li.dropdown.open a:hover .caret,
+.nav li.dropdown.open a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
opacity: 1;
filter: alpha(opacity=100);
}
-.tabs-stacked .open > a:hover {
+.tabs-stacked .open > a:hover,
+.tabs-stacked .open > a:focus {
border-color: #999999;
}
@@ -4209,13 +4268,15 @@ input[type="submit"].btn.btn-mini {
border-radius: 0 0 4px 4px;
}
-.tabs-below > .nav-tabs > li > a:hover {
+.tabs-below > .nav-tabs > li > a:hover,
+.tabs-below > .nav-tabs > li > a:focus {
border-top-color: #ddd;
border-bottom-color: transparent;
}
.tabs-below > .nav-tabs > .active > a,
-.tabs-below > .nav-tabs > .active > a:hover {
+.tabs-below > .nav-tabs > .active > a:hover,
+.tabs-below > .nav-tabs > .active > a:focus {
border-color: transparent #ddd #ddd #ddd;
}
@@ -4244,12 +4305,14 @@ input[type="submit"].btn.btn-mini {
border-radius: 4px 0 0 4px;
}
-.tabs-left > .nav-tabs > li > a:hover {
+.tabs-left > .nav-tabs > li > a:hover,
+.tabs-left > .nav-tabs > li > a:focus {
border-color: #eeeeee #dddddd #eeeeee #eeeeee;
}
.tabs-left > .nav-tabs .active > a,
-.tabs-left > .nav-tabs .active > a:hover {
+.tabs-left > .nav-tabs .active > a:hover,
+.tabs-left > .nav-tabs .active > a:focus {
border-color: #ddd transparent #ddd #ddd;
*border-right-color: #ffffff;
}
@@ -4267,12 +4330,14 @@ input[type="submit"].btn.btn-mini {
border-radius: 0 4px 4px 0;
}
-.tabs-right > .nav-tabs > li > a:hover {
+.tabs-right > .nav-tabs > li > a:hover,
+.tabs-right > .nav-tabs > li > a:focus {
border-color: #eeeeee #eeeeee #eeeeee #dddddd;
}
.tabs-right > .nav-tabs .active > a,
-.tabs-right > .nav-tabs .active > a:hover {
+.tabs-right > .nav-tabs .active > a:hover,
+.tabs-right > .nav-tabs .active > a:focus {
border-color: #ddd #ddd #ddd transparent;
*border-left-color: #ffffff;
}
@@ -4281,7 +4346,8 @@ input[type="submit"].btn.btn-mini {
color: #999999;
}
-.nav > .disabled > a:hover {
+.nav > .disabled > a:hover,
+.nav > .disabled > a:focus {
text-decoration: none;
cursor: default;
background-color: transparent;
@@ -4298,18 +4364,11 @@ input[type="submit"].btn.btn-mini {
min-height: 40px;
padding-right: 20px;
padding-left: 20px;
- background-color: #fafafa;
- background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
- background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
- background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
- background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
- background-repeat: repeat-x;
- border: 1px solid #d4d4d4;
+ background: #334455;
+ border: 1px solid #1c252f;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
*zoom: 1;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
@@ -4343,33 +4402,35 @@ input[type="submit"].btn.btn-mini {
margin-left: -20px;
font-size: 20px;
font-weight: 200;
- color: #777777;
- text-shadow: 0 1px 0 #ffffff;
+ color: #eeeeee;
+ text-shadow: 0 1px 0 #3d5165;
}
-.navbar .brand:hover {
+.navbar .brand:hover,
+.navbar .brand:focus {
text-decoration: none;
}
.navbar-text {
margin-bottom: 0;
line-height: 40px;
- color: #777777;
+ color: #eeeeee;
}
.navbar-link {
- color: #777777;
+ color: #eeeeee;
}
-.navbar-link:hover {
+.navbar-link:hover,
+.navbar-link:focus {
color: #333333;
}
.navbar .divider-vertical {
height: 40px;
margin: 0 9px;
- border-right: 1px solid #ffffff;
- border-left: 1px solid #f2f2f2;
+ border-right: 1px solid #3d5165;
+ border-left: 1px solid #334455;
}
.navbar .btn,
@@ -4379,7 +4440,9 @@ input[type="submit"].btn.btn-mini {
.navbar .btn-group .btn,
.navbar .input-prepend .btn,
-.navbar .input-append .btn {
+.navbar .input-append .btn,
+.navbar .input-prepend .btn-group,
+.navbar .input-append .btn-group {
margin-top: 0;
}
@@ -4534,9 +4597,9 @@ input[type="submit"].btn.btn-mini {
.navbar .nav > li > a {
float: none;
padding: 10px 15px 10px;
- color: #777777;
+ color: #eeeeee;
text-decoration: none;
- text-shadow: 0 1px 0 #ffffff;
+ text-shadow: 0 1px 0 #3d5165;
}
.navbar .nav .dropdown-toggle .caret {
@@ -4555,7 +4618,7 @@ input[type="submit"].btn.btn-mini {
.navbar .nav > .active > a:focus {
color: #555555;
text-decoration: none;
- background-color: #e5e5e5;
+ background-color: #293745;
-webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
-moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
@@ -4569,36 +4632,37 @@ input[type="submit"].btn.btn-mini {
margin-left: 5px;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
- background-color: #ededed;
- *background-color: #e5e5e5;
- background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
- background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
- background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
- background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
+ background-color: #2f3f4f;
+ *background-color: #293745;
+ background-image: -moz-linear-gradient(top, #334455, #293745);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#334455), to(#293745));
+ background-image: -webkit-linear-gradient(top, #334455, #293745);
+ background-image: -o-linear-gradient(top, #334455, #293745);
+ background-image: linear-gradient(to bottom, #334455, #293745);
background-repeat: repeat-x;
- border-color: #e5e5e5 #e5e5e5 #bfbfbf;
+ border-color: #293745 #293745 #0d1115;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff334455', endColorstr='#ff293745', GradientType=0);
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
}
.navbar .btn-navbar:hover,
+.navbar .btn-navbar:focus,
.navbar .btn-navbar:active,
.navbar .btn-navbar.active,
.navbar .btn-navbar.disabled,
.navbar .btn-navbar[disabled] {
color: #ffffff;
- background-color: #e5e5e5;
- *background-color: #d9d9d9;
+ background-color: #293745;
+ *background-color: #202b35;
}
.navbar .btn-navbar:active,
.navbar .btn-navbar.active {
- background-color: #cccccc \9;
+ background-color: #161e25 \9;
}
.navbar .btn-navbar .icon-bar {
@@ -4656,21 +4720,22 @@ input[type="submit"].btn.btn-mini {
border-bottom: 0;
}
-.navbar .nav li.dropdown > a:hover .caret {
- border-top-color: #555555;
- border-bottom-color: #555555;
+.navbar .nav li.dropdown > a:hover .caret,
+.navbar .nav li.dropdown > a:focus .caret {
+ border-top-color: #333333;
+ border-bottom-color: #333333;
}
.navbar .nav li.dropdown.open > .dropdown-toggle,
.navbar .nav li.dropdown.active > .dropdown-toggle,
.navbar .nav li.dropdown.open.active > .dropdown-toggle {
color: #555555;
- background-color: #e5e5e5;
+ background-color: #293745;
}
.navbar .nav li.dropdown > .dropdown-toggle .caret {
- border-top-color: #777777;
- border-bottom-color: #777777;
+ border-top-color: #eeeeee;
+ border-bottom-color: #eeeeee;
}
.navbar .nav li.dropdown.open > .dropdown-toggle .caret,
@@ -4710,15 +4775,8 @@ input[type="submit"].btn.btn-mini {
}
.navbar-inverse .navbar-inner {
- background-color: #1b1b1b;
- background-image: -moz-linear-gradient(top, #222222, #111111);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
- background-image: -webkit-linear-gradient(top, #222222, #111111);
- background-image: -o-linear-gradient(top, #222222, #111111);
- background-image: linear-gradient(to bottom, #222222, #111111);
- background-repeat: repeat-x;
+ background: #111111;
border-color: #252525;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
}
.navbar-inverse .brand,
@@ -4728,7 +4786,9 @@ input[type="submit"].btn.btn-mini {
}
.navbar-inverse .brand:hover,
-.navbar-inverse .nav > li > a:hover {
+.navbar-inverse .nav > li > a:hover,
+.navbar-inverse .brand:focus,
+.navbar-inverse .nav > li > a:focus {
color: #ffffff;
}
@@ -4757,7 +4817,8 @@ input[type="submit"].btn.btn-mini {
color: #999999;
}
-.navbar-inverse .navbar-link:hover {
+.navbar-inverse .navbar-link:hover,
+.navbar-inverse .navbar-link:focus {
color: #ffffff;
}
@@ -4773,7 +4834,8 @@ input[type="submit"].btn.btn-mini {
background-color: #111111;
}
-.navbar-inverse .nav li.dropdown > a:hover .caret {
+.navbar-inverse .nav li.dropdown > a:hover .caret,
+.navbar-inverse .nav li.dropdown > a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
@@ -4846,6 +4908,7 @@ input[type="submit"].btn.btn-mini {
}
.navbar-inverse .btn-navbar:hover,
+.navbar-inverse .btn-navbar:focus,
.navbar-inverse .btn-navbar:active,
.navbar-inverse .btn-navbar.active,
.navbar-inverse .btn-navbar.disabled,
@@ -4920,6 +4983,7 @@ input[type="submit"].btn.btn-mini {
}
.pagination ul > li > a:hover,
+.pagination ul > li > a:focus,
.pagination ul > .active > a,
.pagination ul > .active > span {
background-color: #f5f5f5;
@@ -4933,7 +4997,8 @@ input[type="submit"].btn.btn-mini {
.pagination ul > .disabled > span,
.pagination ul > .disabled > a,
-.pagination ul > .disabled > a:hover {
+.pagination ul > .disabled > a:hover,
+.pagination ul > .disabled > a:focus {
color: #999999;
cursor: default;
background-color: transparent;
@@ -5063,7 +5128,8 @@ input[type="submit"].btn.btn-mini {
border-radius: 15px;
}
-.pager li > a:hover {
+.pager li > a:hover,
+.pager li > a:focus {
text-decoration: none;
background-color: #f5f5f5;
}
@@ -5080,6 +5146,7 @@ input[type="submit"].btn.btn-mini {
.pager .disabled > a,
.pager .disabled > a:hover,
+.pager .disabled > a:focus,
.pager .disabled > span {
color: #999999;
cursor: default;
@@ -5209,8 +5276,8 @@ input[type="submit"].btn.btn-mini {
position: absolute;
z-index: 1030;
display: block;
- padding: 5px;
font-size: 11px;
+ line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
visibility: visible;
@@ -5222,24 +5289,28 @@ input[type="submit"].btn.btn-mini {
}
.tooltip.top {
+ padding: 5px 0;
margin-top: -3px;
}
.tooltip.right {
+ padding: 0 5px;
margin-left: 3px;
}
.tooltip.bottom {
+ padding: 5px 0;
margin-top: 3px;
}
.tooltip.left {
+ padding: 0 5px;
margin-left: -3px;
}
.tooltip-inner {
max-width: 200px;
- padding: 3px 8px;
+ padding: 8px;
color: #ffffff;
text-align: center;
text-decoration: none;
@@ -5295,7 +5366,7 @@ input[type="submit"].btn.btn-mini {
left: 0;
z-index: 1010;
display: none;
- width: 236px;
+ max-width: 276px;
padding: 1px;
text-align: left;
white-space: normal;
@@ -5342,6 +5413,10 @@ input[type="submit"].btn.btn-mini {
border-radius: 5px 5px 0 0;
}
+.popover-title:empty {
+ display: none;
+}
+
.popover-content {
padding: 9px 14px;
}
@@ -5473,7 +5548,8 @@ input[type="submit"].btn.btn-mini {
transition: all 0.2s ease-in-out;
}
-a.thumbnail:hover {
+a.thumbnail:hover,
+a.thumbnail:focus {
border-color: #0088cc;
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
@@ -5516,11 +5592,11 @@ a.thumbnail:hover {
margin: 0 0 5px;
}
-.media .pull-left {
+.media > .pull-left {
margin-right: 10px;
}
-.media .pull-right {
+.media > .pull-right {
margin-left: 10px;
}
@@ -5563,7 +5639,9 @@ a.thumbnail:hover {
}
a.label:hover,
-a.badge:hover {
+a.label:focus,
+a.badge:hover,
+a.badge:focus {
color: #ffffff;
text-decoration: none;
cursor: pointer;
@@ -5889,7 +5967,8 @@ a.badge:hover {
transition: 0.6s ease-in-out left;
}
-.carousel-inner > .item > img {
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
display: block;
line-height: 1;
}
@@ -5958,13 +6037,39 @@ a.badge:hover {
left: auto;
}
-.carousel-control:hover {
+.carousel-control:hover,
+.carousel-control:focus {
color: #ffffff;
text-decoration: none;
opacity: 0.9;
filter: alpha(opacity=90);
}
+.carousel-indicators {
+ position: absolute;
+ top: 15px;
+ right: 15px;
+ z-index: 5;
+ margin: 0;
+ list-style: none;
+}
+
+.carousel-indicators li {
+ display: block;
+ float: left;
+ width: 10px;
+ height: 10px;
+ margin-left: 5px;
+ text-indent: -999px;
+ background-color: #ccc;
+ background-color: rgba(255, 255, 255, 0.25);
+ border-radius: 5px;
+}
+
+.carousel-indicators .active {
+ background-color: #fff;
+}
+
.carousel-caption {
position: absolute;
right: 0;
View
4 stylesheets/style.css
@@ -1 +1,5 @@
@import "bootstrap.css";
+body {
+ padding-top: 40px;
+ background: url("/images/light_noise_diagonal.png");
+}
View
4 templates/home.html
@@ -1,3 +1,3 @@
-<section id="home">
+<div id="home">
<a href="/project">projects</a>
-</section>
+</div>
View
2 templates/project/list.html
@@ -1,2 +1,2 @@
-<a href="/">home</a>
+<h1>專案列表</h1>
<ol></ol>

0 comments on commit 5e085bb

Please sign in to comment.
Something went wrong with that request. Please try again.