chore: added CV and theme-toggle-system
This commit is contained in:
		@@ -2,10 +2,9 @@
 | 
			
		||||
 * Version:     1.0.0
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
:root {
 | 
			
		||||
  color-scheme: light dark;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* :root { */
 | 
			
		||||
/*   color-scheme: only light; */
 | 
			
		||||
/* } */
 | 
			
		||||
html,
 | 
			
		||||
body {
 | 
			
		||||
  margin: 0px;
 | 
			
		||||
@@ -13,53 +12,68 @@ body {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  display: flex;
 | 
			
		||||
  flex-direction: column;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
html {
 | 
			
		||||
  /* colors */
 | 
			
		||||
  background-image: linear-gradient(-30deg, #C0E0FF6F 70%, #FFE0C04F);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main {
 | 
			
		||||
  margin: auto;
 | 
			
		||||
  width: 80%;
 | 
			
		||||
  min-width: 80%;
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
  min-height: 40%;
 | 
			
		||||
  /* colors */
 | 
			
		||||
  border: 1px solid darkblue;
 | 
			
		||||
  background-color: white;
 | 
			
		||||
    box-shadow: 3px 3px 3px #30303090;
 | 
			
		||||
  box-shadow: 3px 3px 3px #30303090;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main h1 {
 | 
			
		||||
main>h1 {
 | 
			
		||||
  font-family: "Raleway", sans-serif;
 | 
			
		||||
  font-size: 4em;
 | 
			
		||||
  margin-top: 4px;
 | 
			
		||||
  margin-top: 0px;
 | 
			
		||||
  margin-bottom: 8px;
 | 
			
		||||
  text-decoration: underline;
 | 
			
		||||
  text-shadow: 0px 0px 4px white, 2px 2px 6px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main p,
 | 
			
		||||
main a {
 | 
			
		||||
  padding-left: 1em;
 | 
			
		||||
main>p {
 | 
			
		||||
  margin-left: 1em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
main>h2 {
 | 
			
		||||
  margin-left: 0.2em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ul.dashed {
 | 
			
		||||
  list-style-type: '- ';
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.text-red {
 | 
			
		||||
  color: red;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media(prefers-color-scheme: dark) {
 | 
			
		||||
html.theme-dark {
 | 
			
		||||
  color-scheme: dark;
 | 
			
		||||
  background-image: none;
 | 
			
		||||
  background-image: linear-gradient(-10deg, #1010206F 60%, #5050506F);
 | 
			
		||||
  color: white;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  html,
 | 
			
		||||
  body {
 | 
			
		||||
    background-image: linear-gradient(-10deg, #1010206F 60%, #5050506F);
 | 
			
		||||
  }
 | 
			
		||||
.theme-dark>body>main {
 | 
			
		||||
  border: 1px solid darkgray;
 | 
			
		||||
  background-color: black;
 | 
			
		||||
  box-shadow: 3px 3px 5px #101010C0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  main {
 | 
			
		||||
    border: 1px solid darkgray;
 | 
			
		||||
    background-color: black;
 | 
			
		||||
    box-shadow: 3px 3px 5px #101010C0;
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  main h1 {
 | 
			
		||||
.theme-dark>body>main>h1 {
 | 
			
		||||
  text-shadow: 0px 0px 3px blue, 2px 2px 6px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media(orientation: portrait){
 | 
			
		||||
  main{
 | 
			
		||||
    margin: 1em;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								src/docs/CV_WardTruyen_2024.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								src/docs/CV_WardTruyen_2024.pdf
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							@@ -7,15 +7,24 @@
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <header><button title="Dark theme on/off" onclick="toggleTheme();">☀</button></header>
 | 
			
		||||
 | 
			
		||||
  <main>
 | 
			
		||||
    <h1>Ward Truyen home</h1>
 | 
			
		||||
    <p>Ik ben een computer wizzard op zoek naar een job in de ICT.
 | 
			
		||||
      Voor meer informatie <a href="docs/CV_WardTruyen_2024.pdf">bekijk mijn cv</a>.</p>
 | 
			
		||||
    <h2>Links</h2>
 | 
			
		||||
    <ul class="dashed">
 | 
			
		||||
      <li> <a href="docs/CV_WardTruyen_2024.pdf">download mijn cv</a> </li>
 | 
			
		||||
      <li> <a href="https://truyen.network">truyen.network</a> </li>
 | 
			
		||||
      <li> <a href="https://tds.truyen.network">tds.truyen.network</a> </li>
 | 
			
		||||
      <li> <a href="https://willem.truyen.network">willem.truyen.network</a> </li>
 | 
			
		||||
    </ul>
 | 
			
		||||
    <h2>Status:</h2>
 | 
			
		||||
    <p class="text-red">Under construction</p>
 | 
			
		||||
    <h2>Links</h2>
 | 
			
		||||
    <a href="https://truyen.network">truyen.network</a>
 | 
			
		||||
  </main>
 | 
			
		||||
 | 
			
		||||
  <script src="js/theme.js"></script>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								src/js/theme.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								src/js/theme.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
function toggleTheme() {
 | 
			
		||||
  const theme = "theme-dark";//localStorage.getItem('theme');
 | 
			
		||||
  const root = document.querySelector(":root");
 | 
			
		||||
  root.classList.toggle(theme);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function setTheme(themeName) {
 | 
			
		||||
  console.log("setting them: " + themeName);
 | 
			
		||||
  const root = document.querySelector(":root");
 | 
			
		||||
  root.classList.add(themeName);
 | 
			
		||||
  localStorage.setItem('theme', themeName);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function detectTheme() {
 | 
			
		||||
  const theme = localStorage.getItem('theme');
 | 
			
		||||
  if (theme === 'theme-dark' || theme === 'theme-light') {
 | 
			
		||||
    setTheme(theme);
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
 | 
			
		||||
    setTheme('theme-dark');
 | 
			
		||||
    return;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // if (window.matchMedia('(prefers-color-scheme: light)').matches) {
 | 
			
		||||
  //   setTheme('theme-light');
 | 
			
		||||
  //   return;
 | 
			
		||||
  // }
 | 
			
		||||
 | 
			
		||||
  // setTheme('theme-light');
 | 
			
		||||
}
 | 
			
		||||
detectTheme();
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user