Skip to content

test task on vue #21

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

Open
wants to merge 1 commit 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
240 changes: 126 additions & 114 deletions api.json
Original file line number Diff line number Diff line change
@@ -1,120 +1,132 @@
{
"subjects": ["Fiction", "Science"],
"subjects": [
"Fiction",
"Science"
],
"books": [
{
"id":1342,
"authors":[
{
"birth_year":1775,
"death_year":1817,
"name":"Austen, Jane"
}
],
"bookshelves":[
"Best Books Ever Listings",
"Harvard Classics"
],
"download_count":45668,
"formats":{
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/1342/1342-0.txt",
"application/pdf":"http://www.gutenberg.org/files/1342/1342-pdf.pdf",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/1342.rdf",
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/1342.kindle.noimages",
"application/epub+zip":"http://www.gutenberg.org/ebooks/1342.epub.images",
"text/plain; charset=us-ascii":"http://www.gutenberg.org/files/1342/1342.txt",
"text/html; charset=utf-8":"http://www.gutenberg.org/files/1342/1342-h/1342-h.htm"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Fiction"],
"title":"Pride and Prejudice"
{
"id": 1342,
"authors": [
{
"birth_year": 1775,
"death_year": 1817,
"name": "Austen, Jane"
}
],
"bookshelves": [
"Best Books Ever Listings",
"Harvard Classics"
],
"download_count": 45668,
"formats": {
"text/plain; charset=utf-8": "http://www.gutenberg.org/files/1342/1342-0.txt",
"application/pdf": "http://www.gutenberg.org/files/1342/1342-pdf.pdf",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/1342.rdf",
"application/x-mobipocket-ebook": "http://www.gutenberg.org/ebooks/1342.kindle.noimages",
"application/epub+zip": "http://www.gutenberg.org/ebooks/1342.epub.images",
"text/plain; charset=us-ascii": "http://www.gutenberg.org/files/1342/1342.txt",
"text/html; charset=utf-8": "http://www.gutenberg.org/files/1342/1342-h/1342-h.htm"
},
{
"id":33283,
"authors":[
{
"birth_year":1851,
"death_year":1916,
"name":"Thompson, Silvanus P. (Silvanus Phillips)"
}
],
"bookshelves":[
"Mathematics"
],
"download_count":24344,
"formats":{
"application/prs.tex":"http://www.gutenberg.org/files/33283/33283-t.zip",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/33283.rdf",
"application/pdf":"http://www.gutenberg.org/files/33283/33283-pdf.pdf"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Fiction"],
"title":"Calculus Made Easy: Being a very-simplest introduction to those beautiful methods which are generally called by the terrifying names of the Differential Calculus and the Integral Calculus"
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Fiction"
],
"title": "Pride and Prejudice"
},
{
"id": 33283,
"authors": [
{
"birth_year": 1851,
"death_year": 1916,
"name": "Thompson, Silvanus P. (Silvanus Phillips)"
}
],
"bookshelves": [
"Mathematics"
],
"download_count": 24344,
"formats": {
"application/prs.tex": "http://www.gutenberg.org/files/33283/33283-t.zip",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/33283.rdf",
"application/pdf": "http://www.gutenberg.org/files/33283/33283-pdf.pdf"
},
{
"id":11,
"authors":[
{
"birth_year":1832,
"death_year":1898,
"name":"Carroll, Lewis"
}
],
"bookshelves":[
"Children's Literature"
],
"download_count":17866,
"formats":{
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/11/11-0.zip",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/11.rdf",
"application/pdf":"http://www.gutenberg.org/files/11/11-pdf.pdf",
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/11.kindle.noimages",
"application/epub+zip":"http://www.gutenberg.org/ebooks/11.epub.images",
"text/plain; charset=us-ascii":"http://www.gutenberg.org/files/11/11.zip",
"application/zip":"http://www.gutenberg.org/files/11/11-h.zip",
"text/html; charset=utf-8":"http://www.gutenberg.org/files/11/11-h/11-h.htm"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Fiction", "Science"],
"title":"Alice's Adventures in Wonderland"
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Fiction"
],
"title": "Calculus Made Easy: Being a very-simplest introduction to those beautiful methods which are generally called by the terrifying names of the Differential Calculus and the Integral Calculus"
},
{
"id": 11,
"authors": [
{
"birth_year": "1832",
"death_year": 1898,
"name": "Carroll, Lewis"
}
],
"bookshelves": [
"Children's Literature"
],
"download_count": 17866,
"formats": {
"text/plain; charset=utf-8": "http://www.gutenberg.org/files/11/11-0.zip",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/11.rdf",
"application/pdf": "http://www.gutenberg.org/files/11/11-pdf.pdf",
"application/x-mobipocket-ebook": "http://www.gutenberg.org/ebooks/11.kindle.noimages",
"application/epub+zip": "http://www.gutenberg.org/ebooks/11.epub.images",
"text/plain; charset=us-ascii": "http://www.gutenberg.org/files/11/11.zip",
"application/zip": "http://www.gutenberg.org/files/11/11-h.zip",
"text/html; charset=utf-8": "http://www.gutenberg.org/files/11/11-h/11-h.htm"
},
{
"id":74,
"authors":[
{
"birth_year":1835,
"death_year":1910,
"name":"Twain, Mark"
}
],
"bookshelves":[
"Banned Books from Anne Haight's list"
],
"download_count":16204,
"formats":{
"image/jpeg":"http://www.gutenberg.org/cache/epub/74/pg74.cover.medium.jpg",
"text/plain; charset=utf-8":"http://www.gutenberg.org/files/74/74-0.zip",
"application/rdf+xml":"http://www.gutenberg.org/ebooks/74.rdf",
"application/x-mobipocket-ebook":"http://www.gutenberg.org/ebooks/74.kindle.images",
"application/epub+zip":"http://www.gutenberg.org/ebooks/74.epub.noimages",
"text/html; charset=utf-8":"http://www.gutenberg.org/files/74/74-h/74-h.htm",
"text/plain; charset=iso-8859-1":"http://www.gutenberg.org/files/74/74.txt",
"application/zip":"http://www.gutenberg.org/files/74/74.zip"
},
"languages":[
"en"
],
"media_type":"Text",
"subjects": ["Science"],
"title":"The Adventures of Tom Sawyer"
}
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Fiction",
"Science"
],
"title": "Alice's Adventures in Wonderland"
},
{
"id": 74,
"authors": [
{
"birth_year": 1835,
"death_year": 1910,
"name": "Twain, Mark"
}
],
"bookshelves": [
"Banned Books from Anne Haight's list"
],
"download_count": 16204,
"formats": {
"image/jpeg": "http://www.gutenberg.org/cache/epub/74/pg74.cover.medium.jpg",
"text/plain; charset=utf-8": "http://www.gutenberg.org/files/74/74-0.zip",
"application/rdf+xml": "http://www.gutenberg.org/ebooks/74.rdf",
"application/x-mobipocket-ebook": "http://www.gutenberg.org/ebooks/74.kindle.images",
"application/epub+zip": "http://www.gutenberg.org/ebooks/74.epub.noimages",
"text/html; charset=utf-8": "http://www.gutenberg.org/files/74/74-h/74-h.htm",
"text/plain; charset=iso-8859-1": "http://www.gutenberg.org/files/74/74.txt",
"application/zip": "http://www.gutenberg.org/files/74/74.zip"
},
"languages": [
"en"
],
"media_type": "Text",
"subjects": [
"Science"
],
"title": "The Adventures of Tom Sawyer"
}
]
}
}
3 changes: 3 additions & 0 deletions books_vue/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> 1%
last 2 versions
not dead
7 changes: 7 additions & 0 deletions books_vue/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 100
19 changes: 19 additions & 0 deletions books_vue/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/essential',
'@vue/airbnb',
],
parserOptions: {
parser: 'babel-eslint',
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'import/prefer-default-export': 'off',
'arrow-parens': 'off',
},
};
23 changes: 23 additions & 0 deletions books_vue/.gitignore
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?
24 changes: 24 additions & 0 deletions books_vue/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# books_vue

## 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/).
5 changes: 5 additions & 0 deletions books_vue/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',
],
};
28 changes: 28 additions & 0 deletions books_vue/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "books_vue",
"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.23.0",
"core-js": "^3.6.5",
"vue": "^2.6.11"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-airbnb": "^5.0.2",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11",
"sass": "^1.43.3",
"sass-loader": "10.1.1"
}
}
16 changes: 16 additions & 0 deletions books_vue/src/App.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<template>
<div id="app">
<MainPage />
</div>
</template>

<script>
import MainPage from '@/components/MainPage.vue';

export default {
name: 'App',
components: {
MainPage,
},
};
</script>
Loading