-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9b29232
Showing
23 changed files
with
10,105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const path = require(`path`); | ||
|
||
module.exports = { | ||
configureWebpack: { | ||
resolve: { | ||
symlinks: false, | ||
alias: { | ||
vue: path.resolve(`./node_modules/vue`) | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: robonomics-ui-vue3-components-guide | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: "lts/*" | ||
|
||
- run: npm install --frozen-lockfile | ||
|
||
- run: npm run build | ||
|
||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
cname: test.robonomics.network |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# robonomics-ui-guide | ||
|
||
## Project setup | ||
``` | ||
yarn install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
yarn serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
yarn build | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
yarn lint | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
presets: [ | ||
'@vue/cli-plugin-babel/preset' | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "robonomics-ui-guide", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"serve": "export NODE_OPTIONS=--openssl-legacy-provider && npx kill-port 8080 && vue-cli-service serve --port 8080", | ||
"build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build", | ||
"lint": "vue-cli-service lint" | ||
}, | ||
"dependencies": { | ||
"core-js": "^3.6.5", | ||
"equal-vue": "^0.79.3", | ||
"robonomics-ui": "^1.0.0", | ||
"simple-syntax-highlighter": "^2.2.0", | ||
"vue": "^3.0.0", | ||
"vue-router": "^4.0.0-0", | ||
"vue-template-compiler": "^2.6.14", | ||
"vue3-highlightjs": "^1.0.5" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "~4.5.0", | ||
"@vue/cli-plugin-eslint": "~4.5.0", | ||
"@vue/cli-plugin-router": "~4.5.0", | ||
"@vue/cli-service": "~4.5.0", | ||
"@vue/compiler-sfc": "^3.0.0", | ||
"babel-eslint": "^10.1.0", | ||
"eslint": "^6.7.2", | ||
"eslint-plugin-vue": "^7.0.0" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"env": { | ||
"node": true | ||
}, | ||
"extends": [ | ||
"plugin:vue/vue3-essential", | ||
"eslint:recommended" | ||
], | ||
"parserOptions": { | ||
"parser": "babel-eslint" | ||
}, | ||
"rules": {} | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not dead" | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang=""> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<h4><router-link to="/">Robonomics dApp Vue.js 3.0 UI Library</router-link></h4> | ||
<router-view/> | ||
</template> | ||
|
||
<style> | ||
#app { | ||
max-width: 1200px; | ||
margin: 6rem auto; | ||
} | ||
h1 { | ||
text-align: center; | ||
margin-bottom: 3rem; | ||
} | ||
p, h2, h3, h4, h5, li { | ||
margin-bottom: 1rem; | ||
} | ||
section { | ||
margin: 3rem auto; | ||
} | ||
section section { | ||
margin-top: 1.5rem; | ||
margin-bottom: 1.5rem; | ||
} | ||
.grid-8 { | ||
display: grid; | ||
grid-template-columns: repeat(8, 1fr); | ||
gap: var(--space) | ||
} | ||
</style> | ||
|
||
<style scoped> | ||
h4 { | ||
text-align: center; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
<section class="border"> | ||
<h2 v-if="title">{{title}}</h2> | ||
|
||
<section><slot></slot></section> | ||
|
||
<template v-if="code"> | ||
<details> | ||
<summary>Исходный код</summary> | ||
<pre v-highlightjs><code class="javascript">{{code}}</code></pre> | ||
</details> | ||
</template> | ||
</section> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from 'vue' | ||
export default defineComponent({ | ||
name: 'GuideSection', | ||
props: { | ||
title: { | ||
type: String, | ||
default: null | ||
}, | ||
code: { | ||
type: String, | ||
default: null | ||
} | ||
}, | ||
// setup(props) { | ||
// const highlighter = () => { | ||
// if(props.code) { | ||
// return highlight(props.code, languages.html); | ||
// } | ||
// } | ||
// return { highlighter } | ||
// } | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.border { | ||
border: 1px solid var(--color-gray-light); | ||
padding: var(--space) | ||
} | ||
details summary { | ||
cursor: pointer; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<table class="props"> | ||
<thead> | ||
<th>Property</th> | ||
<th>Type</th> | ||
<th>Required</th> | ||
<th>Default</th> | ||
<th>Accepted values</th> | ||
<th>Description</th> | ||
</thead> | ||
<tbody> | ||
<slot /> | ||
</tbody> | ||
</table> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from 'vue' | ||
export default defineComponent({ | ||
name: 'Props' | ||
}) | ||
</script> | ||
|
||
<style> | ||
.props { | ||
font-size: 80%; | ||
width: 100%; | ||
} | ||
.props tr:not(:last-child) { | ||
border-bottom: 1px solid var(--color-gray); | ||
} | ||
.props tr:hover { | ||
background-color: rgb(245, 244, 244) | ||
} | ||
.props th { | ||
text-align: left; | ||
background-color: #e2e2e2; | ||
} | ||
.props th, .props td { | ||
padding: var(--space) | ||
} | ||
.props th:first-child, .props td:first-child { | ||
padding-left: 0; | ||
} | ||
.props .hljs { | ||
padding: 0; | ||
background: transparent; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template> | ||
<guide-section | ||
:title = "'Локальное подключение'" | ||
> | ||
|
||
<pre v-highlightjs> | ||
<code class="javascript"> | ||
import { {{componentName}} } from 'robonomics-ui' | ||
|
||
export default { | ||
components: { {{componentName}} } | ||
} | ||
</code> | ||
</pre> | ||
|
||
</guide-section> | ||
</template> | ||
|
||
<script> | ||
import { defineComponent } from 'vue' | ||
import GuideSection from '@/components/GuideSection.vue' | ||
export default defineComponent({ | ||
name: 'UseComponent', | ||
components: { | ||
GuideSection | ||
}, | ||
props: { | ||
componentName: { | ||
type: String, | ||
default: null | ||
} | ||
} | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
import router from './router' | ||
|
||
import VueHighlightJS from 'vue3-highlightjs' | ||
import 'highlight.js/styles/stackoverflow-light.css' | ||
|
||
import { RoboUi } from 'robonomics-ui' | ||
import 'robonomics-ui/lib.css' | ||
|
||
createApp(App) | ||
.use(router) | ||
.use(VueHighlightJS) | ||
.use(RoboUi) | ||
.mount('#app') |
Oops, something went wrong.