Skip to content

Commit 0ee4b17

Browse files
committed
Status link
ImageDarkLight component Removed DE translation
1 parent 42a9e61 commit 0ee4b17

File tree

12 files changed

+53
-101
lines changed

12 files changed

+53
-101
lines changed

blog/2025-03-05-march.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ image: /img/blog/2023-march/march-news.webp
77
---
88

99

10-
import ThemedImage from '@theme/ThemedImage';
11-
12-
1310
**New Roadmap & Coffee!**
1411

1512
![](/img/blog/2023-march/march-news.webp)

docs/scripting-reference/classes/base-classes/pickable.mdx

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ description: Base class for all Pickables
44
tags: [base-class]
55
---
66

7-
import { Classes } from '@site/src/components/_nanos';
8-
import ThemedImage from '@theme/ThemedImage';
9-
107
<HeaderDeclaration type="Class" name="Pickable" />
118

129
They have special methods and events and are highlighted when looked at by a Character.
@@ -26,15 +23,11 @@ They have special methods and events and are highlighted when looked at by a Cha
2623

2724
nanos world provides a bunch of crosshair materials which can be used in Weapons/Pickables. You can of course create your own crosshair material and use those instead!
2825

29-
````mdx-code-block
30-
<ThemedImage
31-
alt="All available Crosshairs"
32-
sources={{
33-
light: '/img/docs/crosshairs_light.webp',
34-
dark: '/img/docs/crosshairs_dark.webp',
35-
}}
26+
<ImageDarkLight
27+
light_img="/img/docs/crosshairs_light.webp"
28+
dark_img="/img/docs/crosshairs_dark.webp"
29+
legend="All available Crosshairs"
3630
/>
37-
````
3831

3932

4033
#### List of crosshair materials included in the default asset pack

docs/welcome.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ sidebar_position: 0
88
slug: /
99
---
1010

11-
import ThemedImage from '@theme/ThemedImage';
12-
1311

1412
Welcome to the new nanos world Official Documentation!
1513

docusaurus.config.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ module.exports = {
1313
trailingSlash: false,
1414
i18n: {
1515
defaultLocale: 'en',
16-
locales: isDev ? ['en'] : ['en', 'pt-BR', 'de', 'fr'],
16+
locales: isDev ? ['en'] : ['en', 'fr', 'pt-BR'],
1717
localeConfigs: {
1818
en: {
1919
label: '🇬🇧 English'
2020
},
2121
'pt-BR': {
2222
label: '🇧🇷 Português (Brasil)'
2323
},
24-
de: {
25-
label: '🇩🇪 Deutsch'
26-
},
2724
fr: {
2825
label: '🇫🇷 Français'
2926
},
@@ -77,21 +74,27 @@ module.exports = {
7774
{
7875
href: 'https://discord.nanos-world.com',
7976
position: 'right',
80-
className: 'header-discord-link',
77+
className: 'header-right-link header-discord-link',
8178
'aria-label': 'Discord',
8279
},
8380
{
8481
href: 'https://github.com/nanos-world',
8582
position: 'right',
86-
className: 'header-github-link',
83+
className: 'header-right-link header-github-link',
8784
'aria-label': 'GitHub repository',
8885
},
8986
{
9087
href: 'https://issues.nanos-world.com',
9188
position: 'right',
92-
className: 'header-bugs-link',
89+
className: 'header-right-link header-bugs-link',
9390
'aria-label': 'Bugs',
9491
},
92+
{
93+
href: 'https://status.nanos-world.com',
94+
position: 'right',
95+
className: 'header-right-link header-status-link',
96+
'aria-label': 'Status',
97+
},
9598
{
9699
type: 'docsVersionDropdown',
97100
position: 'right',

src/components/Utils.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,22 @@ export const ImageExternal = ({ path, className }) => (
1818
<img src={`${ GetExternalPath() }/images${ path }`} className={className} decoding="async" loading="lazy" />
1919
)
2020

21+
// Image that changes based on the dark/light theme
22+
// Note: image-zoom doesn't work
23+
export const ImageDarkLight = ({ dark_img, light_img, legend }) => (
24+
<>
25+
<p>
26+
<ThemedImage
27+
sources={{
28+
light: light_img,
29+
dark: dark_img,
30+
}}
31+
/>
32+
</p>
33+
<MediaLegend>{ legend }</MediaLegend>
34+
</>
35+
);
36+
2137
// Getter to get the current version path - for links
2238
export const getActiveVersionPath = () => {
2339
const activeVersion = useActiveVersion();

src/css/custom.css

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -315,32 +315,23 @@ html[data-theme="dark"] .medium-zoom-overlay {
315315
margin-left: 1rem;
316316
}
317317

318-
.header-github-link:hover,
319-
.header-discord-link:hover,
320-
.header-bugs-link:hover,
321-
.header-account-link:hover {
318+
.header-right-link:hover {
322319
opacity: 0.7;
323320
}
324321

325-
.header-github-link:before,
326-
.header-discord-link:before,
327-
.header-bugs-link:before,
328-
.header-account-link:before {
322+
.header-right-link:before {
329323
content: '';
330324
display: flex;
331325
width: 26px;
332326
height: 28px;
333327
}
334328

335-
.header-github-link,
336-
.header-discord-link,
337-
.header-bugs-link,
338-
.header-account-link {
329+
.header-right-link {
339330
padding: 0 0.4rem;
340331
}
341332

342333
/* Last item resets to original padding */
343-
.header-bugs-link {
334+
.header-right-link:last-child {
344335
padding-right: var(--ifm-navbar-item-padding-horizontal);
345336
}
346337

@@ -368,6 +359,14 @@ html[data-theme='dark'] .header-bugs-link:before {
368359
background: no-repeat center/26px url("/img/social/bugs-white.svg");
369360
}
370361

362+
.header-status-link:before {
363+
background: no-repeat center/20px 28px url("/img/social/status-color.png");
364+
}
365+
366+
html[data-theme='dark'] .header-status-link:before {
367+
background: no-repeat center/20px 28px url("/img/social/status-white.png");
368+
}
369+
371370
.header-account-link:before {
372371
background: no-repeat center/26px url("/img/social/account-color.svg");
373372
}
-74.5 KB
Binary file not shown.

src/pages/2023-contest/index.md

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/theme/MDXComponents.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import MDXComponents from '@theme-original/MDXComponents';
44
// Import custom elements
55
import { HeaderDeclaration, ConstructorDeclaration, FunctionsDeclaration, StaticFunctionsDeclaration, ExamplesDeclaration, EventsDeclaration, PropertiesDeclaration, StaticPropertiesDeclaration, APISourceURL, MethodReference, EventReference } from '@site/src/components/ClassBuilder';
66
import { Classes, Structs, BasicType, AuthorityType, UtilityClasses, ReferenceLink, Enums, CardLink, AssetPath, NativeType, StaticClasses } from '@site/src/components/_nanos';
7-
import { VideoExternal, ImageExternal, ComparisonSlider, KofiButton, MediaLegend, MediaGallery } from '@site/src/components/Utils';
7+
import { VideoExternal, ImageExternal, ComparisonSlider, KofiButton, MediaLegend, MediaGallery, ImageDarkLight } from '@site/src/components/Utils';
88

99
export default {
1010
// Re-use the default mapping
@@ -35,6 +35,7 @@ export default {
3535
ImageExternal,
3636
MediaLegend,
3737
MediaGallery,
38+
ImageDarkLight,
3839
NativeType,
3940
StaticClasses,
4041
ComparisonSlider,

static/img/social/bugs-white.svg

Lines changed: 9 additions & 5 deletions
Loading

0 commit comments

Comments
 (0)