header.tx 3.9 KB

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