layout.pug 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. doctype html
  2. html(lang='en')
  3. head
  4. - if (typeof(title) !== 'undefined')
  5. title #{title} | Chess
  6. - else
  7. title Chess | David Windham
  8. meta(charset='utf-8')
  9. meta(name='viewport', content='width=device-width, initial-scale=1')
  10. link(rel='shortcut icon', href=`${basePath}/images/favicon.ico`)
  11. link(rel='stylesheet', href=`${basePath}/stylesheets/style.css`)
  12. //- After style.css: pulls the page onto the daw slate/card palette so the
  13. //- shared chrome blends. See the header of that file re: style.scss.
  14. link(rel='stylesheet', href=`${basePath}/stylesheets/daw.css`)
  15. //- Where the app is mounted, handed to the client so it can build socket
  16. //- and game-link URLs without any host or port baked in. See app.js.
  17. script.
  18. window.$BASE = !{JSON.stringify(basePath)};
  19. script(type='text/javascript', src=`${basePath}/socket.io/socket.io.js`)
  20. block head
  21. body
  22. daw-header
  23. #modal-mask
  24. p
  25. strong Esc:
  26. | OK
  27. br
  28. strong Enter:
  29. | OK
  30. #modal-window
  31. p#modal-message Message.
  32. a#modal-ok.button(href='#') OK
  33. #offer-mask
  34. p
  35. strong Esc:
  36. | Decline
  37. br
  38. strong Enter:
  39. | Accept
  40. #offer-window
  41. p#offer-message Offer.
  42. a#offer-accept.button(href='#') Accept
  43. a#offer-decline.button.button--red(href='#') Decline
  44. #container_wrapper.clearfix
  45. #container.clearfix
  46. block content
  47. daw-footer
  48. script(type='text/javascript', src=`${basePath}/javascripts/jquery.js`)
  49. script(type='text/javascript', src=`${basePath}/javascripts/chess.js`)
  50. script(type='text/javascript', src=`${basePath}/javascripts/app.js`)
  51. block scripts
  52. //- Root-relative on purpose: Apache serves /embed from the WP docroot in
  53. //- production, alongside /chess. Locally, set DAW_ORIGIN so node proxies it.
  54. script(src='/embed/chrome.js')