Skip to content

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.
  • 7 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Showing with 67 additions and 33 deletions.
  1. +20 −12 resources/mobile.css
  2. BIN resources/opado-bg-gradient-tile.jpg
  3. +6 −3 resources/style.css
  4. +5 −1 src/main.opa
  5. +7 −7 src/todo.opa
  6. +15 −6 src/ui.opa
  7. +14 −4 src/user.opa
View
32 resources/mobile.css
@@ -1,7 +1,14 @@
+/**
+ * @author Ida Swarczewskaja (CSS & design)
+ */
+
/** Mobile Portrait: width 320px **/
@media only screen and (max-width: 767px) {
- .container, .container-fluid, .modal { width: 300px; }
+ .topbar {}
+ .hero-unit {}
+ .container, .container-fluid, .modal, .footer { width: 300px; }
+ .container {margin-bottom:10px;}
/* Columns */
.span1, .span2, .span3, .span4, .span5, .span6, .span7, .span8, .span9, .span10, .span11, .span12, .span12, .span13, .span14, .span15,
@@ -10,23 +17,24 @@
/* Offsets */
.row > .offset1, .row > .offset2, .row > .offset3, .row > .offset4, .row > .offset5, .row > .offset6, .row > .offset7, .row > .offset8,
.row > .offset9, .row > .offset10, .row > .offset11, .row > .offset12, .row > .offset-one-third, .row > .offset-two-thirds { margin-left: 0; }
-
- .o-inset2 {padding: 20px;}
-
- img {max-width:300px;}
- #quotes > *{visibility:hidden;}
- .slideshow {height:auto;}
- .slideshow .span6 {display:none;}
- .slideshow .btn {margin-bottom:10px;}
- #slideshow h1 {font-size:22px;}
- #slideshow h4 {font-size:14px;line-height:16px;}
+
+ .content form, .content h1 {margin-left:0px;}
+
+ input.xlarge, #login_box input {width:265px;}
+ .btn.large, button[type="submit"] {width:277px;font-size:18px;}
+ input#new_todo{width:285px;}
+ ul#todo_list .icon.icon-remove {display:inline-block;}
+ ul#todo_list input[type="checkbox"]{margin-right:6px;}
}
/** Mobile Landscape: width 480px **/
@media only screen and (min-width: 480px) and (max-width: 767px) {
- .container, .container-fluid { width: 420px; }
+ .container, .container-fluid, .modal, .footer { width: 420px; }
+ .container {margin-bottom:10px;}
/* Columns */
.span1, .span2, .span3, .span4, .span5, .span6, .span7, .span8, .span9, .span10, .span11, .span12, .span12, .span13, .span14, .span15, .span16, .span17, .span18, .span19, .span20, .span21, .span22, .span23, .span24, .span-one-third, .span-two-thirds{ width: 420px; }
+
+ .content form, .content h1 {margin-left:0px;}
}
View
BIN resources/opado-bg-gradient-tile.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 resources/style.css
@@ -1,11 +1,13 @@
/**
* @author Ida Swarczewskaja (CSS & design)
*/
-html {background: #45231A url('/resources/opado-bg-tile.jpg') repeat 0 0;}
+html {background: #600B00 url('/resources/opado-bg-tile.jpg') repeat 0 0;}
body {
- background: url('/resources/opado-bg-gradient-tile.jpg') repeat-x bottom left;
+ background: url('/resources/opado-bg-gradient-tile.jpg') repeat-x top left;
color: #6C6B66;
}
+.topbar {background: url('/resources/opado-bg-gradient-tile.jpg') repeat-x top left;}
+.hero-unit {position:relative; top:60px; }
/* Links */
a {color:#600B00;text-decoration:none;}
@@ -31,6 +33,7 @@ a img {border: none;}
}
.btn:hover, button[type="submit"]:hover, .topbar a.btn:hover {color:#DDC;}
.btn.large, button[type="submit"] {width:150px;}
+.btn > .icon {margin-left:-3px;}
/* Add class .btn to loginbox submit button and remove this style */
button[type="submit"] {
@@ -192,5 +195,5 @@ ul#todo_list .display:hover .icon.icon-remove {display:inline-block;}
.footer a {color:#EED;}
/* Help block */
-.help-block {margin-left:10px;}
+/*.help-block {margin-left:10px;}*/
.help-block, .footer {color:#ccb;}
View
6 src/main.opa
@@ -4,7 +4,9 @@ import opado.user
import opado.admin
import opado.todo
-function with_request(f){ f(ThreadContext.get({current}).request ? error("no request")) }
+function with_request(f){
+ f(ThreadContext.get({current}).request ? error("no request"))
+}
urls = parser
{Rule.debug_parse_string((function(s){Log.notice("URL", s)}))}
@@ -20,3 +22,5 @@ Server.start(Server.http,
{register:["/resources/js/google_analytics.js"]},
{custom:urls}]
)
+
+
View
14 src/todo.opa
@@ -107,14 +107,13 @@ module Todo {
<a class="btn pull-right" onclick={function(_){User.logout()}}>Logout</a>
</div>
</div>
- <div class="container" id="todoapp">
- <div class="hero-unit">
- <div id=#create_todo>
- <input id=#new_todo class="xlarge" placeholder="What needs to be done?" type="text"
+ <div class="container hero-unit">
+ <div id=#create_todo>
+ <input id=#new_todo class="xlarge" placeholder="What needs to be done?" type="text"
onnewline={function(_){add_todo(Dom.get_value(#new_todo))}} />
- </div>
- <span class="help-block">Note: This is beta version. No guarentee your data wont be lost.</span>
- </div>
+ </div>
+ </div>
+ <div class="container" id="todoapp">
<div class="content">
<div id=#todos>
<ul id=#todo_list onready={function(_){add_todos()}} class="unstyled"></ul>
@@ -133,6 +132,7 @@ module Todo {
</p>
</div>
</div>
+ <div class="footer">Note: This is beta version. No guarentee your data wont be lost.</div>
</div>
}
View
21 src/ui.opa
@@ -1,8 +1,12 @@
+/*
+ * @author Ida Swarczewskaja
+**/
+
package opado.ui
import stdlib.themes.bootstrap.core
-module Desktop {
+/*module Desktop {
custom_css = {
custom_body: none,
custom_headers: none,
@@ -15,8 +19,8 @@ module IPhone {
custom_css = {
custom_body: none,
custom_headers: none,
- custom_css: ["http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css"],
- custom_js: ["http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"],
+ custom_css: ["/resources/bootstrap.min.css", "/resources/style.css", "/resources/mobile.css"],
+ custom_js: [],
}
custom_css_funs = [ function(_){some(IPhone.custom_css)}]
}
@@ -26,14 +30,19 @@ custom_css_funs = [
match( ua ){
| { environment : { iPhone }, renderer:_ } : some(IPhone.custom_css)
| _ : some(Desktop.custom_css)
- }
+ }
}
]
+*/
function mypage(title,body){
Resource.full_page(title, body,
- <></>,
+ <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
+ <link href="/resources/bootstrap.min.css" rel="stylesheet" type="text/css"/>
+ <link href="/resources/style.css" rel="stylesheet" type="text/css"/>
+ <link href="/resources/mobile.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 0px) and (max-width: 320px)"/>
+ <link href="/resources/tablet.css" rel="stylesheet" type="text/css" media="only screen and (min-width: 321px) and (max-width: 768px)"/>,
web_response {success},
- Resource_private.default_customizers ++ custom_css_funs
+ Resource_private.default_customizers //++ custom_css_funs
)
}
View
18 src/user.opa
@@ -100,7 +100,7 @@ module User {
} else {
mypage("Login",
<a href="http://github.com/tsloughter/opado" xmlns="http://www.w3.org/1999/xhtml">
- <img src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" id="cfyzwpwbekcrcqccmvfnzflwwxddvqsz" style="position: absolute; top: 0em; right: 0em; border-top-width: 0em; border-right-width: 0em; border-bottom-width: 0em; border-left-width: 0em; border-style: initial; border-color: initial; border-image: initial; "/>
+ <img src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" id="cfyzwpwbekcrcqccmvfnzflwwxddvqsz" style="position: absolute; top: 0em; right: 0em; border-top-width: 0em; border-right-width: 0em; border-bottom-width: 0em; border-left-width: 0em; border-style: initial; border-color: initial; border-image: initial; z-index:10001;"/>
</a>
<div class="topbar">
<div class="container">
@@ -115,6 +115,16 @@ module User {
<a href="/user/new">Sign Up</a>
</div>
</div>
+ <div class="footer">
+ <span>Implementation:
+ <a href="http://blog.erlware.org/2011/10/04/todomvc-in-opa/">Part 1</a>,
+ <a href="http://blog.erlware.org/2011/10/06/opado-data-storage/">Part 2</a>,
+ <a href="http://blog.erlware.org/2011/10/15/opado-personal-todo-lists/">Part 3</a>,
+ <a href="http://blog.erlware.org/2011/11/06/adding-js-to-all-opa-resources-use-case-google-analytics/">Google Analytics</a>,
+ <a href="http://blog.erlware.org/2011/11/06/major-opado-speed-up-with-publish/">Improving performance</a></span> ·
+ <span>Fork on <a href="https://github.com/tsloughter/opado">GitHub</a></span> ·
+ <span>Built with <a href="http://opalang.org"><img src="/resources/opa-logo-small.png" alt="Opa"/></a></span>
+ </>
</div>
)
}
@@ -122,7 +132,7 @@ module User {
function new(){
<a href="http://github.com/tsloughter/opado" xmlns="http://www.w3.org/1999/xhtml">
- <img src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" id="cfyzwpwbekcrcqccmvfnzflwwxddvqsz" style="position: absolute; top: 0em; right: 0em; border-top-width: 0em; border-right-width: 0em; border-bottom-width: 0em; border-left-width: 0em; border-style: initial; border-color: initial; border-image: initial; "/>
+ <img src="https://a248.e.akamai.net/assets.github.com/img/7afbc8b248c68eb468279e8c17986ad46549fb71/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" id="cfyzwpwbekcrcqccmvfnzflwwxddvqsz" style="position: absolute; top: 0em; right: 0em; border-top-width: 0em; border-right-width: 0em; border-bottom-width: 0em; border-left-width: 0em; border-style: initial; border-color: initial; border-image: initial; z-index:10001;"/>
</a>
<div class="topbar">
<div class="container">
@@ -149,7 +159,6 @@ module User {
<div class="well">Already user? <a href="/login">Login here</a></div>
</div>
<div class="footer">
-
<span>Read about the implementation:
<a href="http://blog.erlware.org/2011/10/04/todomvc-in-opa/">Part 1</a>,
<a href="http://blog.erlware.org/2011/10/06/opado-data-storage/">Part 2</a>,
@@ -157,7 +166,7 @@ module User {
<a href="http://blog.erlware.org/2011/11/06/adding-js-to-all-opa-resources-use-case-google-analytics/">Google Analytics</a>,
<a href="http://blog.erlware.org/2011/11/06/major-opado-speed-up-with-publish/">Improving performance</a></span> ·
<span>Fork on <a href="https://github.com/tsloughter/opado">GitHub</a></span> ·
- <span>Built with <a href="http://opalang.org"><img src="/resources/opa-logo-small.png" alt="Opa"/></a></span>
+ <span >Built with <a href="http://opalang.org"><img src="/resources/opa-logo-small.png" alt="Opa"/></a></span>
</>
</>
}
@@ -239,3 +248,4 @@ module User {
| "/view/" login = (.*) -> function(_req) { view(Text.to_string(login)) }
| .* -> function(_req){start()}
}
+

No commit comments for this range

Something went wrong with that request. Please try again.