|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + |
| 7 | + <!-- HTML Meta Tags --> |
| 8 | + <title>Contributing Guidelines | is-a.dev</title> |
| 9 | + |
| 10 | + <!-- Google / Search Engine Tags --> |
| 11 | + <meta itemprop="name" content="Contributing Guidelines | is-a.dev" /> |
| 12 | + |
| 13 | + <!-- Facebook Meta Tags --> |
| 14 | + <meta property="og:url" content="https://is-a.dev/contributing" /> |
| 15 | + <meta property="og:type" content="website" /> |
| 16 | + <meta property="og:title" content="Contributing Guidelines | is-a.dev" /> |
| 17 | + |
| 18 | + <!-- Twitter Meta Tags --> |
| 19 | + <meta name="twitter:card" content="summary_large_image" /> |
| 20 | + <meta name="twitter:title" content="Contributing Guidelines | is-a.dev" /> |
| 21 | + |
| 22 | + <!-- Files --> |
| 23 | + <link rel="preload" href="https://raw.githubusercontent.com/is-a-dev/register/refs/heads/main/CONTRIBUTING.md" as="fetch" crossorigin="anonymous"> |
| 24 | + |
| 25 | + <!-- Stylesheets --> |
| 26 | + <link rel="stylesheet" href="styles/github-markdown.min.css" rel="prefetch"> |
| 27 | + |
| 28 | + <!-- Scripts --> |
| 29 | + <script src="scripts/marked.min.js" rel="prefetch"></script> |
| 30 | + </head> |
| 31 | + |
| 32 | + <style> |
| 33 | + body { |
| 34 | + box-sizing: border-box; |
| 35 | + min-width: 200px; |
| 36 | + max-width: 980px; |
| 37 | + margin: 0 auto; |
| 38 | + padding: 45px; |
| 39 | + } |
| 40 | + |
| 41 | + @media (prefers-color-scheme: dark) { |
| 42 | + body { |
| 43 | + background-color: #0d1117; |
| 44 | + } |
| 45 | + } |
| 46 | + </style> |
| 47 | + |
| 48 | + <body> |
| 49 | + <div class="markdown-body" id="contributing"><p>Loading...</p></div> |
| 50 | + |
| 51 | + <script> |
| 52 | + const markdownUrl = "https://raw.githubusercontent.com/is-a-dev/register/refs/heads/main/CONTRIBUTING.md"; |
| 53 | + |
| 54 | + const container = document.getElementById("contributing"); |
| 55 | + |
| 56 | + // Fetch the Markdown file |
| 57 | + fetch(markdownUrl) |
| 58 | + .then(response => { |
| 59 | + if (!response.ok) { |
| 60 | + throw new Error(`Error fetching the file: ${response.statusText}`); |
| 61 | + } |
| 62 | + return response.text(); |
| 63 | + }) |
| 64 | + .then(markdown => { |
| 65 | + // Convert Markdown to HTML using Marked.js |
| 66 | + const htmlContent = marked.parse(markdown); |
| 67 | + |
| 68 | + // Insert the HTML into the container |
| 69 | + container.innerHTML = htmlContent; |
| 70 | + }) |
| 71 | + .catch(err => { |
| 72 | + console.error(err); |
| 73 | + container.innerHTML = `<h3>An error occurred</h3><pre><code>${err}</code></pre>`; |
| 74 | + }); |
| 75 | + </script> |
| 76 | + </body> |
| 77 | +</html> |
0 commit comments