Skip to content

Commit

Permalink
First base version released
Browse files Browse the repository at this point in the history
Signed-off-by: uiuing <[email protected]>
  • Loading branch information
uiuing committed Jan 10, 2022
1 parent daad704 commit cad0175
Show file tree
Hide file tree
Showing 18 changed files with 1,161 additions and 7 deletions.
33 changes: 26 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,45 @@
![VARBookLogo](https://user-images.githubusercontent.com/73827386/148187928-2db0116a-3a0e-486b-a427-2f5d959b37c3.jpg)

<a href="https://varbook.uiuing.com" target="_blank">
<img src="https://user-images.githubusercontent.com/73827386/148187928-2db0116a-3a0e-486b-a427-2f5d959b37c3.jpg">
</a>

# VARBook
VARBook致力于帮助中文程序员提高英语编码能力,功能包括变量命名、英文注释、英语练习等
VARBook(变量本) 致力于帮助中文程序员提高英语编码能力,功能包括变量命名、英文注释、英语练习等

快速访问 👉 https://varbook.uiuing.com/

![VARBookHome](https://user-images.githubusercontent.com/73827386/148784850-229f6b8b-a1f6-4d35-8e7c-f25e8b6f239e.png)
<br>

### TODO 期待2022年3月前完成

**功能**

- [ ] 变量命名生成
- [ ] 自动生成英文注释
- [x] 智能生成英文变量名
- [x] 智能生成英文注释
- [x] 智能复制
- [ ] 英语练习
- [ ] 全站使用统计

**客户端**

- [ ] Web
- [x] Web
- [ ] Chrome浏览器插件
- [ ] jetbrains plugins

> 目前完成度
>
> <img height="100px" src="https://user-images.githubusercontent.com/73827386/148787003-703a746c-2368-47aa-a7f2-877795f2865c.png"></img>

<br>

> VARBook正在逐步完善中..欢迎大家出谋划策
<br>

VARBook正在逐步完善中..

### 关于作者
在校学生, 用爱发电

功能虽小, 精心制作

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/cli-plugin-babel/preset'
]
}
46 changes: 46 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "varbook",
"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.24.0",
"core-js": "^3.6.5",
"element-plus": "^1.3.0-beta.1",
"vue": "^3.0.0",
"vue-axios": "^3.4.0",
"vue-router": "^4.0.12"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~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 added public/favcion.ico
Binary file not shown.
Binary file added public/favicon_401x402.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions 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="varBook"></div>
<!-- built files will be auto injected -->
</body>
</html>
14 changes: 14 additions & 0 deletions src/VARBook.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<router-view></router-view>
</template>

<script>
export default {
name: 'VARBook',
}
</script>

<style>
</style>
642 changes: 642 additions & 0 deletions src/assets/images/Banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions src/components/Footer/textTools.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div>

</div>
</template>

<script>
export default {
name: "textTools"
}
</script>

<style scoped>
</style>
50 changes: 50 additions & 0 deletions src/components/Header/banner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<template>
<div class="banner-box"></div>
</template>

<script>
export default {
name: "banner"
}
</script>

<style scoped>
/*Logo image style*/
.banner-box {
text-align: center;
background-image: url("../../assets/images/Banner.svg");
background-size: 100%;
background-repeat: no-repeat;
margin: auto;
}
/*Match the banner style when accessing from the computer*/
@media (min-width: 768px) {
.banner-box {
width: 550px;
height: 130px;
}
}
/*Match the style of the banner when accessing from the mobile terminal*/
@media (max-width: 768px) {
.banner-box {
width: 420px;
height: 110px
}
}
@media (max-width: 550px) {
.banner-box {
width: 72%;
height: 90px;
}
}
@media (max-width: 460px) {
.banner-box {
width: 72%;
height: 73px;
}
}
/*end*/
</style>
17 changes: 17 additions & 0 deletions src/components/Header/clientList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script src="../../../../../GitHub公开前端/VARBook/src/main.js"></script>
<script src="../../../../../GitHub公开前端/VARBook/src/plugins/axios.js"></script>
<template>
<div>

</div>
</template>

<script>
export default {
name: "clientList"
}
</script>

<style scoped>
</style>
63 changes: 63 additions & 0 deletions src/components/Search/searchBar.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<template>
<el-input id="searchBox" v-model="input_contents" placeholder="You need to translate the variables"
@keydown.enter="openSearch"
autofocus>
<template #prefix>
<el-icon class="el-input__icon" @click="openSearch">
<svg class="icon" width="200" height="200" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"
data-v-365b8594="">
<path fill="currentColor"
d="M795.904 750.72l124.992 124.928a32 32 0 01-45.248 45.248L750.656 795.904a416 416 0 1145.248-45.248zM480 832a352 352 0 100-704 352 352 0 000 704z"></path>
</svg>
</el-icon>
</template>
</el-input>
</template>

<script>
import {ElMessage} from "element-plus";
export default {
name: "searchBar",
data(){
return{
// Content retrieved by users
input_contents:'',
}
},
mounted() {
// Monitor shortcut keys, focus the input box when control is pressed
document.onkeydown = function (e) {
if (e.keyCode == 17){
document.getElementById("searchBox").focus()
}
}
},
methods: {
openSearch(){
// Determine whether it contains Chinese and English
let isNull = this.input_contents.replace(/[^^\u4E00-\u9FA5a-zA-Z]/g, '');
if (isNull) {
// Start the query and pass the input to the parent component
this.$emit("startSearch",this.input_contents);
} else {
ElMessage({
showClose: true,
message: '目前仅支持搜索中/英文',
type: 'warning',
})
}
}
}
}
</script>

<style scoped>
/*Modify the default style of el-input*/
.el-input {
width: 70%;
max-width: 600px;
margin-bottom: 10px;
margin-top: 10px;
}
</style>
Loading

0 comments on commit cad0175

Please sign in to comment.