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

PR11 Knowlage-dapp #11

Merged
merged 4 commits into from
Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added project/.DS_Store
Binary file not shown.
29 changes: 29 additions & 0 deletions project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# PR 编号 11
# Knowlage-dapp (Learn To Earn)

## 队伍信息
### 队伍/作品名称
Knowlage

### ERC20 地址
0x3264Cf09543C9E713DDE3Fb2A87A9FE9513A0d59

### 产品简介
参与者可以发起提案众筹一个精品课件,结束后可获得Token激励和徽章NFT以用于市场投放简历或寻找兼职

#### 产品流程图简介
![image](./source/img/system.png)

### 作品代码仓库
https://github.com/uninstalls/knowlage-dapp

### 成员

Vitalik
- 产品/合约/前端/后台
- https://twitter.com/Xmas118
- 0x3264Cf09543C9E713DDE3Fb2A87A9FE9513A0d59

李树
- 合约
- 0xFc42989B0BCa31a778bFa46ea3A30169cA363c0B
5 changes: 5 additions & 0 deletions project/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}
19 changes: 19 additions & 0 deletions project/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"module": "esnext",
"baseUrl": "./",
"moduleResolution": "node",
"paths": {
"@/*": [
"src/*"
]
},
"lib": [
"esnext",
"dom",
"dom.iterable",
"scripthost"
]
}
}
52 changes: 52 additions & 0 deletions project/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "knowlage-dapp",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@openzeppelin/contracts": "^4.8.0",
"@openzeppelin/contracts-upgradeable": "^4.8.0",
"axios": "^0.27.2",
"bootstrap": "^5.2.2",
"bootstrap-vue": "^2.23.1",
"core-js": "^3.8.3",
"sweetalert2": "^11.6.5",
"vue": "^2.6.14",
"vue-i18n": "^8.28.2",
"vue-router": "^3.6.5",
"web3": "^1.8.0"
},
"devDependencies": {
"@babel/core": "^7.12.16",
"@babel/eslint-parser": "^7.12.16",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"vue-template-compiler": "^2.6.14"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "@babel/eslint-parser"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
Binary file added project/public/favicon.ico
Binary file not shown.
17 changes: 17 additions & 0 deletions project/public/index.html
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>
Binary file added project/source/.DS_Store
Binary file not shown.
Binary file added project/source/img/.DS_Store
Binary file not shown.
Binary file added project/source/img/system.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project/src/.DS_Store
Binary file not shown.
28 changes: 28 additions & 0 deletions project/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<template>
<div id="app">
<router-view name="navbar"></router-view>
<router-view class="mb-1"></router-view>
<router-view name="footer"></router-view>
</div>
</template>

<script>
export default {
name: 'App',
// async mounted() {
// console.log(3456)
// this.$root.networkId = await this.$root.web3.eth.getChainId()
// this.$root.accounts = ['0x237B4410dd37ED064FeBFa170B3243960F0437B3']
// }
}
</script>

<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* text-align: center; */
color: #2c3e50;
}
</style>
Binary file added project/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions project/src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>

<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>
5 changes: 5 additions & 0 deletions project/src/components/WebFooter.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div>
footer
</div>
</template>
20 changes: 20 additions & 0 deletions project/src/components/WebNavbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default {
name: 'WebNavbar',
data() {
return {
appMenus: [
{href: '/', text: 'HOME', disabled: false},
{href: '/course', text: 'COURSE', disabled: false},
{href: '/major', text: 'MAJOR', disabled: false},
{href: '/market', text: 'MARKET', disabled: false}
// {href: '/docs', text: 'HALL', disabled: false},
],
languages: [
{ 'text': 'English', 'value': 'en_US', disabled: false },
{ 'text': '简体中文', 'value': 'zh_CH', disabled: false },
{ 'text': 'Français', 'value': 'fr_FR', disabled: true },
{ 'text': '日本語', 'value': 'ja_JP', disabled: true }
],
}
}
}
93 changes: 93 additions & 0 deletions project/src/components/WebNavbar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<template>
<b-navbar toggleable="md" type="dark" variant="dark" sticky>
<b-container fluid="xl">
<!-- Navbar Brand -->
<b-navbar-brand href="/">
<b-avatar icon="book-fill" size="lg" variant="danger"></b-avatar>
</b-navbar-brand>

<!-- Phone Navbar For Top Start -->
<b-navbar-nav>
<b-nav-form class="d-md-none">
<!-- <b-button class="me-1" variant="danger" size="sm"
v-show="wallet.connected == false" @click="connectWallet()">
{{ $t('MENUS.PC.CONNECT') }}
</b-button> -->
<b-button class="me-1" variant="danger" size="sm">
{{ $t('MENUS.PC.CONNECT') }}
</b-button>
<b-button class="me-1" size="sm" href="/user">
<b-icon icon="person-fill"></b-icon>
</b-button>
<b-button class="me-1" size="sm" v-b-toggle.navbar-collapse>
<b-icon icon="list"></b-icon>
</b-button>
</b-nav-form>
</b-navbar-nav>
<!-- Phone Navbar For Top End -->

<!-- PC Navbar Start -->
<b-collapse id="navbar-collapse" is-nav class="text-center">
<b-navbar-nav class="ms-auto">
<!-- <b-nav-item href="/">{{ $t('MENUS.PC.HOME') }}</b-nav-item> -->
<b-nav-item :href="menu.href" v-for="menu in appMenus" :key="menu.text">
{{ $t('MENUS.PC.' + menu.text) }}
</b-nav-item>

<b-nav-form>
<b-button class="d-none d-md-block mt-1 ms-5" size="sm"
variant="danger">
<b-icon icon="credit-card-fill" aria-hidden="true"></b-icon>
{{ $t('MENUS.PC.CONNECT') }}
</b-button>
</b-nav-form>

<b-nav-item-dropdown>
<template slot="text">
<b-icon icon="globe" aria-hidden="true"></b-icon>
</template>
<b-dropdown-item v-for="lan in languages" :key="lan.value"
:disabled="lan.disabled" @click="changeLanguage(lan.value)">
{{ lan.text }}
</b-dropdown-item>
</b-nav-item-dropdown>

<!-- <b-nav-item-dropdown right v-for="menu in appMenus" :key="menu.text">
<template slot="text">{{ $t('MENUS.PC.' + menu.text) }}</template>
<b-dropdown-item v-for="chi in menu.chidren" :key="chi.text" :href="chi.href">
{{ $t('MENUS.PC.' + chi.text) }}
</b-dropdown-item>
</b-nav-item-dropdown>

<b-nav-form v-show="wallet.connected == false">
<b-button class="d-none d-md-block mt-1 ms-5" size="sm"
variant="danger" @click="connectWallet()">
<b-icon icon="credit-card-fill" aria-hidden="true"></b-icon>
{{ $t('MENUS.PC.CONNECT') }}
</b-button>
</b-nav-form>

<b-nav-item-dropdown>
<template slot="text">
<b-icon icon="globe" aria-hidden="true"></b-icon>
</template>
<b-dropdown-item v-for="lan in languages" :key="lan.value"
:disabled="lan.disabled" @click="changeLanguage(lan.value)">
{{ lan.text }}
</b-dropdown-item>
</b-nav-item-dropdown> -->
</b-navbar-nav>
</b-collapse>
<!-- PC Navbar End -->
</b-container>
</b-navbar>
</template>

<script src="./WebNavbar.js"></script>


<!-- <script>
export default {
name: 'WebNavbar'
}
</script> -->
Loading