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

able to use #2

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
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
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.DS_Store
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# Guide
# A2OS-Guide
This is a guide page that contains all productions developed by individual students or unoffical student organizations.

## Project setup
```
yarn install
```

### Compiles and hot-reloads for development
```
yarn run serve
```

### Compiles and minifies for production
```
yarn run build
```

### Run your tests
```
yarn run test
```

### Lints and fixes files
```
yarn run lint
```

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
54 changes: 54 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "a2os_guide",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.19.0",
"core-js": "^2.6.5",
"vue": "^2.6.10",
"vue-axios": "^2.1.4",
"vue-router": "^3.1.2",
"vuetify": "^2.0.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.11.0",
"@vue/cli-plugin-eslint": "^3.11.0",
"@vue/cli-service": "^3.11.0",
"babel-eslint": "^10.0.1",
"eslint": "^5.16.0",
"eslint-plugin-vue": "^5.0.0",
"sass": "^1.17.4",
"sass-loader": "^7.1.0",
"vue-cli-plugin-vuetify": "^0.6.3",
"vue-template-compiler": "^2.6.10",
"vuetify-loader": "^1.2.2"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"rules": {},
"parserOptions": {
"parser": "babel-eslint"
}
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
Binary file added public/favicon.ico
Binary file not shown.
18 changes: 18 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<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>a2os_guide</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head>
<body style="font-family: 'Microsoft Yahei'">
<noscript>
<strong>We're sorry but a2os_guide 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>
64 changes: 64 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<template>
<v-app>
<v-app-bar
app
hide-on-scroll
color="#00B0FF"
style="color: black"
>
<v-toolbar-title class="headline text-uppercase">
<span style="margin-right: 5px">A2OS</span>
<span class="font-weight-light">Guide</span>
</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn
text
href="https://www.a2os.club"
target="_blank"
>
<v-icon>mdi-home</v-icon>
</v-btn>
<v-btn
text
href="https://github.com/NUAA-Open-Source/"
target="_blank"
>
<v-icon>mdi-github-circle</v-icon>
</v-btn>
</v-app-bar>

<v-content>
<Greeting/>
<ElementList/>
</v-content>

<v-footer
app
color="#e6e6e6"
>
<v-layout justify-center>&copy;A2OS 2018-2019 All rights reserved.</v-layout>
</v-footer>
</v-app>
</template>

<script>
import Greeting from './components/Greeting';
import ElementList from './components/ElementList';

export default {
name: 'App',
components: {
Greeting,
ElementList,
},
data: () => ({
//
}),
};
</script>

<style>
.bar-btn {
color: black;
}
</style>
87 changes: 87 additions & 0 deletions src/components/ElementList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<template>
<v-container>
<v-row
justify="center"
class="card-container"
>
<v-col
cols="12"
sm="12"
md="6"
lg="4"
xl="3"
v-for="element in elements"
:key="element.id"
>
<v-card
hover
>
<v-card-title class="card-title">{{ element.name }}</v-card-title>
<v-card-text class="card-intro">{{ element.introduction }}</v-card-text>
<v-card-text>作者: {{ element.author }}</v-card-text>
<v-btn
text
v-bind:href="element.url"
target="_blank"
>
<v-icon>mdi-send</v-icon> 点击以访问
</v-btn>
</v-card>
</v-col>
</v-row>
</v-container>
</template>

<script>
export default {
name: 'Elementlist',
components: {
},
data: () => ({
elements: null
}),
mounted () {
this.$axios
.get('https://guide.a2os.club/api/cards/get/')
.then(response => (this.elements = response.data))
}
};
</script>

<style>
.card-title{
background-color: #00E5FF;
color: black;
}

.card-intro{
margin-top: 10px;
}

@media (min-width: 765px) {
.card-container
{
margin-right: auto;
margin-left: auto;
width: 745px;
}
}

@media (min-width: 990px) {
.card-container
{
margin-right: auto;
margin-left: auto;
width: 960px;
}
}

@media (min-width: 1200px) {
.card-container
{
margin-right: auto;
margin-left: auto;
width: 1170px;
}
}
</style>
21 changes: 21 additions & 0 deletions src/components/Greeting.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<v-container>
<v-row
justify="center"
>
<v-col
align-self="center"
cols="12"
>
<h1><v-icon large>mdi-heart</v-icon> 在这里,去发现……</h1>
<p>这里是 A2OS 的导航页,存放了南航非官方组织或个人开发的各类产品或小制作,以后可能会有更多内容,欢迎继续关注!</p>
</v-col>
</v-row>
</v-container>
</template>

<script>
export default {

}
</script>
14 changes: 14 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Vue from 'vue'
import App from './App.vue'
import vuetify from './plugins/vuetify';
import router from './router'
import axios from 'axios'

Vue.config.productionTip = false
Vue.prototype.$axios = axios

new Vue({
vuetify,
router,
render: h => h(App)
}).$mount('#app')
10 changes: 10 additions & 0 deletions src/plugins/vuetify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import Vue from 'vue';
import Vuetify from 'vuetify/lib';

Vue.use(Vuetify);

export default new Vuetify({
icons: {
iconfont: 'mdi',
},
});
24 changes: 24 additions & 0 deletions src/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes: [
{
path: '/',
name: 'home',
component: () => import(/* webpackChunkName: "about" */ './App.vue')
},
{
path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
}
]
})
5 changes: 5 additions & 0 deletions src/views/About.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div class="about">
<h1>This is an about page</h1>
</div>
</template>
Loading