Skip to content
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
17 changes: 17 additions & 0 deletions search-project/.browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# For the full list of supported browsers by the Angular framework, please see:
# https://angular.io/guide/browser-support

# You can see what browsers were selected by your queries by running:
# npx browserslist

last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 Safari major versions
last 2 iOS major versions
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
16 changes: 16 additions & 0 deletions search-project/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
45 changes: 45 additions & 0 deletions search-project/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
50 changes: 50 additions & 0 deletions search-project/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## Проект по курсу веб-разработки и Angular на РТФ-2021

#### Краткое описание проекта:

Требуется реализовать SPA, которое предоставляет возможность поиска по объектам популярных сервисов: [Twitch](https://www.twitch.tv/), [Wikipedia](https://ru.wikipedia.org/) и [GitHub](https://github.com/)

#### Требования к успешной сдачи:

1. Для реализации используется Angular
2. На главной странице приложения должны быть:
1. Поисковая строка
2. Панель с настройкой запроса и краткой информацией по найденным объектам:
1. Для настройки запроса используется
1. Вид сортировки. Сортировать можно по:
1. Релевантности
2. Дате изменения/создания (новые-старые)
3. Дате изменения/создания (старые-новые)
2. Выбор объекта, по которым происходит поиск в сервисе
2. В качестве краткой информации можно выводить:
1. Кол-во найденных объектов
2. Другую информацию, которую возможно получить от сервиса, с которым вы работаете (среднее кол-во слов в статье, кол-во похожих запросов и т.д.)
3. Панель с историей поиска
1. Историю поиска требуется реализовывать с помощью локального хранилища браузера (Local storage)
2. По нажатию на объект истории поиска требуется снова сделать этот запрос и вывести информацию
4. При возникновении каких-то ошибок приложение должно продолжать свою работу, ошибка должна обработаться и появиться уведомление на экране об ошибке.
3. Если вы реализуете поиск по сервису Twitch, то поиск должен осуществляться по двум объектам:
1. [Категории](https://dev.twitch.tv/docs/api/reference#search-categories)
2. [Каналы](https://dev.twitch.tv/docs/api/reference#search-channels)
4. Если вы реализуете поиск по сервису Wikipedia, то поиск должен осуществляться только по [статьям](https://www.mediawiki.org/wiki/API:Search#GET_request)
5. Если вы реализуете поиск по сервису GitHub, то поиск должен осуществляться по двум объектам:
1. [Репозитории](https://docs.github.com/en/rest/reference/search#search-repositories)
2. [Пользователи](https://docs.github.com/en/rest/reference/search#search-users)
6. Вся разработка должна вестись в собственном репозитории на GitHub, форкнутом от данного
7. Этапы сдачи проекта:
1. 29.04 — Продумать архитектуру приложения (какие компоненты нужны, как организовать между ними взаимодействие, какие сервисы и т.д.). Ознакомиться с документацией выданного вам сервиса. Создать форк проект от [репозитория](https://github.com/RTF-Angular-2021/search-project).
2. 13.05 — Должны быть реализованы сервисы взаимодействия с API выданного вам сервиса. Должен быть реализован сервис хранения данных, который взаимодействует с local storage. Должны быть реализованы основные интерфейсы данных, использование которых будет происходить в рамках работы вашего приложения.
3. 20.05 — Реализованы основные компоненты приложения, осуществляется поиск и сохранение истории поиска. Реализована форма с настройкой запроса.
4. 27.05 — Сдача сверстанного и стилизованного приложения, в котором полностью работоспособен основной функционал, описанный в задании.
8. Как это примерно должно выглядеть:
1. Главная страница
![](https://i.imgur.com/OE7ZA3H.png)
2. Результаты поиска
![](https://i.imgur.com/m7hn9Ob.png)
3. Ошибка при запросе
![](https://i.imgur.com/IGpiRRb.png)
4. Панель с настройкой запроса и краткой информацией
![](https://i.imgur.com/RxyRm1z.png)
5. Панель с историей поиска
![](https://i.imgur.com/77d6MRC.png)

106 changes: 106 additions & 0 deletions search-project/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"Wiki-app": {
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/Wiki-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"browserTarget": "Wiki-app:build:production"
},
"development": {
"browserTarget": "Wiki-app:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "Wiki-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
}
}
}
},
"defaultProject": "Wiki-app"
}
44 changes: 44 additions & 0 deletions search-project/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
},
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
jasmineHtmlReporter: {
suppressAll: true // removes the duplicated traces
},
coverageReporter: {
dir: require('path').join(__dirname, './coverage/Wiki-app'),
subdir: '.',
reporters: [
{ type: 'html' },
{ type: 'text-summary' }
]
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
restartOnFileChange: true
});
};
Loading