Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: benjaminplee/Bacobahnen
...
head fork: benjaminplee/Bacobahnen
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 22 additions and 12 deletions.
  1. +8 −9 web/css/main.css
  2. +6 −2 web/index.html
  3. +8 −1 web/js/main.js
View
17 web/css/main.css
@@ -42,19 +42,11 @@ a:hover, a:active {
.draggable {
position: absolute;
width: 150px;
- height: 150px;
+ height: 75px;
margin: 10px;
padding: 5px;
}
-.red {
- background: #D8F3C9;
-}
-
-.blue {
- background: #ACD1E9;
-}
-
footer {
text-align: center;
position: absolute;
@@ -69,3 +61,10 @@ footer {
border-width: 0;
float: right;
}
+
+/* example colors, should be replaced with better more flexible options */
+.red { background: #FFCCCB; }
+.blue { background: #ACD1E9; }
+.green { background: #D8F3C9; }
+.orange { background: #FFCC00; }
+
View
8 web/index.html
@@ -15,8 +15,12 @@
<h1>Bacobahnen</h1>
</header>
- <div class="draggable ui-widget-content red">a card</div>
- <div class="draggable ui-widget-content blue">another card</div>
+ <section id="board">
+ <article class="draggable ui-widget-content red">Take out the trash</article>
+ <article class="draggable ui-widget-content blue">Make the bed</article>
+ <article class="draggable ui-widget-content green">Run around and around and around and around with the kids</article>
+ <article class="draggable ui-widget-content orange">Work out</article>
+ </section>
<aside>
<a href="https://github.com/benjaminplee/Bacobahnen"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png" alt="Fork me on GitHub" /></a>
View
9 web/js/main.js
@@ -1,6 +1,13 @@
$(function() {
+ var grid_size = {x: 170, y: 95}; // article width + 2 * margin (need to make this not known to js)
+
$(".draggable").draggable({
- grid: [170, 170],
+ grid: [grid_size.x, grid_size.y],
stack: ".draggable"
});
+
+ // just for examples
+ $("article").each(function(i) {
+ $(this).css({"left": i * grid_size.x});
+ });
})

No commit comments for this range

Something went wrong with that request. Please try again.