From 4da3272bf7893760f6710c9a1ec7de02358136e6 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 5 Jun 2021 19:37:52 +0200 Subject: Reorganized into a monorepo, refactored the frontend again, goodbye Parcel --- src/frontend/App.vue | 11 - src/frontend/app.html | 11 - src/frontend/app.js | 7 - src/frontend/components/BaseBackButton.vue | 25 -- src/frontend/components/BaseBreadcrumb.vue | 33 -- src/frontend/components/CommitPatch.vue | 149 -------- src/frontend/components/HomeHeader.vue | 39 -- .../components/RepositoryCloneDropdown.vue | 71 ---- src/frontend/components/RepositoryHeader.vue | 51 --- src/frontend/components/RepositoryNavbar.vue | 54 --- src/frontend/components/RepositoryTreeBlob.vue | 154 -------- src/frontend/components/RepositoryTreeTree.vue | 84 ----- src/frontend/router/index.js | 46 --- src/frontend/scss/abstracts/_colors.scss | 10 - src/frontend/scss/abstracts/_fonts.scss | 5 - src/frontend/scss/style.scss | 396 --------------------- src/frontend/util/hljs-languages.js | 45 --- src/frontend/util/worker.js | 6 - src/frontend/views/Home.vue | 62 ---- src/frontend/views/Repository.vue | 29 -- src/frontend/views/RepositoryCommit.vue | 89 ----- src/frontend/views/RepositoryLog.vue | 91 ----- src/frontend/views/RepositoryTree.vue | 110 ------ 23 files changed, 1578 deletions(-) delete mode 100644 src/frontend/App.vue delete mode 100644 src/frontend/app.html delete mode 100644 src/frontend/app.js delete mode 100644 src/frontend/components/BaseBackButton.vue delete mode 100644 src/frontend/components/BaseBreadcrumb.vue delete mode 100644 src/frontend/components/CommitPatch.vue delete mode 100644 src/frontend/components/HomeHeader.vue delete mode 100644 src/frontend/components/RepositoryCloneDropdown.vue delete mode 100644 src/frontend/components/RepositoryHeader.vue delete mode 100644 src/frontend/components/RepositoryNavbar.vue delete mode 100644 src/frontend/components/RepositoryTreeBlob.vue delete mode 100644 src/frontend/components/RepositoryTreeTree.vue delete mode 100644 src/frontend/router/index.js delete mode 100644 src/frontend/scss/abstracts/_colors.scss delete mode 100644 src/frontend/scss/abstracts/_fonts.scss delete mode 100644 src/frontend/scss/style.scss delete mode 100644 src/frontend/util/hljs-languages.js delete mode 100644 src/frontend/util/worker.js delete mode 100644 src/frontend/views/Home.vue delete mode 100644 src/frontend/views/Repository.vue delete mode 100644 src/frontend/views/RepositoryCommit.vue delete mode 100644 src/frontend/views/RepositoryLog.vue delete mode 100644 src/frontend/views/RepositoryTree.vue (limited to 'src/frontend') diff --git a/src/frontend/App.vue b/src/frontend/App.vue deleted file mode 100644 index cbdce56..0000000 --- a/src/frontend/App.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/app.html b/src/frontend/app.html deleted file mode 100644 index 348ca45..0000000 --- a/src/frontend/app.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - -
- - - \ No newline at end of file diff --git a/src/frontend/app.js b/src/frontend/app.js deleted file mode 100644 index 1b43bbe..0000000 --- a/src/frontend/app.js +++ /dev/null @@ -1,7 +0,0 @@ -import { createApp } from "vue/dist/vue.esm-bundler"; -import App from "./App.vue"; -import router from "./router"; - -createApp(App) - .use(router) - .mount("#app"); \ No newline at end of file diff --git a/src/frontend/components/BaseBackButton.vue b/src/frontend/components/BaseBackButton.vue deleted file mode 100644 index 64b1286..0000000 --- a/src/frontend/components/BaseBackButton.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/components/BaseBreadcrumb.vue b/src/frontend/components/BaseBreadcrumb.vue deleted file mode 100644 index df82968..0000000 --- a/src/frontend/components/BaseBreadcrumb.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/frontend/components/CommitPatch.vue b/src/frontend/components/CommitPatch.vue deleted file mode 100644 index 2c815ff..0000000 --- a/src/frontend/components/CommitPatch.vue +++ /dev/null @@ -1,149 +0,0 @@ - \ No newline at end of file diff --git a/src/frontend/components/HomeHeader.vue b/src/frontend/components/HomeHeader.vue deleted file mode 100644 index 9a0688d..0000000 --- a/src/frontend/components/HomeHeader.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/components/RepositoryCloneDropdown.vue b/src/frontend/components/RepositoryCloneDropdown.vue deleted file mode 100644 index aaef5ef..0000000 --- a/src/frontend/components/RepositoryCloneDropdown.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/components/RepositoryHeader.vue b/src/frontend/components/RepositoryHeader.vue deleted file mode 100644 index 39ec00d..0000000 --- a/src/frontend/components/RepositoryHeader.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/components/RepositoryNavbar.vue b/src/frontend/components/RepositoryNavbar.vue deleted file mode 100644 index 53e1bfa..0000000 --- a/src/frontend/components/RepositoryNavbar.vue +++ /dev/null @@ -1,54 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/components/RepositoryTreeBlob.vue b/src/frontend/components/RepositoryTreeBlob.vue deleted file mode 100644 index f287f47..0000000 --- a/src/frontend/components/RepositoryTreeBlob.vue +++ /dev/null @@ -1,154 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/components/RepositoryTreeTree.vue b/src/frontend/components/RepositoryTreeTree.vue deleted file mode 100644 index 70c63eb..0000000 --- a/src/frontend/components/RepositoryTreeTree.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/router/index.js b/src/frontend/router/index.js deleted file mode 100644 index fc332cd..0000000 --- a/src/frontend/router/index.js +++ /dev/null @@ -1,46 +0,0 @@ -import { createRouter, createWebHistory } from "vue-router"; -import Home from "../views/Home"; -import Repository from "../views/Repository"; -import RepositoryLog from "../views/RepositoryLog"; -import RepositoryCommit from "../views/RepositoryCommit"; -import RepositoryTree from "../views/RepositoryTree"; - -const routes = [ - { - name: "Home", - path: "/", - component: Home - }, - { - name: "Repository", - path: '/:repo([a-zA-Z0-9\\.\\-_]+)', - component: Repository, - props: route => ({ repository: route.params.repo }), - children: [ - { - name: "Repository Log", - path: "log", - component: RepositoryLog - }, - { - name: "Commit", - path: "log/:commit([a-fA-F0-9]{40}$)", - component: RepositoryCommit, - props: route => ({ commit: route.params.commit }) - }, - { - name: "Tree Entry", - path: "tree/:path*", - component: RepositoryTree, - props: route => ({ pathArr: route.params.path ? route.params.path : [] }) - } - ] - } -]; - -const router = createRouter({ - history: createWebHistory(process.env.BASE_URL), - routes -}); - -export default router; \ No newline at end of file diff --git a/src/frontend/scss/abstracts/_colors.scss b/src/frontend/scss/abstracts/_colors.scss deleted file mode 100644 index 3c05336..0000000 --- a/src/frontend/scss/abstracts/_colors.scss +++ /dev/null @@ -1,10 +0,0 @@ -$primary: #023E8A; -$primary-light: #0077b6; -$secondary: #F48C06; -$success: #40916C; -$new: #06d6a0; -$danger: #D00000; -$text: #ffffff; -$text-gray: #6c757d; -$background: #121212; -$not-selected: #adb5bd; \ No newline at end of file diff --git a/src/frontend/scss/abstracts/_fonts.scss b/src/frontend/scss/abstracts/_fonts.scss deleted file mode 100644 index 6af5233..0000000 --- a/src/frontend/scss/abstracts/_fonts.scss +++ /dev/null @@ -1,5 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&display=swap'); -@import url('https://fonts.googleapis.com/css2?family=Oxygen:wght@300&display=swap'); - -$title: 'Oxygen', sans-serif; -$primary: 'Open Sans', sans-serif; \ No newline at end of file diff --git a/src/frontend/scss/style.scss b/src/frontend/scss/style.scss deleted file mode 100644 index 8cca066..0000000 --- a/src/frontend/scss/style.scss +++ /dev/null @@ -1,396 +0,0 @@ -@use "abstracts/colors"; -@use "abstracts/fonts"; - -@import "../../../node_modules/bootstrap/scss/functions"; -@import "../../../node_modules/bootstrap/scss/variables"; -@import "../../../node_modules/bootstrap/scss/mixins"; - -$theme-colors: ( - "primary": colors.$primary, - "secondary": colors.$secondary, - "success": colors.$success, - "info": $info, - "warning": $warning, - "danger": colors.$danger, - "light": $light, - "dark": $dark -); - -$font-size-base: 0.75rem; - -$h1-font-size: $font-size-base * 2.5; -$h2-font-size: $font-size-base * 2; -$h3-font-size: $font-size-base * 1.75; -$h4-font-size: $font-size-base * 1.5; -$h5-font-size: $font-size-base * 1.125; -$h6-font-size: $font-size-base; - -$font-sizes: ( - 1: $h1-font-size, - 2: $h2-font-size, - 3: $h3-font-size, - 4: $h4-font-size, - 5: $h5-font-size, - 6: $h6-font-size -); - -$navbar-nav-link-padding-x: 0.5rem; - -$btn-box-shadow: none; -$btn-active-box-shadow: none; -$btn-focus-box-shadow: none; - -$input-bg: lighten(#000000, 12%); -$input-disabled-bg: lighten(#000000, 12%); -$input-color: colors.$text; -$input-focus-color: colors.$text; -$input-focus-box-shadow: none; -$input-disabled-border-color: lighten(#000000, 50%); -$input-height-sm: auto; - -$dropdown-dark-bg: lighten(#000000, 10%); - -@import "../../../node_modules/bootstrap/scss/breadcrumb"; -@import "../../../node_modules/bootstrap/scss/tooltip"; -@import "../../../node_modules/bootstrap/scss/buttons"; -@import "../../../node_modules/bootstrap/scss/dropdown"; -@import "../../../node_modules/bootstrap/scss/forms"; -@import "../../../node_modules/bootstrap/scss/utilities"; -@import "../../../node_modules/bootstrap/scss/utilities/api"; -@import "../../../node_modules/bootstrap/scss/nav"; -@import "../../../node_modules/bootstrap/scss/navbar"; - -$table-cell-padding-x: 1rem; -$table-cell-padding-y: 0.2rem; - -$table-variants: ( - "primary": shift-color($primary, $table-bg-scale), - "secondary": shift-color($secondary, $table-bg-scale), - "success": shift-color($success, $table-bg-scale), - "info": shift-color($info, $table-bg-scale), - "warning": shift-color($warning, $table-bg-scale), - "danger": shift-color($danger, $table-bg-scale), - "light": $light, - "dark": colors.$background, -); - -@import "../../../node_modules/bootstrap/scss/tables"; - -@import "../../../node_modules/bootstrap/scss/containers"; -@import "../../../node_modules/bootstrap/scss/grid"; - -@import "../../../node_modules/highlight.js/scss/srcery.scss"; - -body { - background-color: colors.$background; - color: colors.$text; - font-family: fonts.$primary; - margin: 0px; -} - -ul { - list-style-type: none; - padding: 0; -} - -li { - div { - h2 { - margin: 0px; - } - } -} - -p { - margin: 0px; -} - -#title { - font-family: fonts.$title; - font-weight: 300; - line-height: 0.6; -} - -#about { - font-weight: 300; - padding-left: 1px; -} - -.form-control { - width: auto; -} - -#clone { - margin-left: auto; - margin-right: 40px; -} - -#clone-url-copy { - position: relative; - height: 30px; - display: block; - text-align: left; - margin: 5px auto; - input { - display: inline-block; - padding-right: 30px; - } - svg { - content: ""; - position: absolute; - right: 12px; - top: 7px; - bottom: 0; - width: 18px; - fill: colors.$not-selected; - &:hover { - fill: colors.$text; - } - } -} - -#projects-search { - align-items: center; - form { - display: flex; - align-items: center; - height: 35px; - input[type=search] { - margin-right: 15px; - } - } -} - -#repos { - margin-top: 25px; - li { - margin-bottom: 25px; - } -} - -.repo-last-updated { - display: block; - font-weight: 300; - font-style: italic; -} - -input[type=submit] { - background-color: colors.$primary; - color: colors.$text; - font-size: 1rem; - border: 0px; - border-radius: 7px; - padding: 8px 15px 8px 15px; -} - -a { - color: colors.$text; - text-decoration: none; - &:hover { - color: colors.$primary-light; - } -} - -.breadcrumb { - li { - margin-bottom: 0.5rem; - } -} - -#commit-info { - margin-bottom: 2rem; - tbody tr { - td { - padding: 0px; - padding-right: 10px; - } - } -} - -.commit-file { - margin-bottom: 50px; - table { - padding-top: 15px; - tbody tr td { - padding: 0px; - padding-left: 8px; - vertical-align: top; - &:nth-child(2) { - padding-right: 7px; - } - &:nth-child(3) { - padding-right: 15px; - } - } - } -} - -.commit-file-add-del { - margin-left: auto; - margin-right: 23px; - span { - margin-right: 10px !important; - font-weight: 700; - &:nth-child(1) { - color: colors.$new; - } - } -} - -.commit-file-pos-change { - color: colors.$text-gray; -} - -.commit-file-no-newline { - color: colors.$text-gray; -} - -.line-new { - color: colors.$new; -} -.line-deleted { - color: colors.$danger; -} - -.line-unchanged { - color: colors.$text-gray; -} - -[patch-line-col-unsel]::before { - content: attr(patch-line-col-unsel); -} - -.line-highlight-new { - border-right: 1px solid colors.$new; -} -.line-highlight-deleted { - border-right: 1px solid colors.$danger; -} - -code { - white-space: pre-wrap; - word-wrap: anywhere; -} - -.commit-file-header { - display: flex; - background-color: lighten(#000000, 14%); - padding: 10px; - span { - margin-right: 30px; - &:nth-child(2) { - color: colors.$danger; - } - } -} - -#back:hover { - fill: colors.$primary-light; -} - -#navbar { - line-height: 0; -} - -th { - text-align: start; -} - -.commit-info-title { - color: colors.$secondary; - padding-right: 30px; - width: 20px; -} - -.patch-too-large { - font-weight: 600; -} - -.dropdown-item { - width: auto !important; -} - -.btn-primary { - color: colors.$text; - &:hover { - background-color: colors.$primary-light; - } -} - - -.btn-check:checked + .btn-primary:focus, -.btn-check:active + .btn-primary:focus, -.btn-primary:active:focus, -.btn-primary.active:focus, -.show > .btn-primary.dropdown-toggle:focus { - box-shadow: none; -} - -.btn-check:focus + .btn-primary, -.btn-primary:focus { - box-shadow: none; -} - -#tree { - border-spacing: 0; - th { - padding-bottom: 5px; - color: colors.$secondary; - } - tbody tr:hover { - background-color: lighten(colors.$background, 10%); - } - td { - padding-top: 5px; - padding-bottom: 5px; - padding-right: 2vw; - &:nth-child(2) a, &:nth-child(3) { - font-weight: 300; - } - } - .tree-entry-padding, svg { - width: 18px; - padding-right: 5px; - } - a { - padding-right: 18px; - } -} - -[line]::before { - content: attr(line); - padding-right: 10px; -} - -@include media-breakpoint-down(sm) { - .commit-file table tbody tr td { - padding-left: 4px; - &:nth-child(2) { - padding-right: 4px; - } - &:nth-child(3) { - padding-right: 5px; - } - } - .table > :not(caption) > * > * { - padding: 0.1rem; - } -} - -@media (max-width: 1200px) { - .fs-1 { - font-size: calc(1.375rem + 0.667vw) !important; - } - .fs-2 { - font-size: calc(1.325rem + 1.584vw) !important; - } - .fs-3 { - font-size: calc(1.3rem + 0.017vw) !important; - } - .fs-4 { - font-size: calc(0.82rem + 0.4vw) !important; - } - .fs-5 { - font-size: calc(0.65rem + 0.25vw) !important; - } -} \ No newline at end of file diff --git a/src/frontend/util/hljs-languages.js b/src/frontend/util/hljs-languages.js deleted file mode 100644 index c8576e0..0000000 --- a/src/frontend/util/hljs-languages.js +++ /dev/null @@ -1,45 +0,0 @@ -const languages = [ - { "name": "arduino", "extensions": [ ".ino" ]}, - { "name": "actionscript", "extensions": [ ".as" ]}, - { "name": "bash", "extensions": [ ".sh", ".zsh" ]}, - { "name": "csharp", "extensions": [ ".cs" ]}, - { "name": "c", "extensions": [ ".c", ".h" ]}, - { "name": "cpp", "extensions": [ ".cpp", ".hpp" ]}, - { "name": "cmake", "extensions": [ "cmake.in" ]}, - { "name": "css", "extensions": [ ".css" ]}, - { "name": "d", "extensions": [ ".d" ]}, - { "name": "dos", "extensions": [ ".bat", ".cmd" ]}, - { "name": "dockerfile", "extensions": [ "dockerfile", "Dockerfile" ]}, - { "name": "go", "extensions": [ ".go" ]}, - { "name": "gradle", "extensions": [ ".gradle" ]}, - { "name": "xml", "extensions": [ ".xml", ".html", ".xhtml", ".rss", ".atom", ".xjb", ".xsd", ".xsl", ".plist", ".svg" ]}, - { "name": "haskell", "extensions": [ ".hs" ]}, - { "name": "ini", "extensions": [ ".ini", ".toml" ]}, - { "name": "json", "extensions": [ ".json" ]}, - { "name": "java", "extensions": [ ".java", ".jsp" ]}, - { "name": "javascript", "extensions": [ ".js", ".jsx" ]}, - { "name": "kotlin", "extensions": [ ".kt" ]}, - { "name": "lua", "extensions": [ ".lua" ]}, - { "name": "makefile", "extensions": [ "makefile", "Makefile" ]}, - { "name": "markdown", "extensions": [ ".md" ]}, - { "name": "objectivec", "extensions": [ ".m", ".mm", ".M" ]}, - { "name": "php", "extensions": [ ".php" ]}, - { "name": "perl", "extensions": [ ".pl", ".pm" ]}, - { "name": "plaintext", "extensions": [ ".txt" ]}, - { "name": "pgsql", "extensions": [ ".pgsql" ]}, - { "name": "powershell", "extensions": [ ".ps", ".ps1" ]}, - { "name": "python", "extensions": [ ".py" ]}, - { "name": "ruby", "extensions": [ ".rb" ]}, - { "name": "rust", "extensions": [ ".rs" ]}, - { "name": "scss", "extensions": [ ".scss" ]}, - { "name": "sql", "extensions": [ ".sql" ]}, - { "name": "swift", "extensions": [ ".swift" ]}, - { "name": "typescript", "extensions": [ ".ts" ]}, - { "name": "vbnet", "extensions": [ ".vb" ]}, - { "name": "vba", "extensions": [ ".vba" ]}, - { "name": "vbscript", "extensions": [ ".vbs" ]}, - { "name": "vim", "extensions": [ ".vim" ]}, - { "name": "yml", "extensions": [ ".yml" ]} -]; - -export default languages; \ No newline at end of file diff --git a/src/frontend/util/worker.js b/src/frontend/util/worker.js deleted file mode 100644 index e50743a..0000000 --- a/src/frontend/util/worker.js +++ /dev/null @@ -1,6 +0,0 @@ -onmessage = function(e) -{ - if(e.data.work === "sleep") { - setTimeout(() => postMessage("done"), e.data.time); - } -}; \ No newline at end of file diff --git a/src/frontend/views/Home.vue b/src/frontend/views/Home.vue deleted file mode 100644 index e3746c7..0000000 --- a/src/frontend/views/Home.vue +++ /dev/null @@ -1,62 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/views/Repository.vue b/src/frontend/views/Repository.vue deleted file mode 100644 index 8863529..0000000 --- a/src/frontend/views/Repository.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/views/RepositoryCommit.vue b/src/frontend/views/RepositoryCommit.vue deleted file mode 100644 index d3ba174..0000000 --- a/src/frontend/views/RepositoryCommit.vue +++ /dev/null @@ -1,89 +0,0 @@ - - - diff --git a/src/frontend/views/RepositoryLog.vue b/src/frontend/views/RepositoryLog.vue deleted file mode 100644 index 3adb6c2..0000000 --- a/src/frontend/views/RepositoryLog.vue +++ /dev/null @@ -1,91 +0,0 @@ - - - \ No newline at end of file diff --git a/src/frontend/views/RepositoryTree.vue b/src/frontend/views/RepositoryTree.vue deleted file mode 100644 index dc2c067..0000000 --- a/src/frontend/views/RepositoryTree.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - \ No newline at end of file -- cgit v1.2.3-18-g5258