A Chrome extension for Write.as
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

174 lines
4.5 KiB

  1. <!doctype html>
  2. <html>
  3. <head>
  4. <title>Write.as</title>
  5. <style>
  6. body, input[type=submit], button, label[for=norm], textarea.norm {
  7. font-family: Lora, serif;
  8. }
  9. #url, #result-holder, label[for=sans], textarea.sans {
  10. font-family: 'Open Sans', sans-serif;
  11. }
  12. body {
  13. font-size: 100%;
  14. padding: 0.5em;
  15. }
  16. textarea, textarea:focus {
  17. border: 1px solid #dfdfdf;
  18. }
  19. textarea, textarea:focus, input {
  20. outline: 0;
  21. }
  22. textarea {
  23. margin-bottom: 0.5em;
  24. min-width: 38em;
  25. min-height: 20em;
  26. width: 100%;
  27. padding: 1em;
  28. font-size: 1em;
  29. box-sizing: border-box;
  30. resize: none;
  31. }
  32. input {
  33. padding: 0.5em;
  34. }
  35. input[type=submit], button {
  36. border: 1px solid rgb(114, 120, 191);
  37. background: rgb(114, 120, 191);
  38. color: white;
  39. margin-left: 0.5em;
  40. width: 7em;
  41. text-align: center;
  42. font-size: 0.86em;
  43. transition: all .2s ease-out;
  44. border-radius: .25em;
  45. }
  46. button {
  47. padding: 0.25em 1em;
  48. width: auto;
  49. }
  50. button.secondary {
  51. background: #aaa;
  52. border: 1px solid #aaa;
  53. }
  54. #buttons {
  55. text-align: right;
  56. }
  57. input[type=submit]:hover, button.primary:hover {
  58. background-color: #7d82c4;
  59. }
  60. button.secondary:hover {
  61. background-color: #afafaf;
  62. }
  63. input[type=submit].disabled, input[type=submit].disabled:hover {
  64. background: #ddd;
  65. color: #999;
  66. border-color: #eee;
  67. }
  68. #publish-holder, #result-holder {
  69. text-align: right;
  70. }
  71. body.popout a#popout, #result-holder, #account-tools, #modal {
  72. display: none;
  73. }
  74. #url {
  75. width: 18em;
  76. margin-right: 0.5em;
  77. }
  78. label[for=mono], label[for=wrap], label[for=code], textarea.mono, textarea.wrap, textarea.code {
  79. font-family: monospace, monospace;
  80. font-size: 1em;
  81. }
  82. textarea.mono, textarea.code {
  83. white-space: pre;
  84. }
  85. label, label[for=mono], label[for=wrap], label[for=code] {
  86. font-size: 0.86em;
  87. }
  88. body.popout #publish-holder, body.popout #result-holder {
  89. position: fixed;
  90. bottom: 1em;
  91. left: 1em;
  92. right: 1em;
  93. }
  94. #account-tools {
  95. margin-top: -0.5em;
  96. margin-bottom: 0.5em;
  97. font-size: 0.86em;
  98. }
  99. #account-tools a {
  100. line-height: 24px;
  101. margin-left: 0.5em;
  102. }
  103. body.popout textarea {
  104. position: fixed;
  105. top: 0;
  106. left: 0;
  107. right: 0;
  108. bottom: 4em;
  109. border: 0;
  110. border-bottom: 1px solid #dfdfdf;
  111. min-height: 0;
  112. }
  113. a#popout {
  114. padding: 0.5em;
  115. position: absolute;
  116. left: 0.75em;
  117. bottom: 0.75em;
  118. }
  119. a#popout img {
  120. vertical-align: middle;
  121. }
  122. #username {
  123. font-weight: bold;
  124. }
  125. #sync.disabled {
  126. display: inline;
  127. color: #999;
  128. font-style: italic;
  129. text-decoration: none;
  130. }
  131. #modal {
  132. position: absolute;
  133. top: 0;
  134. background: white;
  135. padding: 0.5em 2em 2em;
  136. border-bottom: 1px solid #dfdfdf;
  137. }
  138. </style>
  139. <script src="H.js"></script>
  140. <script src="popup.js"></script>
  141. </head>
  142. <body>
  143. <form name="postForm" method="post">
  144. <div id="account-tools">
  145. Writing as <span id="username">write.as</span>. <a id="sync" href="#">Sync...</a>
  146. </div>
  147. <div style="position: relative">
  148. <div id="modal">
  149. <div id="modal-body"></div>
  150. <div id="buttons"><button class="secondary">Cancel</button> <button class="primary">Sync</button></div>
  151. </div>
  152. </div>
  153. <textarea id="content" placeholder="Write..."></textarea>
  154. <div id="result-holder">
  155. <input id="url" type="url" readonly />
  156. <a id="url-link" target="_blank">Open</a>
  157. </div>
  158. <div id="publish-holder">
  159. <input type="radio" name="font" value="sans" id="sans" checked="checked" /><label for="sans"> Sans</label>
  160. <input type="radio" name="font" value="norm" id="norm" /><label for="norm"> Serif</label>
  161. <input type="radio" name="font" value="mono" id="mono" /><label for="mono"> Monospace</label>
  162. <input type="radio" name="font" value="wrap" id="wrap" /><label for="wrap"> Wrap</label>
  163. <input type="radio" name="font" value="code" id="code" /><label for="code"> Code</label>
  164. <input id="publish" type="submit" value="Publish" />
  165. <a href="#" id="popout"><img src="img/ic_launch.svg" /></a>
  166. </div>
  167. </form>
  168. <link href='fonts.css' rel='stylesheet' type='text/css'>
  169. </body>
  170. </html>