Advertisement
Guest User

Problem

a guest
Feb 16th, 2020
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.38 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html id="main_html_root">
  3. <head>
  4. <title>SuttaCentral</title>
  5.  
  6. <meta charset="UTF-8">
  7.  
  8. <meta name="theme-color" content="#ce8400">
  9. <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
  10. <meta name="mobile-web-app-capable" content="yes">
  11. <meta name="apple-mobile-web-app-capable" content="yes">
  12. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  13. <meta name="apple-mobile-web-app-title" content="SuttaCentral">
  14. <meta name="msapplication-TileImage" content="/img/mstile-144x144.png">
  15. <meta name="msapplication-TileColor" content="#ffffff">
  16. <meta name="msapplication-tap-highlight" content="no">
  17.  
  18. <!-- Search Engine -->
  19. <meta name="title" content="SuttaCentral">
  20. <meta name="description" content="Early Buddhist texts from the Tipitaka (Tripitaka). Suttas (sutras) with the Buddha's teachings on mindfulness, insight, wisdom, and meditation.">
  21. <meta name="image" content="https://i.vimeocdn.com/portrait/23756910_500x500.jpg">
  22. <meta name="keywords" content="Buddha, Buddhism, Buddhist, sutta, suttas, sutra, sutras, tipitaka, tripitaka, wisdom, teaching, mindfulness, meditation, scripture, canon, Pali, Sanskrit, Tibetan, Chinese, insight, vipassana">
  23.  
  24. <!-- Schema.org for Google -->
  25. <meta itemprop="name" content="SuttaCentral">
  26. <meta itemprop="description"
  27. content="Early Buddhist texts from the Tipitaka (Tripitaka). Suttas (sutras) with the Buddha's teachings on mindfulness, insight, wisdom, and meditation.">
  28. <meta itemprop="image" content="https://i.vimeocdn.com/portrait/23756910_500x500.jpg">
  29. <!-- Twitter -->
  30. <meta name="twitter:card" content="summary_large_image">
  31. <meta name="twitter:title" content="SuttaCentral">
  32. <meta name="twitter:description" content="Early Buddhist texts from the Tipitaka (Tripitaka). Suttas (sutras) with the Buddha's teachings.">
  33. <meta name="twitter:player" content="https://player.vimeo.com/video/257038431">
  34. <meta name="twitter:image:alt" content="SuttaCentral">
  35.  
  36. <!-- Open Graph general (Facebook, Pinterest & Google+) -->
  37. <meta property="og:title" content="SuttaCentral">
  38. <meta property="og:description" content="Early Buddhist texts from the Tipitaka (Tripitaka). Suttas (sutras) with the Buddha's teachings on mindfulness, insight, wisdom, and meditation.">
  39. <meta property="og:image"
  40. content="https://suttacentral.net/img/social_sharing.png">
  41. <meta property="og:image:alt" content="SuttaCentral">
  42. <meta property="og:url" content="https://suttacentral.net/">
  43. <meta property="og:site_name" content="SuttaCentral">
  44. <meta property="og:type" content="website">
  45.  
  46. <link rel="icon" href="/img/favicon.ico">
  47. <link rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png">
  48. <link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
  49. <link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
  50. <link rel="manifest" href="/manifest.json">
  51. <link href="https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Serif" rel="stylesheet">
  52. <link rel="canonical" href="https://suttacentral.net/">
  53.  
  54. <!-- Google Analytics -->
  55. <script>
  56. window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
  57. ga('create', 'UA-39277629-1', 'auto');
  58. ga('send', 'pageview');
  59. </script>
  60. <script async src='https://www.google-analytics.com/analytics.js'></script>
  61.  
  62. <!-- Polyfills -->
  63. <script>
  64. var head = document.querySelector('head');
  65. if (!Array.prototype.includes) {
  66. var script = document.createElement('script');
  67. script.src = '/polyfills/arrayIncludes.js';
  68. head.appendChild(script);
  69. }
  70. if (!Object.entries) {
  71. var script = document.createElement('script');
  72. script.src = '/polyfills/objectEntries.js';
  73. head.appendChild(script);
  74. }
  75. if (!String.prototype.includes) {
  76. var script = document.createElement('script');
  77. script.src = '/polyfills/stringIncludes.js';
  78. head.appendChild(script);
  79. }
  80. </script>
  81.  
  82. <!-- Temporary fix for broken CSS mixins (@apply) inside LitElement
  83. https://github.com/Polymer/lit-html/issues/518 -->
  84. <script src="/node_modules/@webcomponents/shadycss/apply-shim.min.js"></script>
  85.  
  86. <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
  87. <script src="/node_modules/web-animations-js/web-animations-next.min.js"></script>
  88.  
  89. <style>
  90. html, body {
  91. height: 100%;
  92. }
  93.  
  94. body {
  95. margin: 0;
  96. background-color: var(--sc-primary-background-color);
  97. color: var(--sc-primary-text-color);
  98. }
  99.  
  100. .unsupported-browser-splash-screen {
  101. height: 100%;
  102. width: 100%;
  103. background-color: #f5f5f5;
  104. color: rgb(33, 33, 33);
  105. text-align: center;
  106. font-family: sans-serif;
  107. }
  108.  
  109. .center {
  110. position: absolute;
  111. top: 50%;
  112. left: 50%;
  113. transform: translate(-50%, -50%);
  114. }
  115.  
  116. .margin-md {
  117. margin: 32px;
  118. }
  119.  
  120. .hidden {
  121. display: none;
  122. }
  123.  
  124. a {
  125. color: rgba(206, 132, 0, 1);
  126. text-decoration: none;
  127. }
  128.  
  129. a:hover {
  130. text-decoration: underline;
  131. }
  132.  
  133. button {
  134. background: none !important;
  135. border: none;
  136. padding: 0 !important;
  137. color: rgba(206, 132, 0, 1);
  138. font-family: "Skolar Sans PE", "Noto Sans", sans-serif;
  139. cursor: pointer;
  140. font-size: 16px;
  141. }
  142.  
  143. button:hover {
  144. text-decoration: underline;
  145. }
  146. </style>
  147.  
  148. </head>
  149. <body>
  150.  
  151.  
  152. <sc-drawer-layout unresolved></sc-drawer-layout>
  153.  
  154.  
  155. <!-- Register pre-caching service worker -->
  156. <script async>
  157. if ('serviceWorker' in navigator) {
  158. window.addEventListener('load', function() {
  159. navigator.serviceWorker.register('/sw-generated.js').catch(function(err) {
  160. console.log(
  161. 'The precaching service worker did not load correctly!' +
  162. 'Local resources will not be cached for offline use.' +
  163. 'Ignore this if you are running in development mode.', err);
  164. });
  165. });
  166. }
  167. </script>
  168.  
  169. <div class="unsupported-browser-splash-screen hidden">
  170. <div class="center">
  171. <div class="logo-image-container"></div>
  172. <h1>Oh no!</h1>
  173. <h3>It looks like you're using an unsupported browser.</h3>
  174. <h3>The site works well on modern versions of <a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a>,
  175. <a href="https://www.google.com/chrome/">Chrome</a>,
  176. <a href="https://www.opera.com/">Opera</a>, or
  177. <a href="https://www.apple.com/lae/safari/">Safari</a>.</h3>
  178. <h3>Edge support is coming soon. IE will not be supported.</h3>
  179. <hr>
  180. <div class="margin-md">
  181. <a href="https://legacy.suttacentral.net">Proceed to the legacy version of SuttaCentral</a>
  182. </div>
  183. <div class="margin-md">
  184. <button class="link" onclick="appendSiteContent()">Try using the modern version anyway</button>
  185. </div>
  186. </div>
  187. </div>
  188.  
  189. <script defer>
  190. var isSupportedBrowser = function() {
  191. return (window.CSS && CSS.supports('color', 'var(--primary)'));
  192. };
  193. var showUnsupportedBrowserSplashScreen = function(shouldShow) {
  194. var unsupportedBrowserSplashScreen = document.querySelector('.unsupported-browser-splash-screen');
  195. if (shouldShow) {
  196. unsupportedBrowserSplashScreen.classList.remove('hidden');
  197. } else {
  198. unsupportedBrowserSplashScreen.classList.add('hidden');
  199. }
  200. };
  201. var appendSiteContent = function() {
  202. var mainElement = document.createElement('sc-drawer-layout');
  203. var body = document.querySelector('body');
  204. body.appendChild(mainElement);
  205. showUnsupportedBrowserSplashScreen(false);
  206. };
  207. var removeSiteContent = function() {
  208. var mainElement = document.querySelector('sc-drawer-layout');
  209. mainElement.parentNode.removeChild(mainElement);
  210. };
  211. if (!isSupportedBrowser()) {
  212. showUnsupportedBrowserSplashScreen(true);
  213. var logoImg = document.createElement('img');
  214. logoImg.src = 'img/android-chrome-192x192.png';
  215. document.querySelector('.logo-image-container').appendChild(logoImg);
  216. removeSiteContent();
  217. }
  218. document.addEventListener("metadata", function(e) {
  219. var metaData = e.detail;
  220. if (metaData) {
  221. var url = 'https://suttacentral.net' + window.location.pathname;
  222. document.head.querySelector("[rel=canonical]").href = url;
  223. document.head.querySelector("title").innerText = metaData.pageTitle;
  224. document.head.querySelector("[property='og:url']").content = url;
  225. document.head.querySelector("[property='og:title']").content = metaData.title;
  226. document.head.querySelector("[property='og:description']").content = metaData.description;
  227. document.head.querySelector("[property='og:type']").content = metaData.openGraphType ? metaData.openGraphType : 'website';
  228. document.head.querySelector("[name='title']").content = metaData.title;
  229. document.head.querySelector("[name='description']").content = metaData.description;
  230. document.head.querySelector("[name='twitter:title']").content = metaData.title;
  231. document.head.querySelector("[name='twitter:description']").content = metaData.description.substring(0,120);
  232. document.head.querySelector("[itemprop='name']").content = metaData.title;
  233. document.head.querySelector("[itemprop='description']").content = metaData.description;
  234. }
  235. });
  236.  
  237. document.addEventListener("keyword-metadata", function(e) {
  238. var metaData = e.detail;
  239. if (metaData) {
  240. document.head.querySelector("[name='keywords']").content = metaData.keywords;
  241. }
  242. });
  243.  
  244. window.addEventListener('beforeinstallprompt', function(e) {
  245. // Prevent Chrome 67 and earlier from automatically showing the prompt
  246. e.preventDefault();
  247. // Stash the event so it can be triggered later.
  248. window.deferredPWAInstallPrompt = e;
  249. });
  250. </script>
  251.  
  252. <noscript>
  253. Please enable JavaScript to view this website.
  254. </noscript>
  255.  
  256. <script type="module" src="/main.js"></script><script type="text/javascript" src="/main.es5.js" nomodule></script></body>
  257. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement