|
1 | 1 | <!doctype html>
|
| 2 | +<!-- this is a website --> |
2 | 3 | <html>
|
3 |
| -<head> |
4 |
| -<meta charset="utf-8"> |
5 |
| -<title>Home</title> |
6 |
| -</head> |
| 4 | + <head> |
| 5 | + <meta charset="utf-8"> |
| 6 | + <title>Home</title> |
| 7 | + <link href="main.css" rel="stylesheet"> |
| 8 | + <script type="text/javascript" src="script.js" defer></script> |
| 9 | + </head> |
| 10 | + <body> |
| 11 | + <div class="box"> |
| 12 | + <span id="main-page" class="loaded-menu-page"> |
| 13 | + <div class="heading"> |
| 14 | + <h1>Owen Pastor</h1> |
| 15 | + <h3>Software/game dev,<br>Amateur photographer.</h3> |
| 16 | + </div> |
| 17 | + <div class="divider divider-bottom"></div> |
| 18 | + <div> |
| 19 | + <div class="buton"> |
| 20 | + <button class="front-page-button" data-target="#about-me">About Me</button> |
| 21 | + <button class="front-page-button" data-target="#mrok">Work</button> |
| 22 | + <button class="front-page-button" data-target="#contact-me">Contact Me</button> |
| 23 | + </div> |
| 24 | + </div> |
| 25 | + </span> |
| 26 | + <span id="about-me" class="hidden"> |
| 27 | + <h1>Hello!</h1> |
| 28 | + <div class="about-me-body"> |
| 29 | + <h2>My name is Owen. (also known as crossflame20, but I lost my crossflame20 GitHub account, so I made a "crossflame22" account.)</h2> |
| 30 | + <p id="birthday paragraph"></p> |
| 31 | + <script> |
| 32 | + // establishing today's date |
| 33 | + let currentTime = new Date(); |
| 34 | + let month = currentTime.getMonth() + 1; |
| 35 | + let day = currentTime.getDate(); |
| 36 | + let year = currentTime.getFullYear(); |
7 | 37 |
|
8 |
| -<body> |
9 |
| -</body> |
| 38 | + // function to get days of any month |
| 39 | + function daysInMonth (_month, _year) { |
| 40 | + return new Date(_year, _month, 0).getDate(); |
| 41 | + } |
| 42 | + |
| 43 | + // get days after the 24th of last month |
| 44 | + if (month >= 2) { |
| 45 | + daysAfter = daysInMonth(month - 1, year) - 24; |
| 46 | + } else { |
| 47 | + daysAfter = daysInMonth(12, year - 1); |
| 48 | + } |
| 49 | + |
| 50 | + // my birthdate |
| 51 | + const birthMonth = 7; |
| 52 | + const birthDay = 24; |
| 53 | + const birthYear = 2004; |
| 54 | + |
| 55 | + // comparing the two dates |
| 56 | + let yearDifference = year - birthYear; |
| 57 | + let monthDifference; |
| 58 | + let dayDifference; |
| 59 | + |
| 60 | + if (month >= birthMonth) { |
| 61 | + monthDifference = month - birthMonth; |
| 62 | + } else { |
| 63 | + monthDifference = month + 5; |
| 64 | + yearDifference -= 1 |
| 65 | + } |
| 66 | + if (day >= birthDay) { |
| 67 | + dayDifference = day - birthDay; |
| 68 | + } else { |
| 69 | + dayDifference = daysAfter + day; |
| 70 | + monthDifference -= 1; |
| 71 | + } // thanks ms c for helping get this figured out! |
| 72 | + |
| 73 | + // save and return the difference in a readable format |
| 74 | + let comparison; |
| 75 | + if (dayDifference === 0) { |
| 76 | + comparison = `${yearDifference} year, \ |
| 77 | + ${monthDifference} month`; |
| 78 | + } else if (monthDifference === 0) { |
| 79 | + comparison = `${yearDifference} year, \ |
| 80 | + ${dayDifference} day`; |
| 81 | + } else if (dayDifference === 0 && monthDifference === 0) { |
| 82 | + comparison = `${yearDifference} year`; |
| 83 | + } else { |
| 84 | + comparison = `${yearDifference} year, \ |
| 85 | + ${monthDifference} month, ${dayDifference} day`; |
| 86 | + } |
| 87 | + document.getElementById("birthday paragraph").innerText = `I \ |
| 88 | + am a ${comparison} old programmer from Concord, Ohio.`; |
| 89 | + </script> |
| 90 | + <p>I will be updating this website as I improve at programming, and as I finish/start projects.</p> |
| 91 | + </div> |
| 92 | + <div class="divider"></div> |
| 93 | + <button class="front-page-button" data-target="#main-page">Back</button> |
| 94 | + </span> |
| 95 | + <span id="mrok" class="hidden"> |
| 96 | + <div class="projects-list"> |
| 97 | + <h3>Projects</h3> |
| 98 | + <div class="divider-sm"></div> |
| 99 | + <h2>Current</h2> |
| 100 | + <h3>This Website</h3> |
| 101 | + <p>I'm going to try to always be working on this website, as I improve at programming.</p> |
| 102 | + <div class="divider-sm"></div> |
| 103 | + <h3>Gamer Code (might change title)</h3> |
| 104 | + <p>This is a program a friend wrote with a bit of my help, that I'm going to try to rewrite in order to add more support for users outside our school.</p> |
| 105 | + <div class="divider-sm"></div> |
| 106 | + <h2>Finished</h2> |
| 107 | + <p>None so far!</p> |
| 108 | + <div class="divider"></div> |
| 109 | + <button class="front-page-button" data-target="#main-page">Back</button> |
| 110 | + </div> |
| 111 | + </span> |
| 112 | + <span id="contact-me" class="hidden"> |
| 113 | + <div class="contact-items"> |
| 114 | + <h1>Contact Me</h1> |
| 115 | + <h2>Discord</h2> |
| 116 | + <p>The easiest way to get in touch with me; just friend me on discord (crossflame20#0001), and if you don't look like a bot, I'll accept.</p> |
| 117 | + <h2>Email</h2> |
| 118 | + <p>Additionally, you can reach me at owen@crossfla.me.</p> |
| 119 | + <div class="divider"></div> |
| 120 | + <button class="front-page-button" data-target="#main-page">Back</button> |
| 121 | + </div> |
| 122 | + </span> |
| 123 | + </div> |
| 124 | + </body> |
10 | 125 | </html>
|
0 commit comments