factory.css 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. /**
  2. * @license
  3. * Blockly Demos: Block Factory
  4. *
  5. * Copyright 2016 Google Inc.
  6. * https://developers.google.com/blockly/
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. html, body {
  21. height: 100%;
  22. min-height: 375px;
  23. }
  24. body {
  25. background-color: #fff;
  26. font-family: sans-serif;
  27. margin: 0 5px;
  28. overflow: hidden;
  29. }
  30. h1 {
  31. font-weight: normal;
  32. font-size: 140%;
  33. }
  34. h3 {
  35. margin-top: 5px;
  36. margin-bottom: 0;
  37. }
  38. table {
  39. border: none;
  40. border-collapse: collapse;
  41. height: 100%;
  42. margin: 0;
  43. padding: 0;
  44. width: 100%;
  45. }
  46. td {
  47. vertical-align: top;
  48. padding: 0;
  49. }
  50. p {
  51. display: block;
  52. -webkit-margin-before: 0em;
  53. -webkit-margin-after: 0em;
  54. -webkit-margin-start: 0px;
  55. -webkit-margin-end: 0px;
  56. padding: 5px 0px;
  57. }
  58. #factoryHeader {
  59. display: table;
  60. height: 10%;
  61. }
  62. #blockly {
  63. position: absolute;
  64. }
  65. #blocklyMask {
  66. background-color: #000;
  67. cursor: not-allowed;
  68. display: none;
  69. position: fixed;
  70. opacity: 0.2;
  71. z-index: 9;
  72. }
  73. #preview {
  74. position: absolute;
  75. }
  76. pre,
  77. #languageTA {
  78. border: #ddd 1px solid;
  79. margin-top: 0;
  80. position: absolute;
  81. overflow: scroll;
  82. }
  83. #languageTA {
  84. display: none;
  85. font: 10pt monospace;
  86. }
  87. .downloadButton {
  88. padding: 5px;
  89. }
  90. .disabled {
  91. color: #888;
  92. }
  93. button:disabled, .buttonStyle:disabled {
  94. opacity: 0.6;
  95. }
  96. button>*, .buttonStyle>* {
  97. opacity: 1;
  98. vertical-align: text-bottom;
  99. }
  100. button, .buttonStyle {
  101. border-radius: 4px;
  102. border: 1px solid #ddd;
  103. background-color: #eee;
  104. color: #000;
  105. padding: 10px;
  106. margin: 10px 5px;
  107. font-size: small;
  108. }
  109. .buttonStyle:hover:not(:disabled), button:hover:not(:disabled) {
  110. box-shadow: 2px 2px 5px #888;
  111. }
  112. .buttonStyle:hover:not(:disabled)>*, button:hover:not(:disabled)>* {
  113. opacity: 1;
  114. }
  115. #linkButton {
  116. display: none;
  117. }
  118. #helpButton {
  119. float: right;
  120. }
  121. #blockFactoryContent {
  122. height: 85%;
  123. width: 100%;
  124. overflow: hidden;
  125. }
  126. #blockFactoryPreview {
  127. height: 100%;
  128. width: 100%;
  129. }
  130. #blockLibraryContainer {
  131. vertical-align: bottom;
  132. }
  133. #blockLibraryControls {
  134. text-align: right;
  135. vertical-align: middle;
  136. }
  137. #previewContainer {
  138. vertical-align: bottom;
  139. }
  140. #buttonContainer {
  141. text-align: right;
  142. vertical-align: middle;
  143. }
  144. #files {
  145. position: absolute;
  146. visibility: hidden;
  147. }
  148. .toolbox {
  149. display: none;
  150. }
  151. #blocklyWorkspaceContainer {
  152. width: 50%;
  153. }
  154. #workspaceFactoryContent {
  155. clear: both;
  156. display: none;
  157. height: 90%;
  158. overflow-x: hidden;
  159. overflow-y: scroll;
  160. }
  161. /* Exporter */
  162. #blockLibraryExporter {
  163. clear: both;
  164. display: none;
  165. height: 90%;
  166. overflow-x: hidden;
  167. overflow-y: scroll;
  168. }
  169. #exportSelector {
  170. display: inline-block;
  171. float: left;
  172. height: 70%;
  173. width: 30%;
  174. }
  175. #exportSettings {
  176. float: left;
  177. overflow: hidden;
  178. padding-left: 16px;
  179. width: 20%;
  180. }
  181. #selectedBlocksTextContainer {
  182. max-height: 200px;
  183. overflow-y: scroll;
  184. padding-bottom: 2em;
  185. }
  186. ::-webkit-scrollbar {
  187. -webkit-appearance: none;
  188. width: 7px;
  189. }
  190. ::-webkit-scrollbar-thumb {
  191. border-radius: 4px;
  192. background-color: #ccc;
  193. -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
  194. }
  195. .subsettings {
  196. margin: 0px 25px;
  197. }
  198. #exporterHiddenWorkspace {
  199. display: none;
  200. }
  201. #exportPreview {
  202. float: right;
  203. height: 90%;
  204. overflow: hidden;
  205. width: 45%;
  206. }
  207. .exportPreviewTextArea {
  208. display: block;
  209. float: right;
  210. height: 40%;
  211. width: 100%;
  212. }
  213. #genStubs_textArea, #blockDefs_textArea {
  214. display: block;
  215. height: 80%;
  216. margin-right: 20px;
  217. max-height: 300px;
  218. overflow: scroll;
  219. position: static;
  220. }
  221. #blockDefs_label, #genStubs_label {
  222. display: block;
  223. }
  224. #blockSelector {
  225. background-color: #eee;
  226. border: 1px solid lightgrey;
  227. width: 80%;
  228. height: 90%;
  229. overflow-y: scroll;
  230. position: relative;
  231. }
  232. /* Exporter Block Option */
  233. .blockOption {
  234. background-color: #eee;
  235. padding: 15px 20px;
  236. width: 95%;
  237. }
  238. .blockOption_check_label {
  239. position: relative;
  240. }
  241. .blockOption_check {
  242. float: left;
  243. padding: 4px;
  244. }
  245. .blockOption_label {
  246. float: left;
  247. max-width: inherit;
  248. overflow-y: scroll;
  249. word-wrap: break-word;
  250. }
  251. .blockOption_preview {
  252. height: 100px;
  253. padding-top: 10px;
  254. width: 90%;
  255. }
  256. /* Block Library */
  257. #dropdownDiv_blockLib {
  258. max-height: 65%;
  259. overflow-y: scroll;
  260. }
  261. #button_blockLib {
  262. border-color: darkgrey;
  263. font-size: large;
  264. }
  265. .button_alert {
  266. background-color: #fcc;
  267. border-color: #f99;
  268. }
  269. .button_warn {
  270. background-color: #aea;
  271. border-color: #5d5;
  272. }
  273. /* Tabs */
  274. .tab {
  275. float: left;
  276. padding: 5px 19px;
  277. }
  278. .tab:hover:not(.tabon){
  279. background-color: #e8e8e8;
  280. }
  281. .tab.tabon {
  282. background-color: #ccc;
  283. }
  284. .tab.taboff {
  285. cursor: pointer;
  286. }
  287. #tabContainer {
  288. background-color: #f8f8f8;
  289. border-top: 1px solid #ddd;
  290. border-bottom: 1px solid #ddd;
  291. display: table;
  292. width: 100%;
  293. }
  294. /* Workspace Factory */
  295. section {
  296. float: left;
  297. }
  298. aside {
  299. float: right;
  300. }
  301. #categoryTable>table {
  302. border: 1px solid #ccc;
  303. border-bottom: none;
  304. width: auto;
  305. }
  306. td.tabon {
  307. background-color: #ccc;
  308. border-bottom-color: #ccc;
  309. padding: 5px 19px;
  310. }
  311. td.taboff {
  312. cursor: pointer;
  313. padding: 5px 19px;
  314. }
  315. td.taboff:hover {
  316. background-color: #eee;
  317. }
  318. .large {
  319. font-size: large;
  320. }
  321. .inputfile {
  322. height: 0;
  323. opacity: 0;
  324. overflow: hidden;
  325. position: absolute;
  326. width: 0;
  327. z-index: -1;
  328. }
  329. #wfactoryHeader {
  330. height: 29%;
  331. padding: 0.5%;
  332. }
  333. #workspaceTabs {
  334. background-color: #f8f8f8;
  335. border: 1px solid #ccc;
  336. display: table;
  337. width: auto;
  338. }
  339. #toolbox_section {
  340. height: 85%;
  341. width: 60%;
  342. }
  343. #previewHelp {
  344. padding: 10px;
  345. width: 98%;
  346. }
  347. #toolbox_blocks {
  348. height: 100%;
  349. width: 100%;
  350. }
  351. #preview_blocks {
  352. height: 80%;
  353. padding: 10px;
  354. width: 100%;
  355. }
  356. #createDiv {
  357. height: 79%;
  358. padding: 0.5%;
  359. width: 60%;
  360. }
  361. #previewDiv {
  362. border: 10px solid #eee;
  363. height: 77%;
  364. margin-right: 0.5%;
  365. padding-bottom: 10px;
  366. width: 35%;
  367. }
  368. #previewBorder {
  369. border: 5px solid #ddd;
  370. height: 100%;
  371. padding-right: 20px;
  372. }
  373. .disabled {
  374. background-color: white;
  375. opacity: 0.5;
  376. }
  377. #toolbox_div {
  378. display: table;
  379. height: auto;
  380. margin-right: 5%;
  381. overflow: hidden;
  382. width: 35%;
  383. }
  384. #preload_div {
  385. display: table;
  386. height: 75%;
  387. margin-left: 2%;
  388. margin-right: 2%;
  389. max-height: 500px;
  390. overflow: hidden;
  391. overflow-y: scroll;
  392. width: 30%;
  393. }
  394. #shadowBlockDropdown {
  395. height: 15%;
  396. }
  397. #preloadHelp {
  398. display: table-row;
  399. height: 30%;
  400. }
  401. #workspace_options {
  402. display: table-row;
  403. margin-top: 2%;
  404. }
  405. #disable_div {
  406. background-color: white;
  407. height: 100%;
  408. left: 0;
  409. opacity: .5;
  410. position: absolute;
  411. top: 0;
  412. width: 100%;
  413. z-index: -1; /* Start behind workspace */
  414. }
  415. #grid_options, #zoom_options, #maxBlockNumber_option {
  416. padding-left: 15px;
  417. }
  418. #modalShadow {
  419. display: none;
  420. position: fixed;
  421. top: 0;
  422. right: 0;
  423. bottom: 0;
  424. left: 0;
  425. background: rgba(0, 0, 0, 0.05);
  426. z-index: 100;
  427. }
  428. /* Rules for Closure popup color picker */
  429. .goog-palette {
  430. outline: none;
  431. cursor: default;
  432. }
  433. .goog-palette-cell {
  434. height: 13px;
  435. width: 15px;
  436. margin: 0;
  437. border: 0;
  438. text-align: center;
  439. vertical-align: middle;
  440. border-right: 1px solid #000;
  441. font-size: 1px;
  442. }
  443. .goog-palette-colorswatch {
  444. border: 1px solid #000;
  445. height: 13px;
  446. position: relative;
  447. width: 15px;
  448. }
  449. .goog-palette-cell-hover .goog-palette-colorswatch {
  450. border: 1px solid #fff;
  451. }
  452. .goog-palette-cell-selected .goog-palette-colorswatch {
  453. border: 1px solid #000;
  454. color: #fff;
  455. }
  456. .goog-palette-table {
  457. border: 1px solid #000;
  458. border-collapse: collapse;
  459. }
  460. .goog-popupcolorpicker {
  461. position: absolute;
  462. z-index: 101; /* On top of the modal Shadow. */
  463. }
  464. /* The container <div> - needed to position the dropdown content */
  465. .dropdown {
  466. display: inline-block;
  467. }
  468. /* Dropdown Content (Hidden by Default) */
  469. .dropdown-content {
  470. background-color: #fff;
  471. box-shadow: 0px 8px 16px 0px rgba(0,0,0,.2);
  472. display: none;
  473. min-width: 170px;
  474. opacity: 1;
  475. position: absolute;
  476. z-index: 101; /* On top of the modal Shadow. */
  477. }
  478. /* Links inside the dropdown */
  479. .dropdown-content a, .dropdown-content label {
  480. color: black;
  481. display: block;
  482. font-size: small;
  483. padding: 12px 16px;
  484. text-decoration: none;
  485. }
  486. /* Change color of dropdown links on hover. */
  487. .dropdown-content a:hover, .dropdown-content label:hover {
  488. background-color: #EEE;
  489. }
  490. /* Change color of dropdown links on selected. */
  491. .dropdown-content-selected {
  492. background-color: #DDD;
  493. }
  494. /* Show the dropdown menu */
  495. .show {
  496. display: block;
  497. }
  498. .shadowBlock>.blocklyPath {
  499. fill-opacity: .5;
  500. stroke-opacity: .5;
  501. }
  502. .shadowBlock>.blocklyPathLight,
  503. .shadowBlock>.blocklyPathDark {
  504. display: none;
  505. }