Compare commits
	
		
			2 commits
		
	
	
		
			7fc5071fbb
			...
			fdeef6efae
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| fdeef6efae | |||
| 2396ac9cbd | 
					 3 changed files with 96 additions and 3 deletions
				
			
		|  | @ -3,9 +3,47 @@ | ||||||
| <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</title> |     <title>Library | waifuism.life</title> | ||||||
|  |     <link rel="stylesheet" href="styles.css"> | ||||||
|  |     <script src="/libs/marked.min.js"></script> | ||||||
| </head> | </head> | ||||||
| <body> | <body> | ||||||
|     Test |     <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> | ||||||
|  |             <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> | ||||||
|  |  | ||||||
							
								
								
									
										49
									
								
								home/library/styles.css
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								home/library/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; | ||||||
|  | } | ||||||
							
								
								
									
										6
									
								
								libs/marked.min.js
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								libs/marked.min.js
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	Add table
		
		Reference in a new issue