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

Add Node.js basics. Add some additional features. English translation #38

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
"type": "penalty", // Штрафной пункт. Указано количество баллов которое снимается, если он выбран.
"text": "Тестовый - Oшибки или предупреждения eslint-config-airbnb-base",
"max": -15
},
{
"type": "penalty", // Штрафной пункт. Указан процент от общего количества баллов которые снимается, если он выбран.
"text": "Тестовый - Pull Request сделан НЕ в свой репозиторий",
"max": "-20%"
}
]
}
Expand Down
161 changes: 161 additions & 0 deletions active-tasks/node-nodejs-basics.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"taskName": "Node.js basics Q4-2022",
"github": "https://github.com/AlreadyBored/nodejs-assignments/blob/main/assignments/nodejs-basics/assignment.md",
"information": "Scoring: Node.js basics",
"criteria": [
{
"type": "title",
"title": "For check simplification you have npm-scripts in \"package.json.\"\nNB! Some scripts have predefined data (e.g. environment variables, CLI arguments). Feel free to change it during the check if necessary.\n\nMax score: 206"
},
{
"type": "title",
"title": "File system (src/fs)"
},
{
"type": "subtask",
"text": "`create.js` implemented properly",
"max": 6
},
{
"type": "subtask",
"text": "`copy.js` implemented properly",
"max": 10
},
{
"type": "subtask",
"text": "`rename.js` implemented properly",
"max": 10
},
{
"type": "subtask",
"text": "`delete.js` implemented properly",
"max": 6
},
{
"type": "subtask",
"text": "`list.js` implemented properly",
"max": 6
},
{
"type": "subtask",
"text": "`read.js` implemented properly",
"max": 6
},
{
"type": "title",
"title": "Command line interface(src/cli)"
},
{
"type": "subtask",
"text": "`env.js` implemented properly",
"max": 6
},
{
"type": "subtask",
"text": "`args.js` implemented properly",
"max": 6
},
{
"type": "title",
"title": "Modules(src/modules)"
},
{
"type": "subtask",
"text": "`cjsToEsm.cjs` refactored properly",
"max": 20
},
{
"type": "title",
"title": "Hash (src/hash)"
},
{
"type": "subtask",
"text": "`calcHash.js` implemented properly",
"max": 10
},
{
"type": "title",
"title": "Streams (src/streams)"
},
{
"type": "subtask",
"text": "`read.js` implemented properly",
"max": 10
},
{
"type": "subtask",
"text": "`write.js` implemented properly",
"max": 10
},
{
"type": "subtask",
"text": "`transform.js` implemented properly",
"max": 10
},
{
"type": "title",
"title": "Zlib (src/zip)"
},
{
"type": "subtask",
"text": "`compress.js` implemented properly",
"max": 10
},
{
"type": "subtask",
"text": "`decompress.js` implemented properly",
"max": 10
},
{
"type": "title",
"title": "Advanced Scope"
},
{
"type": "title",
"title": "Worker Threads (src/wt)"
},
{
"type": "subtask",
"text": "`worker.js` implemented properly",
"max": 10
},
{
"type": "subtask",
"text": "`main.js` implemented properly",
"max": 30
},
{
"type": "title",
"title": "Child Processes (src/cp)"
},
{
"type": "subtask",
"text": "spawns child process",
"max": 10
},
{
"type": "subtask",
"text": "child process `stdin` receives input from master process `stdin`",
"max": 10
},
{
"type": "subtask",
"text": "child process `stdout` sends data to master process `stdout`",
"max": 10
},
{
"type": "title",
"title": "Forfeits"
},
{
"type": "penalty",
"text": "Any external tools/libraries are used",
"max": "-95%"
},
{
"type": "penalty",
"text": "Commits after deadline (except commits that affect only Readme.md, .gitignore, etc.)",
"max": "-30%"
}
]
}
41 changes: 37 additions & 4 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,6 @@ main {
cursor: pointer;
}

.hidden {
display: none;
}

.title h3 {
color: #222;
text-transform: none;
Expand Down Expand Up @@ -564,6 +560,10 @@ label:hover {
font-size: 35px;
}

.task-max-score .wide-digit {
font-size: 24px;
}

.feedback-buttons {
position: relative;
text-align: right;
Expand Down Expand Up @@ -633,3 +633,36 @@ label:hover {
width: 60%;
text-align: left;
}

code {
display: inline-block;
padding: 0 6px;
border-radius: 4px;
background: #00000026;
font-size: .85em;
line-height: 150%;
}

.lang-selector {
display: flex;
margin-right: 20px;
font-size: 1.5em;
}

.lang-selector li {
margin: 0 4px;
}

.lang-selector li a {
cursor: pointer;
}

.disabled-link a {
text-decoration: none !important;
cursor: default !important;
color: #162b3f;
}

.hidden {
display: none;
}
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<span class="total-points">Total&#160;points: </span>
<span class="score-board">0</span>
</div>
<ul class="lang-selector">
<li><a>ru</a></li>
<li> | </li>
<li><a>en</a></li>
</ul>
</header>
<main>

Expand Down
2 changes: 1 addition & 1 deletion index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/RenderTasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class RenderTasks {
e.preventDefault();
this.tasksList.remove();
document.querySelector('.back').classList.remove('hidden');
document.querySelector('.lang-selector').classList.add('hidden');
render(tasksObj.criteria, tasksObj.taskName, tasksObj.information);
};
taskLink.appendChild(link);
Expand Down
Loading