Permalink
Browse files

fix missing css

  • Loading branch information...
1 parent 7296a74 commit 2f66494d994722ebb717ee63bcbb4a14d6acbd39 Alok Menghrajani committed Dec 1, 2011
Showing with 141 additions and 43 deletions.
  1. +2 −2 pixpaste/pixpaste.opa
  2. +9 −3 pixpaste/resources/ctrl_v.js
  3. +130 −38 pixpaste/resources/pixpaste.css
View
@@ -67,7 +67,7 @@ db /pixels : stringmap(pixel)
display(body):resource = (
Resource.styled_page(
"PixPaste",
- ["http://localhost/~amenghra/pixpaste.css"],
+ ["resources/pixpaste.css"],
<>
{body}
</>
@@ -174,7 +174,7 @@ display_pixpaste():resource = (
<img id=#preview class="preview" src="resources/preview.png"/>
<progress id=#progress value="0" max="20" style="display: none"/>
</div></div></div>
- <script src="http://localhost/~amenghra/ctrl_v.js"></script>
+ <script src="resources/ctrl_v.js"></script>
</div></div></div>
)
)
@@ -27,12 +27,18 @@
if (!dialogOpen) {
dialogOpen = true;
document.getElementById('file').click();
- console.log(document.getElementById('file').files);
- file_to_img(document.getElementById('file').files[0]);
dialogOpen = false;
}
+ return false;
}
- document.addEventListener("click", prompt_file_upload, false);
+ var e = document.createElement('input');
+ e.type = 'file';
+ e.id='file';
+ e.className='hidden';
+ e.onchange = function(){file_to_img(document.getElementById('file').files[0]);}
+ document.body.appendChild(e);
+ document.getElementById('file_chooser').addEventListener("click", prompt_file_upload, false);
+
if (navigator.userAgent.indexOf('Firefox') != -1) {
var e = document.createElement('div');
@@ -1,54 +1,146 @@
- body, html {
- margin: 0;
- overflow: hidden;
+body, html {
+ margin: 0;
+ overflow: hidden;
+ height: 100%;
+ width: 100%;
+}
+#outer {
+ height: 100%;
+ position: relative;
+ width: 100%;
+}
+#outer[id] {
+ display: table;
+ position: static;
+}
+#middle {
+ position: absolute;
+ text-align: center;
+ top: 50%;
+ width: 100%;
+}
+#middle[id] {
+ display: table-cell;
+ position: static;
+ vertical-align: middle;
+}
+#inner {
+ position: relative;
+ text-align: center;
+ top: -50%;
+}
+#inner {
+ margin-left: auto;
+ margin-right: auto;
+ width: 300px;
+ height: 200px;
+}
+.hidden {
+ display: none;
+}
+.center {
+ text-align: center;
+}
+.half {
+ width: 50%;
+ margin: 0;
+ float: left;
+}
+
+.half #inner {
+ width: 300px;
+ text-align: right;
+}
+
+.actions {
+ margin: 100px 0 0 0;
+}
+
+.preview {
+ max-width: 300px;
+ max-height: 200px;
+ border: 1px solid #DDDDDD;
+ border-radius: 4px 4px 4px 4px;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+ padding: 4px;
+}
+.menu {
+
+}
+footer {
+ background-color: #EEEEEE;
+ text-shadow: 0 1px 0 #FFFFFF;
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.024) inset;
+}
+
+ .help {
+ font-family: Corsiva, "Lucida Handwriting", script;
+ position: relative;
+ float: left;
+ left: 50%;
+ display: inline;
+ width: 0px;
+ height: 0px;
}
- #outer {
- height: 100%;
+ .help * {
+ display: inline;
position: relative;
- width: 100%;
+ white-space: nowrap;
}
- #outer[id] {
- display: table;
- position: static;
+ #help1 {
+ top: -80px;
+ left: -400px;
+ width: 0px;
}
- #middle {
- position: absolute;
- top: 50%;
- width: 100%;
- text-align: center;
+ #help1_arrow {
+ top: -50px;
+ left: -300px;
}
- #middle[id] {
- display: table-cell;
- vertical-align: middle;
- position: static;
+ #help2 {
+ top: 200px;
+ left: -400px;
}
- #inner {
- position: relative;
- top: -50%;
- text-align: left;
+ #help2_arrow {
+ top: 90px;
+ left: -280px;
+ }
+ #help3 {
+ top: -80px;
+ left: 250px;
+ }
+ #help3_arrow {
+ top: -50px;
+ left: 200px;
+ }
+ #help4 {
+ top: 200px;
+ left: 280px;
}
- #inner {
- width: 200px;
- margin-left: auto;
- margin-right: auto;
+ #help4_arrow {
+ top: 80px;
+ left: 200px;
}
-.hidden {
- display: none;
+#preview_div {
+ width: 300px;
+ border: 1px solid blue;
}
-.preview {
+#Body {
+ overflow: auto;
+}
+
+#one {
+ margin: 5% auto;
+ width: 80%;
+ height: 80%;
+ text-align: center;
+}
+#one img {
border: 1px solid #DDDDDD;
border-radius: 4px 4px 4px 4px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
- margin: 20px auto 20px auto;
padding: 4px;
- max-width: 800px;
- max-height: 800px;
+ max-height: 100%;
+ max-width: 100%;
}
-
-footer {
- background-color: #EEEEEE;
- text-shadow: 0 1px 0 #FFFFFF;
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.024) inset;
-}

0 comments on commit 2f66494

Please sign in to comment.