style.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. $dark-purple: #423443;
  2. $blue: #2eafc2;
  3. $red: #d12521;
  4. $grey: #dad7d2;
  5. $dark-grey: #261e26;
  6. @mixin all-transition{
  7. -moz-transition: all 0.2s ease-in-out;
  8. -webkit-transition: all 0.2s ease-in-out;
  9. -o-transition: all 0.2s ease-in-out;
  10. -ms-transition: all 0.2s ease-in-out;
  11. transition: all 0.2s ease-in-out;
  12. }
  13. * {
  14. margin: 0;
  15. padding: 0;
  16. -moz-box-sizing: border-box;
  17. -webkit-box-sizing: border-box;
  18. box-sizing: border-box;
  19. }
  20. html { font-size: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; -webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
  21. ::-moz-selection { background: darken($dark-purple, 10%); color: #fefefe; text-shadow: none; }
  22. ::selection { background: darken($dark-purple, 10%); color: #fefefe; text-shadow: none; }
  23. .clearfix:before,
  24. .clearfix:after {
  25. content: " ";
  26. display: table;
  27. }
  28. .clearfix:after {
  29. clear: both;
  30. }
  31. .clearfix {
  32. zoom:1;
  33. }
  34. footer, header, section {
  35. display: block;
  36. }
  37. body, html {
  38. color: #424242;
  39. font-family: 'Open Sans', sans-serif;
  40. background: #fefefe;
  41. font-size: 16px;
  42. line-height: 1.5;
  43. font-weight: 400;
  44. }
  45. a {
  46. font-size: 1rem;
  47. color: darken($blue, 5%);
  48. text-decoration: underline; }
  49. a:hover {
  50. color: $blue;
  51. text-decoration: none;
  52. @include all-transition }
  53. p {
  54. text-align: left;
  55. margin-bottom: 1em;
  56. font-size: 1rem;
  57. }
  58. h1.knight {
  59. height: 122px;
  60. width: 122px;
  61. background: url('../images/knight.png') no-repeat;
  62. margin: 2em auto 0.5em auto;
  63. }
  64. h2 {
  65. font-family: 'Cherry Swash';
  66. font-weight: 400;
  67. font-size: 2rem;
  68. text-align: center;
  69. color: $dark-purple;
  70. margin-bottom: 0.5em;
  71. }
  72. h3 {
  73. font-weight: 600;
  74. font-size: 1.5rem;
  75. margin: 1em 0 0.5em 0;
  76. color: lighten($dark-purple, 5%);
  77. }
  78. .alpha {
  79. font-size: 1.125rem;
  80. }
  81. .center {
  82. text-align: center !important;
  83. }
  84. .margin-fifty{
  85. margin: 50px 0;
  86. }
  87. .last-origin{
  88. background: lighten($blue, 25%) !important;
  89. }
  90. .last-target{
  91. background: lighten($blue, 20%) !important;
  92. }
  93. .chat{
  94. text-decoration: none;
  95. color: darken($blue, 10%);
  96. margin-right: 1em;
  97. line-height: 50px;
  98. float: right !important;
  99. cursor: pointer;
  100. font-weight: 600;
  101. &:hover{
  102. color: darken($blue, 5%);
  103. .new-message{
  104. color: $red;
  105. }
  106. }
  107. img{
  108. vertical-align: middle;
  109. }
  110. .new-message{
  111. color: $red;
  112. }
  113. }
  114. .fork{
  115. float: left;
  116. width: 149px;
  117. height: 149px;
  118. background: url('../images/forkme.png') no-repeat;
  119. position: absolute;
  120. }
  121. header {
  122. margin: 0 auto;
  123. max-width: 800px;
  124. width: 100%;
  125. height: 50px;
  126. }
  127. #container_wrapper {
  128. max-width: 960px;
  129. width: 100%;
  130. height: auto;
  131. padding: 1em 2em;
  132. margin: 0 auto;
  133. clear: both;
  134. }
  135. #container {
  136. width: 100%;
  137. min-height: 600px;
  138. margin: 0px 0px 20px 0px;
  139. float: left;
  140. }
  141. #form{
  142. width: 100%;
  143. height: 150px;
  144. margin: 0 auto;
  145. }
  146. input, button{
  147. font-family: 'Open Sans';
  148. }
  149. input.game_link {
  150. width: 80%;
  151. height: 50px;
  152. line-height: 50px;
  153. font-size: 1.125rem;
  154. color: #fff;
  155. border: 0;
  156. border-bottom: 2px solid darken($dark-purple, 8%);
  157. border-left: 4px solid $blue;
  158. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  159. background: $dark-purple;
  160. padding: 0 1em;
  161. float: left;
  162. border-radius: 2px;
  163. box-shadow: inset 0 -2px darken($dark-purple, 8%);
  164. }
  165. .game_link:hover {
  166. background: lighten($dark-purple, 3%);
  167. border-bottom: 2px solid darken($dark-purple, 3%);;
  168. box-shadow: inset 0 -2px darken($dark-purple, 3%);
  169. @include all-transition;
  170. }
  171. .game_link:focus {
  172. color: #eee;
  173. }
  174. .button {
  175. width: 15%;
  176. height: 50px;
  177. display: block;
  178. font-size: 1.125rem;
  179. border-radius: 2px;
  180. border: 0;
  181. border-bottom: 2px solid darken($blue, 5%);
  182. text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  183. background: $blue;
  184. color: white;
  185. cursor: pointer;
  186. float: right;
  187. box-shadow: inset 0 -2px darken($blue, 5%);
  188. position: relative;
  189. }
  190. .button:hover{
  191. background: lighten($blue, 5%);
  192. border-bottom: 2px solid darken($blue, 2%);
  193. box-shadow: inset 0 -2px darken($blue, 2%);
  194. @include all-transition;
  195. }
  196. .button:active{
  197. top: 1px;
  198. }
  199. a.button{
  200. width: 120px;
  201. line-height: 46px;
  202. text-align: center;
  203. text-decoration: none;
  204. }
  205. a.button:hover{
  206. color: white;
  207. }
  208. .resign {
  209. background: $red;
  210. border-color: darken($red, 5%);
  211. box-shadow: inset 0 -2px darken($red, 5%);
  212. margin-right: 10px;
  213. }
  214. .resign:hover {
  215. background: lighten($red, 5%);
  216. border-bottom: 2px solid darken($red, 2%);
  217. box-shadow: inset 0 -2px darken($red, 2%);
  218. @include all-transition;
  219. }
  220. p#waiting {
  221. font-family: 'Cherry Swash';
  222. font-size: 1.275rem;
  223. color: darken($red, 5%);
  224. width: 100%;
  225. text-align: center;
  226. margin: 15px 0px 0px 0px;
  227. display: none;
  228. float: left;
  229. }
  230. footer {
  231. font-size: 1rem;
  232. width: 100%;
  233. line-height: 2em;
  234. text-align: center;
  235. background: $grey;
  236. border-bottom: 4px solid darken($grey, 10%);
  237. box-shadow: inset 0 -4px darken($grey, 10%);
  238. a{
  239. color: darken($grey, 45%);
  240. }
  241. a:hover{
  242. color: darken($grey, 40%);
  243. }
  244. }
  245. #footer{
  246. margin: 0 auto;
  247. max-width: 960px;
  248. padding: 3em 2em 1em 2em;
  249. }
  250. #sounds_label {
  251. width: 800px;
  252. height: 30px;
  253. line-height: 30px;
  254. display: block;
  255. margin: 0px 0px 5px 0px;
  256. float: left;
  257. }
  258. /* Chat */
  259. #chat-wrapper{
  260. display: none;
  261. position: absolute;
  262. width: 270px;
  263. right: 10px;
  264. top: 99px;
  265. border: 4px solid #fff;
  266. background: lighten($grey, 5%);
  267. h4{
  268. font-family: 'Cherry Swash';
  269. font-size: 1.225rem;
  270. height: 3em;
  271. line-height: 3em;
  272. margin: 5px 5%;
  273. text-align: center;
  274. color: $dark-purple;
  275. }
  276. a.close{
  277. position: absolute;
  278. top: 0;
  279. right: 0;
  280. background: $dark-purple;
  281. color: #fff;
  282. font-size: 1.125rem;
  283. padding: 0 7px;
  284. text-decoration: none;
  285. font-weight: 600;
  286. margin: 1em 5%;
  287. cursor: pointer;
  288. &:hover{
  289. text-decoration: none;
  290. background: lighten($dark-purple, 5%);
  291. }
  292. }
  293. > span{
  294. font-size: .9rem;
  295. margin: 5px 5%;
  296. display: block;
  297. }
  298. }
  299. ul#chat{
  300. position: relative;
  301. top: 0;
  302. max-height: 300px;
  303. width: 100%;
  304. overflow-y: scroll;
  305. list-style-type: none;
  306. li{
  307. font-size: .9rem;
  308. padding: 10px;
  309. margin: 5px auto;
  310. width: 90%;
  311. border-radius: 5px;
  312. position: relative;
  313. &:before{
  314. position: absolute;
  315. content: '';
  316. top: 10px;
  317. }
  318. }
  319. li.black{
  320. background: #444;
  321. color: #fff;
  322. }
  323. li.white{
  324. background: #fff;
  325. color: #444;
  326. }
  327. li.left:before{
  328. left: 0;
  329. margin-left: -7px;
  330. border-bottom: 7px solid transparent;
  331. border-top: 7px solid transparent;
  332. }
  333. li.black.left:before{
  334. border-right: 7px solid #444;
  335. }
  336. li.white.left:before{
  337. border-right: 7px solid #fff;
  338. }
  339. li.right:before{
  340. right: 0;
  341. margin-right: -7px;
  342. border-bottom: 7px solid transparent;
  343. border-top: 7px solid transparent;
  344. }
  345. li.black.right:before{
  346. border-left: 7px solid #444;
  347. }
  348. li.white.right:before{
  349. border-left: 7px solid #fff;
  350. }
  351. }
  352. #sendMessage{
  353. input{
  354. width: 100%;
  355. padding: 15px 10px;
  356. border: none;
  357. outline: none;
  358. font-size: .9rem;
  359. border: 4px solid lighten($grey, 5%);
  360. }
  361. input.black{
  362. background: #444;
  363. color: #fff;
  364. }
  365. input.white{
  366. background: #fff;
  367. color: #444;
  368. }
  369. }
  370. /* Chessboard */
  371. #board_moves_wrapper {
  372. width: 100%;
  373. max-width: 800px;
  374. min-height: 600px;
  375. margin: 0 auto;
  376. }
  377. table#moves {
  378. overflow-x: hidden;
  379. overflow-y: auto;
  380. width: 270px;
  381. height: 518px;
  382. background: lighten($grey, 5%);
  383. box-shadow: inset 0 -4px $grey;
  384. margin-left: 10px;
  385. border-radius: 2px;
  386. border-bottom: 4px solid $grey;
  387. display: block;
  388. float: left;
  389. }
  390. #moves thead {
  391. font-family: 'Cherry Swash';
  392. width: 270px;
  393. height: 3em;
  394. line-height: 3em;
  395. font-size: 1.225rem;
  396. color: $dark-purple;
  397. float: left;
  398. text-align: center;
  399. }
  400. #moves thead th, #moves thead tr {
  401. width: 100%;
  402. text-align: center;
  403. float: left;
  404. }
  405. #moves tbody tr {
  406. width: 270px;
  407. float: left;
  408. }
  409. #moves tbody tr td {
  410. width: 105px;
  411. text-align: left;
  412. line-height: 20px;
  413. margin: 0 15px;
  414. float: left;
  415. }
  416. #board_wrapper {
  417. float: left;
  418. }
  419. .chess_board {
  420. border: 8px solid lighten($dark-purple, 10%);
  421. border-radius: 2px;
  422. width: 500px;
  423. height: 500px;
  424. float: left;
  425. tr {
  426. width: 500px;
  427. height: 62.5px;
  428. float: left;
  429. display: block;
  430. td {
  431. width: 62.5px;
  432. height: 62.5px;
  433. line-height: 62.5px;
  434. text-align: center;
  435. background: #fefefe;
  436. display: block;
  437. float: left;
  438. a {
  439. width: 62.5px;
  440. height: 62.5px;
  441. font-size: 3.5rem;
  442. color: #424242;
  443. text-decoration: none;
  444. display: block;
  445. }
  446. }
  447. }
  448. }
  449. .chess_board tr:nth-child(odd) td:nth-child(even),
  450. .chess_board tr:nth-child(even) td:nth-child(odd) {
  451. background: $grey; }
  452. span.feedback {
  453. color: #424242;
  454. line-height: 28px;
  455. text-indent: 28px;
  456. margin-top: 1em;
  457. display: block;
  458. clear: left;
  459. float: left;
  460. }
  461. .feedback-status {
  462. font-weight: bold;
  463. }
  464. span.whitefeedback {
  465. background: url('../images/whiteking.png') 0% 50% no-repeat;
  466. }
  467. span.blackfeedback {
  468. background: url('../images/blackking.png') 0% 50% no-repeat;
  469. }
  470. span.promotion{
  471. line-height: 28px;
  472. text-indent: 28px;
  473. margin-top: 1em;
  474. display: block;
  475. float: right;
  476. }
  477. .chess_board td.selected {
  478. background: lighten($red, 30%) !important;
  479. }
  480. /* Media queries */
  481. @media only screen and (min-width: 760px) and (max-width: 900px) {
  482. header, #board_moves_wrapper{
  483. max-width: 760px;
  484. }
  485. #sounds_label{
  486. max-width: 530px;
  487. }
  488. #container_wrapper{
  489. max-width: 900px;
  490. padding: 1em 10px;
  491. }
  492. table#moves{
  493. margin-left: 0;
  494. float: right;
  495. height: 516px;
  496. }
  497. table#moves, #moves thead, #moves tbody tr{
  498. width: 200px;
  499. }
  500. #moves tbody tr td {
  501. width: 90px;
  502. margin: 0 5px;
  503. }
  504. }
  505. @media only screen and (min-width: 530px) and (max-width: 759px) {
  506. header, #board_moves_wrapper, #sounds_label{
  507. max-width: 530px;
  508. }
  509. }
  510. @media only screen and (max-width: 759px){
  511. html{
  512. font-size: 14px;
  513. }
  514. #container_wrapper{
  515. max-width: 759px;
  516. padding: 1em 5px;
  517. }
  518. span.feedback{
  519. float: right;
  520. clear: none;
  521. }
  522. table#moves{
  523. margin-left: 0;
  524. margin-top: 0.5em;
  525. height: 258px;
  526. }
  527. }
  528. @media only screen and (max-width: 529px){
  529. header, #board_moves_wrapper, #sounds_label{
  530. max-width: 470px;
  531. }
  532. input.game_link{
  533. font-size: 1rem;
  534. }
  535. #container_wrapper{
  536. max-width: 529px;
  537. padding: 1em 5px;
  538. }
  539. .chess_board {
  540. border: 4px solid lighten($dark-purple, 10%);
  541. width: 456px;
  542. height: 456px;
  543. tr {
  544. width: 456px;
  545. height: 57px;
  546. td {
  547. width: 57px;
  548. height: 57px;
  549. line-height: 57px;
  550. a {
  551. width: 57px;
  552. height: 57px;
  553. font-size: 3.5rem;
  554. }
  555. }
  556. }
  557. }
  558. }