Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#467] Add Title Component #2102

Merged
merged 34 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
8cc525f
Add title component
sopa301 Jan 29, 2024
a223766
Remove testing code
sopa301 Jan 29, 2024
31ef993
Add handling for invalid files
sopa301 Jan 29, 2024
0511528
Update package-lock
sopa301 Jan 29, 2024
caeee3c
Remove extra component usage
sopa301 Jan 29, 2024
6f6251c
Remove console statement
sopa301 Jan 29, 2024
5157f59
Remove faulty package-lock
sopa301 Jan 29, 2024
39c5d07
Add test title
sopa301 Jan 31, 2024
d726113
Add EOL
sopa301 Jan 31, 2024
14b6d34
Merge branch 'master' of https://github.com/sopa301/RepoSense into 46…
sopa301 Jan 31, 2024
b3343dc
Fix scrolling and test bugs
sopa301 Feb 6, 2024
0ff36c5
Fix line length
sopa301 Feb 6, 2024
bcdacef
Merge branch 'master' into 467-add-intro
sopa301 Feb 6, 2024
b3fdd84
Make title load from --assets folder
sopa301 Feb 8, 2024
293ad11
Make title path more general
sopa301 Feb 8, 2024
08e3934
Merge branch 'master' of https://github.com/sopa301/RepoSense into 46…
sopa301 Feb 8, 2024
05ef0ca
Remove test file
sopa301 Feb 8, 2024
a00e09e
Fix minor styling error
sopa301 Feb 8, 2024
434bca3
Update CLI reference
sopa301 Feb 13, 2024
610ab95
Add borders
sopa301 Feb 13, 2024
ffd05c0
Fix bug
sopa301 Feb 13, 2024
1324cc0
Update docs/ug/cli.md
sopa301 Feb 14, 2024
fdbdc0e
Add handling for unexpected error
sopa301 Feb 14, 2024
b7b002f
Merge branch '467-add-intro' of https://github.com/sopa301/RepoSense …
sopa301 Feb 14, 2024
6458fa2
Move title into left panel
sopa301 Feb 14, 2024
6ca0305
Fix style
sopa301 Feb 14, 2024
f7d7a6d
Update frontend/src/components/c-title.vue
sopa301 Feb 16, 2024
65fc7ea
Merge branch 'master' into 467-add-intro
ckcherry23 Feb 17, 2024
a083ef0
Remove unneeded code and fix promise bug
sopa301 Feb 17, 2024
2032cdc
Merge branch '467-add-intro' of https://github.com/sopa301/RepoSense …
sopa301 Feb 17, 2024
a19362d
Fix style
sopa301 Feb 17, 2024
644fd83
Remove unused code
sopa301 Feb 17, 2024
ae772a4
Add test
sopa301 Feb 17, 2024
e07a12e
Enable raw HTML
sopa301 Feb 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
503 changes: 270 additions & 233 deletions frontend/package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@
"@fortawesome/free-brands-svg-icons": "^6.0.0",
"@fortawesome/free-solid-svg-icons": "^6.0.0",
"@fortawesome/vue-fontawesome": "^3.0.3",
"@types/markdown-it": "^13.0.7",
"@types/minimatch": "^5.1.2",
"@types/seedrandom": "^3.0.5",
"core-js": "^3.6.5",
"highlight.js": "^10.5.0",
"jszip": "^3.5.0",
"markdown-it": "^14.0.0",
"minimatch": "^5.0.1",
"muicss": "^0.10.3",
"normalize.css": "^8.0.1",
"pug-lint-vue": "^0.4.0",
"raw-loader": "^4.0.2",
"seedrandom": "^3.0.5",
"vue": "^3.2.47",
"vue-loading-overlay": "^5.0.3",
Expand Down
32 changes: 32 additions & 0 deletions frontend/src/components/c-title.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template lang="pug">
div(v-html="markdownText")
</template>
sopa301 marked this conversation as resolved.
Show resolved Hide resolved

<script lang="ts">
import MarkdownIt from 'markdown-it';
import { defineComponent } from 'vue';
import titleText from '../markdown/title.md';

const emptyHtml = '<div />';

export default defineComponent({
data() {
return {
markdownText: this.getMarkDownText(),
};
},
methods: {
getMarkDownText() {
let output = emptyHtml;
try {
output = new MarkdownIt()
.render(titleText);
} catch (e) {
// We don't want to crash the app if the markdown is invalid,
// so we just return an empty div
}
return output;
},
},
});
</script>
Empty file added frontend/src/markdown/title.md
Empty file.
5 changes: 5 additions & 0 deletions frontend/src/shims-vue.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ declare module '*.vue' {
const component: DefineComponent<{}, {}, any>
export default component
}

declare module '*.md' {
vvidday marked this conversation as resolved.
Show resolved Hide resolved
const str: string
export default str
}
1 change: 0 additions & 1 deletion frontend/src/styles/panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
display: flex;
height: 100vh;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: z-index('app-wrapper');
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/views/c-home.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template lang="pug">
#home
c-title
template(v-if="userUpdated")
c-resizer
template(v-slot:left)
Expand Down Expand Up @@ -69,6 +70,7 @@
<script lang='ts'>
import { defineComponent } from 'vue';

import cTitle from '../components/c-title.vue';
import cResizer from '../components/c-resizer.vue';
import cZoom from './c-zoom.vue';
import cSummary from './c-summary.vue';
Expand All @@ -77,6 +79,7 @@ import cAuthorship from './c-authorship.vue';
const home = defineComponent({
name: 'c-home',
components: {
cTitle,
cResizer,
cZoom,
cSummary,
Expand Down
9 changes: 9 additions & 0 deletions frontend/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ module.exports = {
files: ['src/**/*.{vue,scss}'],
}),
],
module: {
rules: [
// Markdown Loader
{
test: /\.md$/,
loader: "raw-loader",
},
],
}
},
chainWebpack: (config) => {
// Pug Loader
Expand Down
Loading