|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="UTF-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title>README.md Viewer</title> |
|
<style> |
|
body { |
|
font-family: Arial, sans-serif; |
|
margin: 20px; |
|
} |
|
pre { |
|
background-color: #f4f4f4; |
|
padding: 10px; |
|
border-radius: 5px; |
|
overflow-x: auto; |
|
} |
|
</style> |
|
</head> |
|
<body> |
|
<h1>README.md Viewer</h1> |
|
<div id="readme-content"></div> |
|
|
|
<script> |
|
|
|
async function fetchReadme() { |
|
const response = await fetch('README.md'); |
|
const content = await response.text(); |
|
return content; |
|
} |
|
|
|
|
|
function markdownToHtml(markdown) { |
|
const converter = new showdown.Converter(); |
|
return converter.makeHtml(markdown); |
|
} |
|
|
|
|
|
async function displayReadme() { |
|
const readmeContent = await fetchReadme(); |
|
const readmeHtml = markdownToHtml(readmeContent); |
|
document.getElementById('readme-content').innerHTML = readmeHtml; |
|
} |
|
|
|
|
|
displayReadme(); |
|
</script> |
|
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script> |
|
</body> |
|
</html> |
|
|