logs
This commit is contained in:
		
							parent
							
								
									fdeef6efae
								
							
						
					
					
						commit
						16fdac22cd
					
				
					 4 changed files with 103 additions and 0 deletions
				
			
		
							
								
								
									
										48
									
								
								home/library/logs/index.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								home/library/logs/index.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,48 @@
 | 
			
		|||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="UTF-8">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 | 
			
		||||
    <title>Library | waifuism.life</title>
 | 
			
		||||
    <link rel="stylesheet" href="styles.css">
 | 
			
		||||
    <script src="/libs/marked.min.js"></script>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <div class="window">
 | 
			
		||||
        <div class="nav">
 | 
			
		||||
            <button onclick="loadContent('home.md')">Home</button>
 | 
			
		||||
            <button onclick="loadContent('about.md')">About</button>
 | 
			
		||||
            <button onclick="loadContent('contact.md')">Contact</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>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										4
									
								
								home/library/logs/markdown/home.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								home/library/logs/markdown/home.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,4 @@
 | 
			
		|||
# Home
 | 
			
		||||
Welcome to the home page.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
							
								
								
									
										49
									
								
								home/library/logs/styles.css
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								home/library/logs/styles.css
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,49 @@
 | 
			
		|||
 | 
			
		||||
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;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										2
									
								
								home/library/markdown/home.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								home/library/markdown/home.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,2 @@
 | 
			
		|||
# Library
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue