Skip to content
Merged
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
11 changes: 2 additions & 9 deletions apps/site/app/[locale]/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use client';

import { ArrowRightIcon } from '@heroicons/react/24/solid';
import Image from 'next/image';
import { useTranslations } from 'next-intl';
import type { FC } from 'react';

import Button from '#site/components/Common/Button';
import Turtle from '#site/components/Common/Turtle';
import GlowingBackdropLayout from '#site/layouts/GlowingBackdrop';

const NotFoundPage: FC = () => {
Expand All @@ -20,14 +20,7 @@ const NotFoundPage: FC = () => {
</h1>

<div className="my-4 flex h-[150px] items-center justify-center md:h-[300px]">
<div className="turtle motion-safe:animate-surf motion-reduce:animate-none">
<Image
src="/static/images/node-mascot.svg"
alt="The Node.js mascot"
height={114.69}
width={100}
/>
</div>
<Turtle />
</div>

<p className="-mt-4 max-w-sm text-center text-lg">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@utility turtle {
@apply animate-surf
.turtle {
@apply motion-safe:animate-surf
animate-surf
absolute
z-10
translate-x-0
Expand All @@ -16,12 +17,13 @@
after:bg-[url('/static/images/smoke.gif')]
after:opacity-[0.15]
after:content-['']
motion-reduce:animate-none
after:md:-left-1/2
after:md:top-1/2;
}

& img {
@apply h-auto
w-24
md:w-48;
}
.image {
@apply h-auto
w-24
md:w-48;
}
18 changes: 18 additions & 0 deletions apps/site/components/Common/Turtle/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import Image from 'next/image';
import type { FC } from 'react';

import styles from './index.module.css';

const Turtle: FC = () => (
<div className={styles.turtle}>
<Image
className={styles.image}
src="/static/images/node-mascot.svg"
alt="The Node.js mascot"
height={115}
width={100}
/>
</div>
);

export default Turtle;
15 changes: 9 additions & 6 deletions apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
"deploy": "cross-env NEXT_PUBLIC_STATIC_EXPORT=true node --run build:default -- --turbo",
"predev": "node --run build:blog-data",
"dev": "cross-env NODE_NO_WARNINGS=1 next dev --turbo",
"lint": "turbo run lint:md lint:js lint:css",
"lint": "node --run lint:js && node --run lint:css && node --run lint:md",
"lint:fix": "node --run lint:js:fix && node --run lint:css:fix && node --run lint:md:fix",
"lint:css": "stylelint \"**/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache",
"lint:fix": "node --run lint -- -- --fix",
"lint:css:fix": "node --run lint:css -- --fix",
"lint:js": "eslint \"**/*.{js,mjs,ts,tsx}\"",
"lint:js:fix": "node --run lint:js -- --fix",
"lint:md": "eslint \"**/*.md?(x)\" --cache --cache-strategy=content --cache-location=.eslintmdcache",
"lint:md:fix": "node --run lint:md -- --fix",
"lint:types": "tsc --noEmit",
"playwright": "playwright test",
"scripts:release-post": "cross-env NODE_NO_WARNINGS=1 node scripts/release-post/index.mjs",
Expand Down Expand Up @@ -79,12 +82,12 @@
"@eslint/eslintrc": "~3.3.1",
"@flarelabs-net/wrangler-build-time-fs-assets-polyfilling": "^0.0.1",
"@next/eslint-plugin-next": "15.4.4",
"@opennextjs/cloudflare": "^1.6.0",
"@opennextjs/cloudflare": "^1.6.2",
"@playwright/test": "^1.54.1",
"@testing-library/user-event": "~14.6.1",
"@types/mdx": "^2.0.13",
"@types/semver": "~7.7.0",
"eslint-config-next": "15.4.3",
"eslint-config-next": "15.4.4",
"eslint-import-resolver-typescript": "~4.4.4",
"eslint-plugin-mdx": "~3.6.2",
"eslint-plugin-react": "~7.37.4",
Expand All @@ -103,8 +106,8 @@
"remark-lint-prohibited-strings": "^4.0.0",
"remark-lint-unordered-list-marker-style": "^4.0.1",
"remark-preset-lint-node": "5.1.2",
"stylelint": "16.22.0",
"stylelint-config-standard": "38.0.0",
"stylelint": "16.23.0",
"stylelint-config-standard": "39.0.0",
"stylelint-order": "7.0.0",
"stylelint-selector-bem-pattern": "4.0.1",
"tsx": "^4.20.3",
Expand Down
1 change: 1 addition & 0 deletions apps/site/pages/uk/about/get-involved/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ layout: about

- [Node Slackers](https://www.nodeslackers.com/) — це спільнота Slack із фокусом на Node.js.
- [OpenJSF Slack](https://slack-invite.openjsf.org/) — це робочий простір Slack для OpenJS Foundation. Там є кілька каналів, які стосуються Node.js. _(канали з префіксом `#nodejs-` стосуються проєкту)_
- [r/node](https://www.reddit.com/r/node/) — це сабреддіт із фокусом на Node.js.
- Для IRC перейдіть на `irc.libera.chat` у каналі `#node.js` через [клієнт IRC](https://en.wikipedia.org/wiki/Comparison_of_Internet_Relay_Chat_clients) або під'єднайтеся до каналу з веббраузера [через вебклієнт](https://kiwiirc.com/nextclient/).
125 changes: 125 additions & 0 deletions apps/site/pages/uk/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
title: Запускайте JavaScript будь‑де
layout: home
---

<section>
<WithBadgeGroup section="index" />

<div>
<h1 className="special">Запускайте JavaScript будь‑де</h1>

Node.js® — це безплатне, кросплатформне середовище виконання JavaScript із відкритим кодом,
яке дозволяє розробникам створювати сервери, вебзастосунки, інструменти командного рядка та скрипти.

</div>

<div className="flex gap-4">
<div className="flex flex-col gap-2">
<Button kind="special" className="!hidden dark:!block" href="/download">Отримати Node.js®</Button>

<Button kind="primary" className="!block dark:!hidden" href="/download">Отримати Node.js®</Button>

<Button kind="secondary" className="!block" href="/blog/announcements/node-18-eol-support">
<span>Отримати підтримку безпеки</span>

<br />

<small className="!text-xs">для Node.js 18 та нижче</small>
</Button>
</div>

</div>
</section>

<section>
<div>
```js displayName="Create an HTTP Server"
// server.mjs
import { createServer } from 'node:http';

const server = createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World!\n');
});

// starts a simple http server locally on port 3000
server.listen(3000, '127.0.0.1', () => {
console.log('Listening on 127.0.0.1:3000');
});

// run with `node server.mjs`
```

```js displayName="Write Tests"
// tests.mjs
import assert from 'node:assert';
import test from 'node:test';

test('that 1 is equal 1', () => {
assert.strictEqual(1, 1);
});

test('that throws as 1 is not equal 2', () => {
// throws an exception because 1 != 2
assert.strictEqual(1, 2);
});

// run with `node tests.mjs`
```

```js displayName="Read and Hash a File"
// crypto.mjs
import { createHash } from 'node:crypto';
import { readFile } from 'node:fs/promises';

const hasher = createHash('sha1');

hasher.setEncoding('hex');
// ensure you have a `package.json` file for this test!
hasher.write(await readFile('package.json'));
hasher.end();

const fileHash = hasher.read();

// run with `node crypto.mjs`
```

```js displayName="Streams Pipeline"
// streams.mjs
import { createReadStream, createWriteStream } from 'node:fs';
import { pipeline } from 'node:stream/promises';
import { createGzip } from 'node:zlib';

// ensure you have a `package.json` file for this test!
await pipeline(
createReadStream('package.json'),
createGzip(),
createWriteStream('package.json.gz')
);

// run with `node streams.mjs`
```

```js displayName="Work with Threads"
// threads.mjs
import { Worker, isMainThread,
workerData, parentPort } from 'node:worker_threads';

if (isMainThread) {
const data = 'some data';
const worker = new Worker(import.meta.filename, { workerData: data });
worker.on('message', msg => console.log('Reply from Thread:', msg));
} else {
const source = workerData;
parentPort.postMessage(btoa(source.toUpperCase()));
}

// run with `node threads.mjs`
```

</div>

Дізнайтеся більше про можливості Node.js із [нашими навчальними матеріалами](/learn).

</section>
2 changes: 1 addition & 1 deletion apps/site/snippets/uk/download/choco.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
powershell -c "irm https://community.chocolatey.org/install.ps1|iex"

# Завантажує й установлює Node.js:
choco install nodejs-lts --version="${props.release.major}"
choco install nodejs --version="${props.release.version}"

# Перевіряє версію Node.js:
node -v # Повинно вивести «${props.release.versionWithPrefix}».
1 change: 0 additions & 1 deletion apps/site/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@
*/

@import '@node-core/ui-components/styles/index.css';
@import './effects.css';
@import './locales.css';
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"turbo": "2.5.5"
},
"devDependencies": {
"@eslint/js": "~9.31.0",
"@eslint/js": "~9.32.0",
"@reporters/github": "^1.7.2",
"@testing-library/react": "~16.3.0",
"cross-env": "^7.0.3",
"eslint": "~9.31.0",
"eslint": "~9.32.0",
"eslint-plugin-import-x": "~4.16.1",
"prettier": "3.6.2",
"prettier-plugin-tailwindcss": "0.6.14"
Expand Down
5 changes: 3 additions & 2 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
"main": "./src/index.mjs",
"module": "./src/index.mjs",
"scripts": {
"lint": "turbo lint:js",
"lint": "node --run lint:js",
"lint:fix": "node --run lint:js:fix",
"lint:js": "eslint \"**/*.{js,mjs,ts}\"",
"lint:fix": "node --run lint -- -- --fix"
"lint:js:fix": "node --run lint:js -- --fix"
},
"devDependencies": {
"eslint-import-resolver-typescript": "~4.4.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/i18n/src/locales/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"footer": {
"links": {
"openJSFoundation": "Fundația OpenJS",
"trademarkPolicy": "Politica privind mărcile comerciale",
"privacyPolicy": "Politica de confidențialitate",
"trademarkPolicy": "Politică de mărci comerciale",
"privacyPolicy": "Politică de confidențialitate",
"versionSupport": "Suport pentru versiuni",
"codeOfConduct": "Cod de conduită",
"security": "Politica de securitate"
Expand Down
Loading
Loading