Explorar el Código

Get the devblog from the backend

Ecconia hace 7 años
padre
commit
afe5181064
Se han modificado 1 ficheros con 3 adiciones y 74 borrados
  1. 3 74
      src/views/Devblog.vue

+ 3 - 74
src/views/Devblog.vue

@@ -20,81 +20,10 @@
 			}
 		},
 		created () {
-			this.parseBlog(`
-				Ecconia's dusty server-machine
-				-	For this project the webserver owned by Ecconia has been started again and a fresh Ubuntu 18.04 has been installed.
-				-	Basic setup has been made, editing bash, setting up ssh and vim.
-
-				Sever software
-				-	Nginx shall be the server for this project, its easy to setup and all config files are at one place.
-
-				Security
-				-	All traffic will be routed over Cloudflare. The connections from and to Cloudflare are encrypted with SSL.
-				-	The connection is as secure as Cloudflare is (lets trust it...). Cloudflare mainly caches files and protects against DDOS.
-
-				Vue-Framework added to website
-				-	Vue is a framework which uses javascript to manipulate the HTML-DOM of the browser. This allows very easy web-developing.
-				-	Nice feature: Updating the website according to JS variables.
-				-	Downside: SEO may fail.
-
-				After reading millions of documentation
-				-	The first simple version of the website has been written, a single HTMl file contains the whole website.
-
-				Vue-Router
-				-	The website is using Vue-Router it allows natural page switching without actually doing so. The content will just be replaced by Vue.
-
-				The small steps
-				-	The start page as well as the application page shall function the same as on the current website. Additional this devblog has been added. An Impressum is a must have as soon as the server is located in germany.
-
-				Finally backend for frontend
-				-	Vue has "components" each mainpage is one, but later other parts of the website may be components (buttons, inputs, pager, posts etc....)
-				-	These components may be bundled and can be loaded on demand, this can be done by the frontend, by loading the components.
-				-	Webpack is a software which analyzes the source code on the server and bundles it as well as processes it. That way components can be bundled and provided. Additional this provides a fancy way to define components in single files. The code to load components will be generated by Webpack. Yay, less programming less mistakes.
-
-				Transfered everything to new backend
-				-	With the new backend a new website structure has been created. The old pages had been transfered to the correct positions in the new backend.
-				-	Now that the backend is working, the frontend may be developed.
-
-				Update for the devblog
-				-	The Development Blog got a new "design" and finally an update to its content.
-				-	One variable holds all the entries and will be parsed into a Vue entries array which are automatically visible when added.
-
-				Update introductions
-				-	Startpage and Devblog have been rewritten
-
-				
-			`)
+			this.core.get('/devblog').then((response) => {
+				this.entries = response.data;
+			})
 		},
-		methods: {
-			parseBlog(blog) {
-				let t = blog.split('\n')
-				let entries = []
-				let currentEntry = {
-					title: t[1],
-					paragraphs: []
-				}
-
-				for (var i = 2; i < t.length - 1; i++) {
-					let line = t[i].trimStart()
-					if(!line) {
-						continue
-					}
-					if (line.startsWith('-') === true) {
-						currentEntry.paragraphs.push(line.substr(1).trimStart())
-					} else {
-						entries.push(currentEntry)
-						currentEntry = {
-							title: line,
-							paragraphs: []
-						}
-					}
-				}
-
-				entries.push(currentEntry)
-
-				this.entries = entries
-			},
-		}
 	}
 </script>