Compare commits

..

No commits in common. 'fdeef6efaeeddf69e5f000068ae01c0e4f51b265' and '7fc5071fbbf1c6a43dd1d87c521b1a226900b4f9' have entirely different histories.

  1. 42
      home/library/index.html
  2. 49
      home/library/styles.css
  3. 6
      libs/marked.min.js

@ -3,47 +3,9 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Library | waifuism.life</title> <title>library</title>
<link rel="stylesheet" href="styles.css">
<script src="/libs/marked.min.js"></script>
</head> </head>
<body> <body>
<div class="window"> Test
<div class="nav">
<button onclick="loadContent('home.md')">Home</button>
<button onclick="loadContent('about.md')">About</button>
<button onclick="loadContent('contact.md')">Contact</button>
<button>Grimoire</button>
</div>
<div class="content" id="mainContent">
</div>
</div>
<script>
function loadContent(file) {
fetch(`markdown/${file}`)
.then(response => {
if (!response.ok) {
throw new Error(`Network response was not ok: ${response.statusText}`);
}
return response.text();
})
.then(text => {
const mainContent = document.getElementById('mainContent');
mainContent.innerHTML = marked.parse(text); // Changed to marked.parse
})
.catch(error => {
console.error('Error loading content:', error);
const mainContent = document.getElementById('mainContent');
mainContent.innerHTML = `<p>Error loading content. Please try again later.</p>`;
});
}
// Load the default home content on page load
window.onload = function() {
loadContent('home.md');
};
</script>
</body> </body>
</html> </html>

@ -1,49 +0,0 @@
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
.window {
display: flex;
width: 60%;
height: 60%;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
background-color: white;
border-radius: 8px;
}
.nav {
width: 25%;
background-color: #50372c;
color: white;
display: flex;
flex-direction: column;
align-items: center;
padding: 20px;
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
.nav button {
width: 100%;
margin: 10px 0;
padding: 10px;
border: none;
border-radius: 4px;
background-color: #7e5b53;
color: white;
cursor: pointer;
transition: background-color 0.3s;
}
.nav button:hover {
background-color: #1abc9c;
}
.content {
width: 75%;
padding: 20px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
overflow-y: auto;
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save