From 6d5cdada4358abe4df475d0b17b463c7329bc84f Mon Sep 17 00:00:00 2001 From: km0 Date: Sun, 18 Jun 2023 17:44:26 +0200 Subject: [PATCH] first setup --- 1dl/hello-word.1dl | 27 ++++++++++ 1dl/opening.1dl | 4 ++ flat.js | 71 ++++++++++++++++++++++++++ index.html | 2 +- package.json | 4 +- public/pathways/hello-word.1dl.json | 1 + public/pathways/hello-word.json | 1 + public/pathways/opening.1dl.json | 1 + public/pathways/opening.json | 1 + public/vite.svg | 1 - src/App.vue | 30 +++-------- src/assets/pathways.json | 1 + src/assets/vue.svg | 1 - src/components/HelloWorld.vue | 40 --------------- src/components/Pathways.vue | 21 ++++++++ src/main.js | 7 ++- src/router/index.js | 17 +++++++ src/style.css | 77 +---------------------------- src/views/About.vue | 27 ++++++++++ src/views/Home.vue | 28 +++++++++++ src/views/Pathway.vue | 57 +++++++++++++++++++++ vite.config.js | 6 +++ yarn.lock | 12 +++++ 23 files changed, 294 insertions(+), 143 deletions(-) create mode 100644 1dl/hello-word.1dl create mode 100644 1dl/opening.1dl create mode 100644 flat.js create mode 100644 public/pathways/hello-word.1dl.json create mode 100644 public/pathways/hello-word.json create mode 100644 public/pathways/opening.1dl.json create mode 100644 public/pathways/opening.json delete mode 100644 public/vite.svg create mode 100644 src/assets/pathways.json delete mode 100644 src/assets/vue.svg delete mode 100644 src/components/HelloWorld.vue create mode 100644 src/components/Pathways.vue create mode 100644 src/router/index.js create mode 100644 src/views/About.vue create mode 100644 src/views/Home.vue create mode 100644 src/views/Pathway.vue diff --git a/1dl/hello-word.1dl b/1dl/hello-word.1dl new file mode 100644 index 0000000..d13eb87 --- /dev/null +++ b/1dl/hello-word.1dl @@ -0,0 +1,27 @@ +(hello word) + +[description] +There are words around code: they create entry points and help understand software. They offer ways to reason about programming, they highlight certain features and hide undesired flaws. They describe the surroundings of an application: how does it interact with neighbouring systems and how does it address involved developers. These words make worlds around code. Worlds with embedded values, active actors and politics of participation. This pathway focuses on the usage of words and technical terminology in README files, on the assumption they imply, on the ways they are choosen. These README play by avoiding or insisting on specific terms, inflating tech jargon and opening backdoors for the participation of different sensibilities in the making of code. + + +(flask-example) + +[where] +https://git.xpub.nl/manetta/flask-example/src/branch/documentation + +[what] +a piece of documentation written together with @chae. +there is a particular attention to write in a welcoming way, in a way to encourage green developers to familiarize with the development workflow. To address this particular public every technical detail (.env files, .gitignore, the usage of terminal), is inflated and explained pointing at useful resources. + + +(pad-bis) + +[where] +https://git.xpub.nl/kamo/pad-bis#deployment-production + +[section] +Deployment and production + +[what] +Trying to reclaim the usage of terms such as "deployment" and "production", in order to problematize their normalized context and offer a redemption-arc by using them in a different way. Rewrite this note because it's overengineered. + diff --git a/1dl/opening.1dl b/1dl/opening.1dl new file mode 100644 index 0000000..ea0b663 --- /dev/null +++ b/1dl/opening.1dl @@ -0,0 +1,4 @@ +(Opening) +[description] +An opening is a declaration of intents, it manifests intentions. These intentions are glued together in the smallest context possible of a sentence. They are like a trailer for a movie, or the thumbnail of a youtube video. Often exagerate, click-bait, ideological. How and why these different facets come together? They are a visibile traces of choices made during development, choices that sometimes are made evident within the documentation, and sometimes remain unanswered. + diff --git a/flat.js b/flat.js new file mode 100644 index 0000000..dbf2b50 --- /dev/null +++ b/flat.js @@ -0,0 +1,71 @@ +import {open, mkdir, writeFile, readdir} from 'node:fs/promises' + +const inDir = './1dl/' +const outDir = './public/pathways/' +const files = await readdir(inDir) + + + + + +const syntax = () => { + const t = /^\(.*\)/ + const s = /^\[(.*?)\]/ + const n = /^(-->)/ + return {t, s, n} +} + + + +const parse = async (filepath) => { + const file = await open(filepath) + + const {t, s, n} = syntax() + + const parsed = [] + let currentTitle = "" + let currentSection = "" + + for await (let line of file.readLines()) { + line = line.trim() + + if (!line.length) continue + + if (line.match(t)) { + currentTitle = line.slice(1, -1) + parsed.push({title: currentTitle}) + continue + } + + if (line.match(s)) { + currentSection = line.slice(1, -1) + parsed[parsed.length-1][currentSection] = [] + continue + } + + if (line.match(n)) { + let note = line.slice(2) + parsed[parsed.length-1][currentSection].push({note: note}) + continue + } + + parsed[parsed.length-1][currentSection].push(line) + + } + + return parsed +} + +const pathways = [] + + +for (const file of files) { + const parsed = await parse(inDir+file) + + let filename = file.replace('.1dl', '') + pathways.push({slug: filename, ...parsed[0]}) + writeFile(outDir + file + '.json', JSON.stringify(parsed)) +} + +writeFile('./src/assets/pathways.json', JSON.stringify(pathways)) + diff --git a/index.html b/index.html index 795e4fb..aed285b 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@ - + Vite + Vue diff --git a/package.json b/package.json index f4fa824..5e4fad4 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,14 @@ "version": "0.0.0", "type": "module", "scripts": { + "flat": "node flat.js", "dev": "vite", "build": "vite build", "preview": "vite preview" }, "dependencies": { - "vue": "^3.2.47" + "vue": "^3.2.47", + "vue-router": "4" }, "devDependencies": { "@vitejs/plugin-vue": "^4.1.0", diff --git a/public/pathways/hello-word.1dl.json b/public/pathways/hello-word.1dl.json new file mode 100644 index 0000000..9b21295 --- /dev/null +++ b/public/pathways/hello-word.1dl.json @@ -0,0 +1 @@ +[{"title":"hello word","description":["There are words around code: they create entry points and help understand software. They offer ways to reason about programming, they highlight certain features and hide undesired flaws. They describe the surroundings of an application: how does it interact with neighbouring systems and how does it address involved developers. These words make worlds around code. Worlds with embedded values, active actors and politics of participation. This pathway focuses on the usage of words and technical terminology in README files, on the assumption they imply, on the ways they are choosen. These README play by avoiding or insisting on specific terms, inflating tech jargon and opening backdoors for the participation of different sensibilities in the making of code."]},{"title":"flask-example","where":["https://git.xpub.nl/manetta/flask-example/src/branch/documentation"],"what":["a piece of documentation written together with @chae.","there is a particular attention to write in a welcoming way, in a way to encourage green developers to familiarize with the development workflow. To address this particular public every technical detail (.env files, .gitignore, the usage of terminal), is inflated and explained pointing at useful resources."]},{"title":"pad-bis","where":["https://git.xpub.nl/kamo/pad-bis#deployment-production"],"section":["Deployment and production"],"what":["Trying to reclaim the usage of terms such as \"deployment\" and \"production\", in order to problematize their normalized context and offer a redemption-arc by using them in a different way. Rewrite this note because it's overengineered."]}] \ No newline at end of file diff --git a/public/pathways/hello-word.json b/public/pathways/hello-word.json new file mode 100644 index 0000000..9b21295 --- /dev/null +++ b/public/pathways/hello-word.json @@ -0,0 +1 @@ +[{"title":"hello word","description":["There are words around code: they create entry points and help understand software. They offer ways to reason about programming, they highlight certain features and hide undesired flaws. They describe the surroundings of an application: how does it interact with neighbouring systems and how does it address involved developers. These words make worlds around code. Worlds with embedded values, active actors and politics of participation. This pathway focuses on the usage of words and technical terminology in README files, on the assumption they imply, on the ways they are choosen. These README play by avoiding or insisting on specific terms, inflating tech jargon and opening backdoors for the participation of different sensibilities in the making of code."]},{"title":"flask-example","where":["https://git.xpub.nl/manetta/flask-example/src/branch/documentation"],"what":["a piece of documentation written together with @chae.","there is a particular attention to write in a welcoming way, in a way to encourage green developers to familiarize with the development workflow. To address this particular public every technical detail (.env files, .gitignore, the usage of terminal), is inflated and explained pointing at useful resources."]},{"title":"pad-bis","where":["https://git.xpub.nl/kamo/pad-bis#deployment-production"],"section":["Deployment and production"],"what":["Trying to reclaim the usage of terms such as \"deployment\" and \"production\", in order to problematize their normalized context and offer a redemption-arc by using them in a different way. Rewrite this note because it's overengineered."]}] \ No newline at end of file diff --git a/public/pathways/opening.1dl.json b/public/pathways/opening.1dl.json new file mode 100644 index 0000000..9e1672f --- /dev/null +++ b/public/pathways/opening.1dl.json @@ -0,0 +1 @@ +[{"title":"Opening","description":["An opening is a declaration of intents, it manifests intentions. These intentions are glued together in the smallest context possible of a sentence. They are like a trailer for a movie, or the thumbnail of a youtube video. Often exagerate, click-bait, ideological. How and why these different facets come together? They are a visibile traces of choices made during development, choices that sometimes are made evident within the documentation, and sometimes remain unanswered."]}] \ No newline at end of file diff --git a/public/pathways/opening.json b/public/pathways/opening.json new file mode 100644 index 0000000..9e1672f --- /dev/null +++ b/public/pathways/opening.json @@ -0,0 +1 @@ +[{"title":"Opening","description":["An opening is a declaration of intents, it manifests intentions. These intentions are glued together in the smallest context possible of a sentence. They are like a trailer for a movie, or the thumbnail of a youtube video. Often exagerate, click-bait, ideological. How and why these different facets come together? They are a visibile traces of choices made during development, choices that sometimes are made evident within the documentation, and sometimes remain unanswered."]}] \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 341dbf0..6d13c7e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,30 +1,16 @@ diff --git a/src/assets/pathways.json b/src/assets/pathways.json new file mode 100644 index 0000000..e6c0d8d --- /dev/null +++ b/src/assets/pathways.json @@ -0,0 +1 @@ +[{"slug":"hello-word","title":"hello word","description":["There are words around code: they create entry points and help understand software. They offer ways to reason about programming, they highlight certain features and hide undesired flaws. They describe the surroundings of an application: how does it interact with neighbouring systems and how does it address involved developers. These words make worlds around code. Worlds with embedded values, active actors and politics of participation. This pathway focuses on the usage of words and technical terminology in README files, on the assumption they imply, on the ways they are choosen. These README play by avoiding or insisting on specific terms, inflating tech jargon and opening backdoors for the participation of different sensibilities in the making of code."]},{"slug":"opening","title":"Opening","description":["An opening is a declaration of intents, it manifests intentions. These intentions are glued together in the smallest context possible of a sentence. They are like a trailer for a movie, or the thumbnail of a youtube video. Often exagerate, click-bait, ideological. How and why these different facets come together? They are a visibile traces of choices made during development, choices that sometimes are made evident within the documentation, and sometimes remain unanswered."]}] \ No newline at end of file diff --git a/src/assets/vue.svg b/src/assets/vue.svg deleted file mode 100644 index 770e9d3..0000000 --- a/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue deleted file mode 100644 index f5e4f53..0000000 --- a/src/components/HelloWorld.vue +++ /dev/null @@ -1,40 +0,0 @@ - - - - - diff --git a/src/components/Pathways.vue b/src/components/Pathways.vue new file mode 100644 index 0000000..c4bd3a3 --- /dev/null +++ b/src/components/Pathways.vue @@ -0,0 +1,21 @@ + + + diff --git a/src/main.js b/src/main.js index 2425c0f..32ed6c8 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,10 @@ import { createApp } from 'vue' import './style.css' import App from './App.vue' +import router from '@/router' -createApp(App).mount('#app') + + + + +createApp(App).use(router).mount('#app') diff --git a/src/router/index.js b/src/router/index.js new file mode 100644 index 0000000..c87c7c0 --- /dev/null +++ b/src/router/index.js @@ -0,0 +1,17 @@ +import {createRouter, createWebHistory} from 'vue-router' +import Home from '@/views/Home.vue' +import About from '@/views/About.vue' +import Pathway from '@/views/Pathway.vue' + +const routes = [ + {path: '/', name: 'Home', component: Home}, + {path: '/about', name: 'About', component: About}, + {path: '/pathways/:slug', name: 'Pathway', component: Pathway} +] + +const router = createRouter( { + history: createWebHistory(), + routes: routes +}) + +export default router diff --git a/src/style.css b/src/style.css index 84a0050..65f2cc9 100644 --- a/src/style.css +++ b/src/style.css @@ -1,11 +1,6 @@ :root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; font-synthesis: none; text-rendering: optimizeLegibility; @@ -14,76 +9,6 @@ -webkit-text-size-adjust: 100%; } -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -a { - font-weight: 500; - color: #646cff; - text-decoration: inherit; -} -a:hover { - color: #535bf2; -} - -body { - margin: 0; - display: flex; - place-items: center; - min-width: 320px; - min-height: 100vh; -} - -h1 { - font-size: 3.2em; - line-height: 1.1; -} - -button { - border-radius: 8px; - border: 1px solid transparent; - padding: 0.6em 1.2em; - font-size: 1em; - font-weight: 500; - font-family: inherit; - background-color: #1a1a1a; - cursor: pointer; - transition: border-color 0.25s; -} -button:hover { - border-color: #646cff; -} -button:focus, -button:focus-visible { - outline: 4px auto -webkit-focus-ring-color; -} - -.card { - padding: 2em; -} - -#app { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} @media (prefers-color-scheme: light) { - :root { - color: #213547; - background-color: #ffffff; - } - a:hover { - color: #747bff; - } - button { - background-color: #f9f9f9; - } -} + } diff --git a/src/views/About.vue b/src/views/About.vue new file mode 100644 index 0000000..3878a08 --- /dev/null +++ b/src/views/About.vue @@ -0,0 +1,27 @@ + diff --git a/src/views/Home.vue b/src/views/Home.vue new file mode 100644 index 0000000..1f67998 --- /dev/null +++ b/src/views/Home.vue @@ -0,0 +1,28 @@ + + + diff --git a/src/views/Pathway.vue b/src/views/Pathway.vue new file mode 100644 index 0000000..1de5d29 --- /dev/null +++ b/src/views/Pathway.vue @@ -0,0 +1,57 @@ + + + diff --git a/vite.config.js b/vite.config.js index 05c1740..6643598 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,7 +1,13 @@ +import {fileURLToPath, URL} from 'node:url' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], + resolve: { + alias: { + '@': fileURLToPath(new URL('./src', import.meta.url)) + } + } }) diff --git a/yarn.lock b/yarn.lock index 37adc2f..2207aa8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -169,6 +169,11 @@ "@vue/compiler-dom" "3.3.4" "@vue/shared" "3.3.4" +"@vue/devtools-api@^6.5.0": + version "6.5.0" + resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.5.0.tgz#98b99425edee70b4c992692628fa1ea2c1e57d07" + integrity sha512-o9KfBeaBmCKl10usN4crU53fYtC1r7jJwdGKjPT24t348rHxgfpZ0xL3Xm/gLUYnc0oTp8LAmrxOeLyu6tbk2Q== + "@vue/reactivity-transform@3.3.4": version "3.3.4" resolved "https://registry.yarnpkg.com/@vue/reactivity-transform/-/reactivity-transform-3.3.4.tgz#52908476e34d6a65c6c21cd2722d41ed8ae51929" @@ -309,6 +314,13 @@ vite@^4.3.9: optionalDependencies: fsevents "~2.3.2" +vue-router@4: + version "4.2.2" + resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-4.2.2.tgz#b0097b66d89ca81c0986be03da244c7b32a4fd81" + integrity sha512-cChBPPmAflgBGmy3tBsjeoe3f3VOSG6naKyY5pjtrqLGbNEXdzCigFUHgBvp9e3ysAtFtEx7OLqcSDh/1Cq2TQ== + dependencies: + "@vue/devtools-api" "^6.5.0" + vue@^3.2.47: version "3.3.4" resolved "https://registry.yarnpkg.com/vue/-/vue-3.3.4.tgz#8ed945d3873667df1d0fcf3b2463ada028f88bd6"