header.tx 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <!doctype html>
  2. <html dir="<: $dir :>" lang="<: $lang :>">
  3. <head>
  4. <title><: $title :></title>
  5. <meta charset="utf-8" />
  6. <link rel="icon" type="image/vnd.microsoft.icon" href="<: $theme_dir :>/img/icon/favicon.ico" />
  7. <meta name="description" content="<: $meta_desc :>"/>
  8. <meta name="tags" content="<: $default_tags :>" />
  9. <!-- Open Graph / Facebook -->
  10. <meta property="og:type" content="<: $og_type :>" />
  11. <meta property="og:url" content="https://<: $domain :>/<: $route :>" />
  12. <meta property="og:title" content="<: $title :>" />
  13. : if ($primary_post.tags) {
  14. <meta property="og:article:tags" content="<: $primary_post.tags :>" />
  15. : }
  16. : if ($primary_post.is_image) {
  17. <meta property="og:image" content="https://<: $domain :>/<: $primary_post.href :>" />
  18. <meta property="og:image:type" content="<: $primary_post.type :>" />
  19. <meta property="og:image:width" content="1280" />
  20. <meta property="og:image:height" content=720 />
  21. : }
  22. : elsif ($primary_post.is_video) {
  23. <meta property="og:video" content="https://<: $domain :>/<: $primary_post.href :>" />
  24. <meta property="og:video:type" content="<: $primary_post.type :>" />
  25. <meta property="og:video:width" content="1280" />
  26. <meta property="og:video:height" content="720" />
  27. <meta property="og:video:image" content="https://<: $domain :>/<: $primary_post.preview :>" />
  28. : }
  29. : if ($primary_post.user) {
  30. <meta property="og:article:author" content="<: $primary_post.user :>" />
  31. : }
  32. : if ($primary_post.created) {
  33. <meta property="og:article:published_time" content="<: $primary_post.created :>" />
  34. <meta property="og:article:modified_time" content="<: $primary_post.created :>" />
  35. : }
  36. : if ($fb_app_id) {
  37. <meta property="fb:app_id" content="<: $fb_app_id :>" />
  38. : }
  39. <!-- Twitter -->
  40. <meta property="twitter:card" content="<: $twitter_type :>" />
  41. <meta property="twitter:url" content="https://<: $domain :>/<: $route :>" />
  42. : if ($primary_post.is_image) {
  43. <meta property="twitter:image" content="https://<: $domain :>/<: $primary_post.href :>" />
  44. <meta property="twitter:image:type" content="<: $primary_post.type :>" />
  45. <meta property="twitter:image:width" content="1280" />
  46. <meta property="twitter:image:height" content=720 />
  47. : }
  48. : elsif ($primary_post.is_video) {
  49. <meta property="twitter:player:stream" content="https://<: $domain :>/<: $primary_post.href :>" />
  50. <meta property="twitter:player:stream:content_type" content="<: $primary_post.type :>" />
  51. <meta property="twitter:player:width" content="1280" />
  52. <meta property="twitter:player:height" content="720" />
  53. <meta property="twitter:player" content="https://<: $domain :>/<: $route :>?embed=1" />
  54. : }
  55. <meta property="twitter:title" content="<: $title :>" />
  56. <meta property="twitter:description" content="<: $meta_desc :>" />
  57. <meta name="viewport" content="width=device-width">
  58. <link rel="stylesheet" type="text/css" href="/styles/structure.css" />
  59. <link rel="stylesheet" type="text/css" href="/styles/screen.css" media="screen" />
  60. <link rel="stylesheet" type="text/css" href="/styles/print.css" media="print" />
  61. : if ($embed) {
  62. <base target="_blank" />
  63. <link rel="stylesheet" type="text/css" href="/styles/embed.css" media="screen" />
  64. : }
  65. <!-- Stylesheets !-->
  66. : for $stylesheets -> $stylesheet {
  67. <link rel="stylesheet" type="text/css" href="<: $stylesheet :>" media="screen" />
  68. : }
  69. : for $scripts -> $script {
  70. <script type="text/javascript" src="<: $script :>"></script>
  71. : }
  72. </head>
  73. <body>