diff --git a/.gitignore b/.gitignore index 408f4f5..02db169 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -old api/node_modules -api/.env \ No newline at end of file +old \ No newline at end of file diff --git a/404.html b/404.html deleted file mode 100644 index fe8b4bb..0000000 --- a/404.html +++ /dev/null @@ -1,127 +0,0 @@ - - - -
-Sorry, but the page you requested couldn't be found! Maybe check the URL and try again?
- -(it could also be awexs design but idk, that's not for me to figure out)
- - - - - - - - - \ No newline at end of file diff --git a/api/index.js b/api/index.js index d41a3b9..cd51825 100644 --- a/api/index.js +++ b/api/index.js @@ -49,6 +49,29 @@ app.post('/splitstat/webhook', async (req, res) => { } }) +app.post(`/website/webhook`, async (req, res) => { + if (req.body) { + var data = axios.post(process.env.discordContact, { + username: req.body.username, + content: req.body.content, + embeds: req.body.embeds + }) + .then(function(response) { + if (response.status !== 200) { + return res.status(response.status).send({"status":200}) + } else { + return res.status(200).send({"status":200}) + } + }) + .catch(function(err) { + console.log(err.toJSON()); + return res.status(500).send({ "status": 500 }) + }) + } else { + return res.status(404) + } +}) + app.use(function (req, res, next) { res.status(404).send({ "status": 404, "message": `Sorry, that endpoint (${req.path}) does not exist.` }) }) @@ -57,6 +80,6 @@ app.post('/splitstat/webhook', async (req, res) => { res.status(500).send({ "status": 500, "message": "Something broke! Looking into it :)" }) }) -app.listen(process.env.PORT, () => { +app.listen(process.env.PORT || 3000, () => { console.log(`Started`) }) \ No newline at end of file diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..ab83dc7 --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,54 @@ +html, body { + position: relative; + margin: 0; + height: 1500px; + text-align:center; + } + #image { + width: 100%; + height: 100vh; + min-height: 600px; + display: block; + position: relative; + left: 0; + z-index:-1; + background-repeat: no-repeat; + background-image: url('/assets/image/profile.png'); + } + + .border { + text-align:center; + overflow:hidden; + margin-left: auto; + margin-right: auto; + background-color: #6e6754; + border-radius:20px; + padding-top:10px; + padding-bottom:10px; + min-width:5%; + max-width:35%; + min-height:4%; + color:azure; + } + + .banner { + /* background-image: url('../image/profile/banner.jpg'); + background-repeat:no-repeat; + background-position:center; */ + width:100%; + max-height:100%; + /* height:25%; */ + } + + .medal-clip { + /* float:left; */ + width:50%; + } + + a { + color:#5c5c5c !important; + } + + a:hover { + color:#878787; + } \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css deleted file mode 100644 index 3bbf414..0000000 --- a/assets/css/style.css +++ /dev/null @@ -1,103 +0,0 @@ -html, body { - font-family: 'Quicksand', sans-serif; - margin:0; - padding:0; - line-height:30px; -} - - -/* -Welcome/Home Styling -*/ - -#welcome { - height: 933px; - line-height: 10px; - text-align: center; - border: 2px solid black; - background-color:#474747; - color:#cfcfcf; - } - - #welcomespan { - display: inline-block; - vertical-align: middle; - line-height: normal; - padding-top:200px - } - - /* ----------------- */ - - /* - About - */ - #about { - text-align:center; - white-space:normal; - } - #aboutContainer { - white-space:normal; - padding-top:30px; - } - - /* ----------------- */ - - /* - Projects - */ - - #projects { - text-align:center; - line-height:20px; - white-space:normal; - } - - #projectsContainer { - white-space:normal; - } - - /* ----------------- */ - - /* - Skills - */ - - #experienced { - text-align:center; - } - - /* ----------------- */ - - /* - Universal Styling - */ - - h3 { - font-size:40px; - } - - h4 { - font-size:30px; - } - - p { - font-size:20px; - } - - hr { - border-color:gray; - width:50%; - } - - #intermission { - text-align:center; - } - - ion-icon { - font-size:64px; - color:gray; - } - - #form { - text-align:center; - } \ No newline at end of file diff --git a/assets/image/medal.jpg b/assets/image/medal.jpg new file mode 100644 index 0000000..d685b09 Binary files /dev/null and b/assets/image/medal.jpg differ diff --git a/assets/image/profile.png b/assets/image/profile.png new file mode 100644 index 0000000..f1eb866 Binary files /dev/null and b/assets/image/profile.png differ diff --git a/assets/image/profile/banner.jpg b/assets/image/profile/banner.jpg new file mode 100644 index 0000000..6be115e Binary files /dev/null and b/assets/image/profile/banner.jpg differ diff --git a/assets/image/profile/pfp.jpg b/assets/image/profile/pfp.jpg new file mode 100644 index 0000000..36cb053 Binary files /dev/null and b/assets/image/profile/pfp.jpg differ diff --git a/assets/img/code.png b/assets/img/code.png deleted file mode 100644 index 21ff62f..0000000 Binary files a/assets/img/code.png and /dev/null differ diff --git a/assets/img/example.png b/assets/img/example.png deleted file mode 100644 index 5f79091..0000000 Binary files a/assets/img/example.png and /dev/null differ diff --git a/assets/img/logo.png b/assets/img/logo.png deleted file mode 100644 index 40067b3..0000000 Binary files a/assets/img/logo.png and /dev/null differ diff --git a/assets/img/mcw-code.png b/assets/img/mcw-code.png deleted file mode 100644 index beb141a..0000000 Binary files a/assets/img/mcw-code.png and /dev/null differ diff --git a/assets/img/twitterButton.png b/assets/img/twitterButton.png deleted file mode 100644 index c2822dc..0000000 Binary files a/assets/img/twitterButton.png and /dev/null differ diff --git a/assets/js/contact.js b/assets/js/contact.js new file mode 100644 index 0000000..32600d7 --- /dev/null +++ b/assets/js/contact.js @@ -0,0 +1,39 @@ +async function sendContact() { + var email = document.getElementById("email").value; + var subject = document.getElementById("subject").value; + var message = document.getElementById("message").value; + + // Start of checks + + if(!email || !message || !subject) { + document.getElementById('notification').innerHTML = `Sorry, a field wasn't provided!
` + } else { + const data = { + "username": "Site Contact", + "content": "Someone sent a request from the website contact page!", + "embeds": [ + { + "author": { + "name": email, + "url": "https://awexxx.xyz" + }, + "title": subject, + "description": message + } + ] + } + + await fetch(`https://api.awexxx.xyz/website/webhook`, { + method: 'POST', + headers: { 'content-type': 'application/json' }, + body: JSON.stringify(data) + }) + .then(function(response) { + if(response.status === 204) { + document.getElementById(`notification`).innerHTML = `Success! That message was successfully sent!
` + } else if (response.status === 500) { + document.getElementById(`notification`).innerHTML = `Uh oh! Something went wrong sending that message.
` + } + }) + } +} \ No newline at end of file diff --git a/assets/js/medal.js b/assets/js/medal.js deleted file mode 100644 index 4a5b2ed..0000000 --- a/assets/js/medal.js +++ /dev/null @@ -1,15 +0,0 @@ - /////////////////////////////////// - // Fetch Script for Awex Clips // - // Medal.tv API // - /////////////////////////////////// - -async function medalclips() { - const medalapi = 'https://developers.medal.tv/v1/latest?userId=215577&limit=1' - const { contentObjects } = await fetch(medalapi, { - method: 'GET', - headers: { 'Authorization': 'pub_94FdmA2SMLm6V53dDykcPB3v4HLak6Db', 'Content-Type': 'application/json' } - }).then(response => response.json()) - - document.querySelector("#clip").innerHTML = contentObjects[0].embedIframeCode - document.querySelector("#title").innerHTML = "Clip Title: " + contentObjects[0].contentTitle + "" -} \ No newline at end of file diff --git a/assets/js/medalClip.js b/assets/js/medalClip.js new file mode 100644 index 0000000..6e37443 --- /dev/null +++ b/assets/js/medalClip.js @@ -0,0 +1,12 @@ +async function getMedalClip() { + var clip = await fetch(`https://developers.medal.tv/v1/latest?userId=215577&limit=2`, { + method: 'GET', + headers: { 'content-type': 'application/json', 'authorization': 'pub_HJcYn9DsxH0iW0N8iCqLPUddAr7hiyo2' } + }).then (response => response.json()); + + document.querySelector('.c1iframe').innerHTML = clip.contentObjects[0].embedIframeCode + document.querySelector('.c1title').innerHTML = `${clip.contentObjects[0].contentTitle}
` + + + console.log(clip) +} \ No newline at end of file diff --git a/assets/js/query.js b/assets/js/query.js deleted file mode 100644 index 4dc53cf..0000000 --- a/assets/js/query.js +++ /dev/null @@ -1,3 +0,0 @@ -////////////////////////// -// Query Tag Processing // -////////////////////////// \ No newline at end of file diff --git a/assets/js/splitstat.js b/assets/js/splitstat.js deleted file mode 100644 index 5ad2c0c..0000000 --- a/assets/js/splitstat.js +++ /dev/null @@ -1,17 +0,0 @@ -async function checkForOutage() { - var data = await fetch(`https://st.awexxx.xyz/heartbeat`) - - console.log(data) - - if (data.response !== 200) { - document.getElementById(`status`).innerText = `offline!` - document.getElementById(`addon`).innerText = `API didn't respond!` - } else if (data.response === 200) { - document.getElementById(`status`).innerText = `online!` - document.getElementById(`addon`).innerText = `API responded when sent a heartbeat!` - } - - console.log(`Checked, checking in 10s`) - - setTimeout(checkForOutage, 10000); -} \ No newline at end of file diff --git a/contact.html b/contact.html new file mode 100644 index 0000000..08d7d5f --- /dev/null +++ b/contact.html @@ -0,0 +1,67 @@ + + +Want to get a hold of me? Fill out the below form, it will send me a note!
+ +