-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from zainafzal08/add-website
Added basic site that shows README.md
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |