Skip to content

Commit

Permalink
Merge pull request #1 from zainafzal08/add-website
Browse files Browse the repository at this point in the history
Added basic site that shows README.md
  • Loading branch information
zainafzal08 authored Apr 6, 2021
2 parents a83e243 + 29d3130 commit 966c515
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
24 changes: 24 additions & 0 deletions assets/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
body {
margin: 0;
padding: 0;
font-family: 'Lato', sans-serif;
--primary-color: #E76F51;
}
main {
padding: 0 32px;
}

h1 {
padding-bottom: 1rem;
border-bottom: 3px solid var(--primary-color);
}
strong {
font-weight: bolder;
}
a {
color: var(--primary-color);
}
pre {
background: #EBEBEB;
padding: 1rem;
}
35 changes: 35 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Mega Interview Guide</title>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<link rel="stylesheet" href="assets/index.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Lato&display=swap" rel="stylesheet">
<link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/default.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js"></script>
</head>
<body>
<main>

</main>
<script>
async function init() {
marked.setOptions({
highlight: function(code, lang, callback) {
const validLanguage = hljs.getLanguage(lang) ? lang : 'plaintext';
return hljs.highlight(validLanguage, code).value;
}
});
const r = await fetch('README.md');
const readmeText = await r.text();
document.querySelector('main').innerHTML = marked(readmeText);
}

init();
</script>
</body>
</html>

0 comments on commit 966c515

Please sign in to comment.