Skip to content
Snippets Groups Projects
Commit 579badcf authored by Konstantin Baierer's avatar Konstantin Baierer
Browse files

proper vue app from proof of concept

parent e7484870
Branches
No related tags found
No related merge requests found
Showing
with 8616 additions and 128 deletions
......@@ -2,133 +2,23 @@
<html>
<head>
<title>ocrd kwalitee</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> -->
<!-- Load required Bootstrap and BootstrapVue CSS -->
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css" />
<!-- <link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" /> -->
<!-- <link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.css" /> -->
<!-- Load polyfills to support older browsers -->
<script src="//polyfill.io/v3/polyfill.min.js?features=es2015%2CIntersectionObserver" crossorigin="anonymous"></script>
<!-- <script src="//polyfill.io/v3/polyfill.min.js?features=es2015%2CIntersectionObserver" crossorigin="anonymous"></script> -->
<!-- Load Vue followed by BootstrapVue -->
<script src="//unpkg.com/vue@latest/dist/vue.min.js"></script>
<script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.js"></script>
<!-- <script src="//unpkg.com/vue@latest/dist/vue.min.js"></script> -->
<!-- <script src="//unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.min.js"></script> -->
</head>
<body>
<div id="app">
<b-container fluid>
<b-tabs>
<b-tab title="Processors">
<b-row>
Filter by category:
<b-badge
v-for="category in categories"
:variant="category_filter.indexOf(category) != -1 ? 'primary' : 'secondary'"
@click="category_filter.indexOf(category) != -1 ? category_filter.splice(category_filter.indexOf(category), 1) : category_filter.push(category)"
>
{{ category }}
</b-badge>
</b-row>
<b-row>
Filter by step:
<b-badge
v-for="step in steps"
:variant="step_filter.indexOf(step) != -1 ? 'primary' : 'secondary'"
@click="step_filter.indexOf(step) != -1 ? step_filter.splice(step_filter.indexOf(step), 1) : step_filter.push(step)"
>
{{ step }}
</b-badge>
</b-row>
<b-row>
<b-card
v-for="processor in processors"
:title="processor.executable.replace('ocrd-', '')"
tag="article"
style="max-width: 20rem;"
class="mb-2"
>
<b-card-text>
<b-tabs>
<b-tabs>
<b-tab title="Description">
<blockquote>
{{ processor.description }}
<b-badge variant="info" v-for="step in processor.steps">{{ step }}</b-badge>
<b-badge variant="success" v-for="category in processor.categories">{{ category }}</b-badge>
</blockquote>
<p>
Part of <a href="">{{ processor.part_of }}</a>
</p>
<p>
<a href="">Read the Documentation!</a>
</p>
</b-tab>
<b-tab title="Parameters">
<ul>
<li v-for="param, name in processor.parameters">
<strong>{{ name }}</strong> {{ param }}
</li>
</ul>
</b-tab>
</b-tabs>
</b-card-text>
</b-card>
</b-row>
</b-tab>
<b-tab title="Projects">
<b-row>
<button @click="fetchRepoData">Fetch!</button>
</b-row>
<b-row>
<b-card
v-for="repo in repos"
:title="repo.org_plus_name"
tag="article"
style="max-width: 20rem;"
class="mb-2"
>
<b-tabs card>
<b-tab title="Git">
<b-card-text>
<p>
<a href="`https://pypi.org/project/${ repo.python.name }/`"> <img :src="`https://img.shields.io/pypi/v/${ repo.python.name }.svg`" /> </a>
<!-- <a href="`https://travis-ci.org/${ repo.org_plus_name }`"> <img :src="`https://travis-ci.org/${ repo.org_plus_name }.svg?branch=master`" /> </a> -->
<!-- <a href="`https://circleci.com/gh/${ repo.org_plus_name }`"> <img :src="`https://circleci.com/gh/${ repo.org_plus_name }.svg?style=svg`" /> </a> -->
<!-- <a href="`https://hub.docker.com/r/ocrd/core/tags/`"> <img :src="`https://img.shields.io/docker/automated/ocrd/core.svg`" /> </a> -->
<!-- <a href="`https://codecov.io/gh/${ repo.org_plus_name }`"> <img :src="`https://codecov.io/gh/${ repo.org_plus_name }/branch/master/graph/badge.svg`" /> </a> -->
<!-- <a href="`https://scrutinizer-ci.com/g/${ repo.org_plus_name }`"> <img :src="`https://scrutinizer-ci.com/g/${ repo.org_plus_name }/badges/quality-score.png?b=master`" /> </a> -->
<!-- <a href="`https://lgtm.com/projects/g/${ repo.org_plus_name }/alerts/`"> <img :src="`https://img.shields.io/lgtm/alerts/g/${ repo.org_plus_name }.svg?logo=lgtm&amp;logoWidth=18`" /> </a> -->
</p>
<b-table v-if="repo.git" :items="[repo.git]"></b-table>
</b-card-text>
</b-tab>
<b-tab title="Tools">
<b-card-text>
<b-table v-if="repo.ocrd_tool" :items="[repo.ocrd_tool]"></b-table>
</b-card-text>
</b-tab>
<b-tab title="Python">
<b-card-text>
<b-table v-if="repo.python" :items="[repo.python]"></b-table>
</b-card-text>
</b-tab>
</b-tabs>
</b-card>
</b-row>
</b-tab>
</b-tabs>
</b-container>
<div id="ocrd-kwalitee">
</div>
<script src="script.js"></script>
<script src="webapp/dist/build.js"></script>
</body>
</html>
{
"presets": [
["env", { "modules": false }],
"stage-3"
]
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
.DS_Store
node_modules/
dist/
npm-debug.log
yarn-error.log
# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
# ocrd-kwalitee-webapp
> OCR-D software overview
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
```
For detailed explanation on how things work, consult the [docs for vue-loader](http://vuejs.github.io/vue-loader).
/**
* Copyright 2016 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
module.exports = {
rules: {
// The rules below are listed in the order they appear on the eslint
// rules page. All rules are listed to make it easier to keep in sync
// as new ESLint rules are added.
// http://eslint.org/docs/rules/
// - Rules in the `eslint:recommended` ruleset that aren't specifically
// mentioned by the google styleguide are listed but commented out (so
// they don't override a base ruleset).
// - Rules that are recommended but contradict the Google styleguide
// are explicitely set to the Google styleguide value.
// Possible Errors
// http://eslint.org/docs/rules/#possible-errors
// ---------------------------------------------
// 'for-direction': 0,
// 'no-await-in-loop': 0,
// 'no-compare-neg-zero': 2, // eslint:recommended
'no-cond-assign': 0, // eslint:recommended
// 'no-console': 2, // eslint:recommended
// 'no-constant-condition': 2, // eslint:recommended
// 'no-control-regex': 2, // eslint:recommended
// 'no-debugger': 2, // eslint:recommended
// 'no-dupe-args': 2, // eslint:recommended
// 'no-dupe-keys': 2, // eslint:recommended
// 'no-duplicate-case': 2, // eslint:recommended
// 'no-empty': 2, // eslint:recommended
// 'no-empty-character-class': 2, // eslint:recommended
// 'no-ex-assign': 2, // eslint:recommended
// 'no-extra-boolean-cast': 2, // eslint:recommended
// 'no-extra-parens': 0,
// 'no-extra-semi': 2, // eslint:recommended
// 'no-func-assign': 2, // eslint:recommended
// 'no-inner-declarations': 2, // eslint:recommended
// 'no-invalid-regexp': 2, // eslint:recommended
'no-irregular-whitespace': 2, // eslint:recommended
// 'no-obj-calls': 2, // eslint:recommended
// 'no-prototype-builtins': 0,
// 'no-regex-spaces': 2, // eslint:recommended
// 'no-sparse-arrays': 2, // eslint:recommended
// 'no-template-curly-in-string': 0,
'no-unexpected-multiline': 2, // eslint:recommended
// 'no-unreachable': 2, // eslint:recommended
// 'no-unsafe-finally': 2, // eslint:recommended
// 'no-unsafe-negation': 0,
// 'use-isnan': 2 // eslint:recommended
'valid-jsdoc': [2, {
requireParamDescription: false,
requireReturnDescription: false,
requireReturn: false,
prefer: {returns: 'return'},
}],
// 'valid-typeof': 2 // eslint:recommended
// Best Practices
// http://eslint.org/docs/rules/#best-practices
// --------------------------------------------
// 'accessor-pairs': 0,
// 'array-callback-return': 0,
// 'block-scoped-var': 0,
// 'class-methods-use-this': 0,
// 'complexity': 0,
// 'consistent-return': 0
'curly': [2, 'multi-line'], // TODO(philipwalton): add an option to enforce
// braces with the exception of simple,
// single-line if statements.
// 'default-case': 0,
// 'dot-location': 0,
// 'dot-notation': 0,
// 'eqeqeq': 0,
'guard-for-in': 2,
// 'no-alert': 0,
'no-caller': 2,
// 'no-case-declarations': 2, // eslint:recommended
// 'no-div-regex': 0,
// 'no-else-return': 0,
// 'no-empty-function': 0,
// 'no-empty-pattern': 2, // eslint:recommended
// 'no-eq-null': 0,
// 'no-eval': 0,
'no-extend-native': 2,
'no-extra-bind': 2,
// 'no-extra-label': 0,
// 'no-fallthrough': 2, // eslint:recommended
// 'no-floating-decimal': 0,
// 'no-global-assign': 0,
// 'no-implicit-coercion': 0,
// 'no-implicit-globals': 0,
// 'no-implied-eval': 0,
'no-invalid-this': 2,
// 'no-iterator': 0,
// 'no-labels': 0,
// 'no-lone-blocks': 0,
// 'no-loop-func': 0,
// 'no-magic-numbers': 0,
'no-multi-spaces': 2,
'no-multi-str': 2,
// 'no-new': 0,
// 'no-new-func': 0,
'no-new-wrappers': 2,
// 'no-octal': 2, // eslint:recommended
// 'no-octal-escape': 0,
// 'no-param-reassign': 0,
// 'no-proto': 0,
// 'no-redeclare': 2, // eslint:recommended
// 'no-restricted-properties': 0,
// 'no-return-assign': 0,
// 'no-script-url': 0,
// 'no-self-assign': 2, // eslint:recommended
// 'no-self-compare': 0,
// 'no-sequences': 0,
'no-throw-literal': 2, // eslint:recommended
// 'no-unmodified-loop-condition': 0,
// 'no-unused-expressions': 0,
// 'no-unused-labels': 2, // eslint:recommended
// 'no-useless-call': 0,
// 'no-useless-concat': 0,
// 'no-useless-escape': 0,
// 'no-void': 0,
// 'no-warning-comments': 0,
'no-with': 2,
// 'prefer-promise-reject-errors': 0,
// 'radix': 0,
// 'require-await': 0,
// 'vars-on-top': 0,
// 'wrap-iife': 0,
// 'yoda': 0,
// Strict Mode
// http://eslint.org/docs/rules/#strict-mode
// -----------------------------------------
// 'strict': 0,
// Variables
// http://eslint.org/docs/rules/#variables
// ---------------------------------------
// 'init-declarations': 0,
// 'no-catch-shadow': 0,
// 'no-delete-var': 2, // eslint:recommended
// 'no-label-var': 0,
// 'no-restricted-globals': 0,
// 'no-shadow': 0,
// 'no-shadow-restricted-names': 0,
// 'no-undef': 2, // eslint:recommended
// 'no-undef-init': 0,
// 'no-undefined': 0,
'no-unused-vars': [2, {args: 'none'}], // eslint:recommended
// 'no-use-before-define': 0,
// Node.js and CommonJS
// http://eslint.org/docs/rules/#nodejs-and-commonjs
// -------------------------------------------------
// 'callback-return': 0,
// 'global-require': 0,
// 'handle-callback-err': 0,
// 'no-buffer-constructor': 0,
// 'no-mixed-requires': 0,
// 'no-new-require': 0,
// 'no-path-concat': 0,
// 'no-process-env': 0,
// 'no-process-exit': 0,
// 'no-restricted-modules': 0,
// 'no-sync': 0,
// Stylistic Issues
// http://eslint.org/docs/rules/#stylistic-issues
// ----------------------------------------------
'array-bracket-newline': 0, // eslint:recommended
'array-bracket-spacing': [2, 'never'],
'array-element-newline': 0, // eslint:recommended
'block-spacing': [2, 'never'],
'brace-style': 2,
'camelcase': [2, {properties: 'never'}],
// 'capitalized-comments': 0,
'comma-dangle': [2, 'always-multiline'],
'comma-spacing': 2,
'comma-style': 2,
'computed-property-spacing': 2,
// 'consistent-this': 0,
'eol-last': 2,
'func-call-spacing': 2,
// 'func-name-matching': 0,
// 'func-names': 0,
// 'func-style': 0,
// 'id-blacklist': 0,
// 'id-length': 0,
// 'id-match': 0,
// 'indent': 0, // TODO(philipwalton): this rule isn't compatible with
// Google's 4-space indent for line continuations.
// 'jsx-quotes': 0,
'key-spacing': 2,
'keyword-spacing': 2,
// 'line-comment-position': 0,
'linebreak-style': 2,
// 'lines-around-comment': 0,
// 'max-depth': 0,
'max-len': [2, {
code: 80,
tabWidth: 2,
ignoreUrls: true,
ignorePattern: '^goog\.(module|require)',
}],
// 'max-lines': 0,
// 'max-nested-callbacks': 0,
// 'max-params': 0,
// 'max-statements': 0,
// 'max-statements-per-line': 0,
// 'multiline-ternary': 0, // TODO(philipwalton): add a rule to enforce the
// operator appearing at the end of the line.
'new-cap': 2,
// 'new-parens': 0,
// 'newline-per-chained-call': 0,
'no-array-constructor': 2,
// 'no-bitwise': 0,
// 'no-continue': 0,
// 'no-inline-comments': 0,
// 'no-lonely-if': 0,
// 'no-mixed-operators': 0,
'no-mixed-spaces-and-tabs': 2, // eslint:recommended
// 'no-multi-assign': 0,
'no-multiple-empty-lines': [2, {max: 2}],
// 'no-negated-condition': 0,
// 'no-nested-ternary': 0,
'no-new-object': 2,
// 'no-plusplus': 0,
// 'no-restricted-syntax': 0,
'no-tabs': 2,
// 'no-ternary': 0,
'no-trailing-spaces': 2,
// 'no-underscore-dangle': 0,
// 'no-unneeded-ternary': 0,
// 'no-whitespace-before-property': 0,
// 'nonblock-statement-body-position': 0,
// 'object-curly-newline': 0,
'object-curly-spacing': 2,
// 'object-property-newline': 0,
'one-var': [2, {
var: 'never',
let: 'never',
const: 'never',
}],
// 'one-var-declaration-per-line': 0,
// 'operator-assignment': 0,
// 'operator-linebreak': 0,
'padded-blocks': [2, 'never'],
// 'padding-line-between-statements': 0,
'quote-props': [2, 'consistent'],
'quotes': [2, 'single', {allowTemplateLiterals: true}],
'require-jsdoc': [2, {
require: {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: true,
},
}],
'semi': 2,
'semi-spacing': 2,
// 'semi-style': 0,
// 'sort-keys': 0,
// 'sort-vars': 0,
'space-before-blocks': 2,
'space-before-function-paren': [2, {
asyncArrow: 'always',
anonymous: 'never',
named: 'never',
}],
// 'space-in-parens': 0,
// 'space-infix-ops': 0,
// 'space-unary-ops': 0,
'spaced-comment': [2, 'always'],
// 'switch-colon-spacing': 2,
// 'template-tag-spacing': 0,
// 'unicode-bom': 0,
// 'wrap-regex': 0,
// ECMAScript 6
// http://eslint.org/docs/rules/#ecmascript-6
// ------------------------------------------
// 'arrow-body-style': 0,
'arrow-parens': [2, 'always'], // TODO(philipwalton): technically arrow
// parens are optional but recommended.
// ESLint doesn't support a *consistent*
// setting so "always" is used.
// 'arrow-spacing': 0,
'constructor-super': 2, // eslint:recommended
'generator-star-spacing': [2, 'after'],
// 'no-class-assign': 0,
// 'no-confusing-arrow': 0,
// 'no-const-assign': 0, // eslint:recommended
// 'no-dupe-class-members': 0, // eslint:recommended
// 'no-duplicate-imports': 0,
'no-new-symbol': 2, // eslint:recommended
// 'no-restricted-imports': 0,
'no-this-before-super': 2, // eslint:recommended
// 'no-useless-computed-key': 0,
// 'no-useless-constructor': 0,
// 'no-useless-rename': 0,
'no-var': 2,
// 'object-shorthand': 0,
// 'prefer-arrow-callback': 0,
// 'prefer-const': 0,
// 'prefer-destructuring': 0,
// 'prefer-numeric-literals': 0,
'prefer-rest-params': 2,
'prefer-spread': 2,
// 'prefer-template': 0,
// 'require-yield': 2, // eslint:recommended
'rest-spread-spacing': 2,
// 'sort-imports': 0,
// 'symbol-description': 0,
// 'template-curly-spacing': 0,
'yield-star-spacing': [2, 'after'],
},
};
module.exports = {
parserOptions: {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
},
extends: './eslintrc.google.js',
env: {
es6: true,
},
rules: {
'guard-for-in': 0,
'arrow-parens': 0,
'block-spacing': 0,
'guard-for-in': 0,
'brace-style': 0,
'camelcase': 0,
'comma-dangle': 0,
'comma-style': [2, 'last'],
'curly': 0,
'indent': [0, 4],
'key-spacing': 0,
'linebreak-style': 0,
'linebreak-style': 2,
'max-len': 0,
'new-cap': 0,
'no-invalid-this': 0,
'no-multi-spaces': 0,
'no-undef': 2,
'no-unused-vars': 1,
'object-curly-spacing': 0,
'padded-blocks': [0, 'never'],
'quote-props': 0,
'quotes': 0,
'require-jsdoc': 0,
'semi': [1, 'never'],
'space-before-function-paren': [0, {"anonymous": "never"}],
'valid-jsdoc': 0,
},
globals: {
// $: true,
_: true,
rdfstore: true,
FormData: true,
Backbone: true,
document: true,
require: true,
define: true,
console: true,
window: true,
process: true,
module: true,
Image: true,
exports: true,
parent: true,
setTimeout: true,
setInterval: true,
clearTimeout: true,
clearInterval: true,
__dirname: true,
GM_registerMenuCommand: true,
__filename: true,
Buffer: true,
fetch: true,
},
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ocrd-kwalitee-webapp</title>
</head>
<body>
<div id="app"></div>
<script src="/dist/build.js"></script>
</body>
</html>
Source diff could not be displayed: it is too large. Options to address this: view the blob.
{
"name": "ocrd-kwalitee-webapp",
"description": "OCR-D software overview",
"version": "1.0.0",
"author": "Konstantin Baierer <unixprog@gmail.com>",
"license": "MIT",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot --host 10.46.3.57",
"build-dev": "cross-env NODE_ENV=development webpack --progress",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
},
"dependencies": {
"bootstrap-vue": "^2.0.4",
"marked": "^0.7.0",
"vue": "^2.5.11"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-3": "^6.24.1",
"cross-env": "^5.0.5",
"css-loader": "^0.28.7",
"file-loader": "^1.1.4",
"vue-loader": "^13.0.5",
"vue-template-compiler": "^2.4.4",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.1"
}
}
/* global Vue */
window.app = new Vue({
})
/* global Vue */
window.app = new Vue({
el: '#app',
data: {
repos_raw: [],
category_filter: [],
step_filter: [],
<template>
<b-container fluid>
<b-row>
<button @click="fetchRepoData">Fetch!</button>
</b-row>
<b-tabs>
<b-tab title="Processors">
<ocrd-processor-list
:processors="processors"
:steps="steps"
:step_filter="step_filter"
:categories="categories"
:category_filter="category_filter"
></ocrd-processor-list>
</b-tab>
<b-tab title="Projects">
<ocrd-project-list
:repos="repos"
></ocrd-project-list>
</b-tab>
</b-tabs>
</b-container>
</template>
<script>
import OcrdProcessorList from './OcrdProcessorList.vue'
import OcrdProjectList from './OcrdProjectList.vue'
export default {
components: {
OcrdProcessorList,
OcrdProjectList
},
data() {
return {
repos_raw: [],
category_filter: [],
step_filter: [],
}
},
computed: {
repos() {
......@@ -47,11 +78,15 @@ window.app = new Vue({
}
},
mounted() {
this.fetchRepoData()
this.fetchRepoData()
},
methods: {
fetchRepoData() {
fetch('repos.json').then(resp => resp.json()).then(repos => this.repos.push(...repos))
fetch('../repos.json').then(resp => resp.json()).then(repos => {
this.repos_raw.splice(0, this.repos_raw.length)
this.repos_raw.push(...repos)
}
)
},
toggleStepFilter(v) {
if (v in this.step_filter) {
......@@ -61,5 +96,8 @@ window.app = new Vue({
}
}
}
})
}
</script>
<style>
</style>
<template>
<div>
<b-row>
Filter by category:
<b-badge
v-for="category in categories"
:variant="category_filter.indexOf(category) != -1 ? 'primary' : 'secondary'"
@click="category_filter.indexOf(category) != -1 ? category_filter.splice(category_filter.indexOf(category), 1) : category_filter.push(category)"
>
{{ category }}
</b-badge>
</b-row>
<b-row>
Filter by step:
<b-badge
v-for="step in steps"
:variant="step_filter.indexOf(step) != -1 ? 'primary' : 'secondary'"
@click="step_filter.indexOf(step) != -1 ? step_filter.splice(step_filter.indexOf(step), 1) : step_filter.push(step)"
>
{{ step }}
</b-badge>
</b-row>
<b-row>
<ocrd-processor-list-item
v-for="processor in processors"
:processor="processor"
></ocrd-processor-list-item>
</b-row>
</div>
</template>
<script>
import OcrdProcessorListItem from './OcrdProcessorListItem.vue'
export default {
components: {
OcrdProcessorListItem
},
props: {
processors: {required: true},
steps: {required: true},
step_filter: {require: true},
categories: {required: true},
category_filter: {require: true},
},
}
</script>
<template>
<b-card
tag="article"
:title="processor.executable.replace('ocrd-', '')"
class="mb-5"
>
<b-card-text>
<b-tabs>
<b-tab title="Description">
<blockquote>
{{ processor.description }}
</blockquote>
<b-badge variant="info" v-for="step in processor.steps">{{ step }}</b-badge>
<b-badge variant="success" v-for="category in processor.categories">{{ category }}</b-badge>
<p>
Part of <a href="">{{ processor.part_of }}</a>
</p>
<p>
<a href="">Read the Documentation!</a>
</p>
</b-tab>
<b-tab title="Parameters">
<ul>
<li v-for="param, name in processor.parameters">
<strong>{{ name }}</strong> {{ param }}
</li>
</ul>
</b-tab>
</b-tabs>
</b-card-text>
</b-card>
</template>
<script>
export default {
props: {
processor: {required: true}
}
}
</script>
<template>
<div>
<b-row>
<ocrd-project-list-item
v-for="repo in repos"
:key="repo.org_plus_name"
:repo="repo"
>
</ocrd-project-list-item>
</b-row>
</div>
</template>
<script>
import OcrdProjectListItem from './OcrdProjectListItem.vue'
export default {
components: {
OcrdProjectListItem
},
props: {
repos: {required: true}
}
}
</script>
<style>
</style>
<template>
<b-card
:title="repo.org_plus_name"
tag="article"
class="mb-5 ocrd-project-list-item"
>
<b-tabs>
<b-tab title="README">
<div v-html="compiledReadme"></div>
</b-tab>
<b-tab title="Git">
<b-card-text>
<p>
<a href="`https://pypi.org/project/${ repo.python.name }/`"> <img :src="`https://img.shields.io/pypi/v/${ repo.python.name }.svg`" /> </a>
<!-- <a href="`https://travis-ci.org/${ repo.org_plus_name }`"> <img :src="`https://travis-ci.org/${ repo.org_plus_name }.svg?branch=master`" /> </a> -->
<!-- <a href="`https://circleci.com/gh/${ repo.org_plus_name }`"> <img :src="`https://circleci.com/gh/${ repo.org_plus_name }.svg?style=svg`" /> </a> -->
<!-- <a href="`https://hub.docker.com/r/ocrd/core/tags/`"> <img :src="`https://img.shields.io/docker/automated/ocrd/core.svg`" /> </a> -->
<!-- <a href="`https://codecov.io/gh/${ repo.org_plus_name }`"> <img :src="`https://codecov.io/gh/${ repo.org_plus_name }/branch/master/graph/badge.svg`" /> </a> -->
<!-- <a href="`https://scrutinizer-ci.com/g/${ repo.org_plus_name }`"> <img :src="`https://scrutinizer-ci.com/g/${ repo.org_plus_name }/badges/quality-score.png?b=master`" /> </a> -->
<!-- <a href="`https://lgtm.com/projects/g/${ repo.org_plus_name }/alerts/`"> <img :src="`https://img.shields.io/lgtm/alerts/g/${ repo.org_plus_name }.svg?logo=lgtm&amp;logoWidth=18`" /> </a> -->
</p>
<b-table v-if="repo.git" :items="[repo.git]"></b-table>
</b-card-text>
</b-tab>
<b-tab title="Tools">
<b-card-text>
<b-table v-if="repo.ocrd_tool" :items="[repo.ocrd_tool]"></b-table>
</b-card-text>
</b-tab>
<b-tab title="Python">
<b-card-text>
<b-table v-if="repo.python" :items="[repo.python]"></b-table>
</b-card-text>
</b-tab>
</b-tabs>
</b-card>
</template>
<script>
import marked from 'marked'
export default {
props: {
repo: {required: true},
},
computed: {
cleanId() {
return this.repo.org_plus_name.replace(/[^A-Za-z0-9]/g, '-')
},
compiledReadme() {
let src = this.repo.files['README.md']
if (!src) src = '# NO README'
return marked(src)
}
}
}
</script>
<style>
.ocrd-project-list-item {
max-width: 50%;
}
</style>
webapp/src/assets/logo.png

6.69 KiB

import Vue from 'vue'
import App from './App.vue'
import BootstrapVue from 'bootstrap-vue'
Vue.use(BootstrapVue)
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
new Vue({
el: '#ocrd-kwalitee',
render: h => h(App)
})
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/dist/',
filename: 'build.js'
},
module: {
rules: [
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
],
}, {
test: /\.vue$/,
loader: 'vue-loader',
options: {
loaders: {
}
// other vue-loader options go here
}
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/
},
{
test: /\.(png|jpg|gif|svg)$/,
loader: 'file-loader',
options: {
name: '[name].[ext]?[hash]'
}
}
]
},
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
},
extensions: ['*', '.js', '.vue', '.json']
},
devServer: {
historyApiFallback: true,
noInfo: true,
overlay: true
},
performance: {
hints: false
},
devtool: '#eval-source-map'
}
if (process.env.NODE_ENV === 'production') {
module.exports.devtool = '#source-map'
// http://vue-loader.vuejs.org/en/workflow/production.html
module.exports.plugins = (module.exports.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
}
}),
new webpack.LoaderOptionsPlugin({
minimize: true
})
])
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment