Author SHA1 Message Date
Raymonzut 89e22861af Merge branch 'beta' into 'master' 2020-06-16 12:29:09 +02:00
raymonanddependabot[bot] 3d93b6ddb8 Bump websocket-extensions from 0.1.3 to 0.1.4 in /client (#7)
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-06-08 21:46:12 +02:00
raymon 418fc1fad4 Merge pull request #6 from Raymonzut/dependabot/npm_and_yarn/client/websocket-extensions-0.1.4
Bump websocket-extensions from 0.1.3 to 0.1.4 in /client
2020-06-08 20:09:41 +02:00
dependabot[bot] 7f0d95b870 Bump websocket-extensions from 0.1.3 to 0.1.4 in /client
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-08 06:47:52 +00:00
Raymonzut a8736826bf Respond status 200 application/xml /api/posts/urls 2020-06-02 21:14:06 +02:00
Raymonzut 1a76d0d426 Merge branch 'beta' into 'master' 2020-06-02 16:21:29 +02:00
Raymonzut 09a5a7438c Merge branch 'release/c1.1.0-s1.2.0' into beta 2020-06-02 16:20:48 +02:00
Raymonzut f948e833e9 Bump version: c1.1.0-s1.2.0 2020-06-02 16:20:25 +02:00
Raymonzut 494f5b5c07 Fix #5 2020-06-02 15:55:50 +02:00
Raymonzut 760677ce90 Add paragraphs in AboutMe 2020-06-01 17:30:10 +02:00
Raymonzut ffe62b6380 Merge branch 'feat/themes' into beta 2020-06-01 16:55:34 +02:00
Raymonzut dd4e2ca9fb Style theme switching button 2020-06-01 16:53:53 +02:00
Raymonzut aab9885242 Add theme switching button 2020-05-31 22:42:14 +02:00
Raymonzut d8b038dc9c Reset padding, margin and width for entire bg 2020-05-31 22:32:58 +02:00
Raymonzut 43d28f7f6b Configure line-endings as LF 2020-05-31 22:09:01 +02:00
Raymonzut 4324e569ca Merge branch 'SEO/sitemap-posts' into beta 2020-05-19 20:28:33 +02:00
Raymonzut 56fffda0fe Route /urls: returns xml for posts 2020-05-19 20:27:32 +02:00
Raymonzut 9fdbd1b6a1 Route posts without interesting queries to posts 2020-05-15 13:11:15 +02:00
9 changed files with 122 additions and 16 deletions
+3
View File
@@ -0,0 +1,3 @@
* text=auto
eol=lf
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "personal-website",
"version": "1.0.0",
"version": "1.1.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -12874,9 +12874,9 @@
}
},
"websocket-extensions": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz",
"integrity": "sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==",
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
"integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
"dev": true
},
"which": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "personal-website",
"version": "1.0.0",
"version": "1.1.0",
"private": true,
"description": "A nice introduction to my chaos",
"main": "src/main.js",
+8
View File
@@ -6,6 +6,14 @@
<meta http-equiv="X-UA-Compatible" content="IE-edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Personal Website</title>
<style>
body, html {
padding: 0;
margin: 0;
width: 100%;
}
</style>
</head>
<body>
+63 -4
View File
@@ -1,28 +1,87 @@
<template>
<div id="app">
<div id="app" :class="theme">
<div id="nav">
<router-link to="/">Home</router-link> |
<router-link to="/posts">Posts</router-link> |
<router-link to="/qa">QA</router-link>
</div>
<router-view />
<div>
<button id="toggleThemeButton" @click="toggleTheme">{{ themeToggleVerb }} my eyes</button>
</div>
<router-view />
</div>
</template>
<script>
export default {
name: 'App',
data() {
return {
theme: 'dark'
}
},
computed: {
themeToggleVerb: function() {
return this.theme === 'light' ? "Save" : "Hurt"
}
},
methods: {
toggleTheme() {
const themes = ['light', 'dark']
this.theme = themes[(themes.indexOf(this.theme) + 1) % themes.length]
}
},
}
</script>
<style>
.light {
--primary-color: #ffffeb;
--text-color: #272736;
}
.dark {
--primary-color: #272736;
--text-color: #ffffeb;
}
.dark a {
color: #7e7e8f;
}
body {
background-color: var(--primary-color);
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
color: var(--text-color);
padding-top: 60px;
background-color: var(--primary-color);
min-height: 100vh;
}
#toggleThemeButton {
background: var(--primary-color);
border: 0px;
color: var(--text-color);
margin: 0 auto;
margin-right: 0px;
}
@media (min-width:420px) {
#toggleThemeButton {
float:right;
margin-right: 10px;
}
}
</style>
+6
View File
@@ -4,9 +4,15 @@
<p>
Hi there, good to see you on my website.
My name is Raymon Zutekouw({{ age }}).
</p>
<p>
Building software and exploring the wide variety of tools (or making them) is my passion.
To see it in action, checkout the stuff I make on
<a href='https://github.com/Raymonzut'>GitHub</a>.
</p>
<p>
The projects that may be useful to others are open source; for inspiring others and improving each others work.
That is why I am a huge fan of
<a href='https://www.gnu.org/philosophy/free-sw.en.html'>free software</a>.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "1.1.0",
"version": "1.2.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "1.1.0",
"version": "1.2.0",
"description": "The API for the website",
"main": "index.js",
"scripts": {
+30
View File
@@ -37,7 +37,10 @@ routes.set('', async (req, res) => {
if (req.query.sort === '1') res.send(posts_sorted)
else res.send(posts_sorted.reverse())
return
}
// Default response when there are no interesting queries
res.send(posts)
})
routes.set('/:id', async (req, res) => {
@@ -53,4 +56,31 @@ routes.set('/:id', async (req, res) => {
else res.send(results[0])
})
// For the sitemap.xml, will be listed in the XML Sitemap Index
routes.set('/urls', async (req, res) => {
const re = /(\/api\/)?(.*)\/urls/g
const result = [...req.raw.originalUrl.matchAll(re)]
if (!result) {
notFoundResponse(res)
return
}
const endpoint = result [1] ? result[1][2] : result[0][2]
// Assumes https
const BASE_URL = 'https://' + req.raw.hostname + endpoint
const urls = posts.map(post =>
`\n <url>
<loc>${BASE_URL}/${post._id}</loc>
<lastmod>${post.date}</lastmod>
<changefreq>never</changefreq>
<priority>0.9</priority>
</url>`
).join("\n")
const xml = `<?xml version="1.0" encoding="UTF-8"?>\r<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${urls}\n\r</urlset>`
res.header('Content-Type', 'application/xml')
res.status(200).send(xml)
})
module.exports = routes