namirasoft-site-react 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/NSCard.d.ts +2 -2
- package/dist/components/NSCard.js +6 -3
- package/dist/components/NSCard.js.map +1 -1
- package/dist/components/NSCard.module.css +17 -1
- package/dist/components/NSEntityCardBackground.d.ts +19 -0
- package/dist/components/NSEntityCardBackground.js +27 -0
- package/dist/components/NSEntityCardBackground.js.map +1 -0
- package/dist/components/NSEntityCardBackground.module.css +40 -0
- package/dist/components/NSHeader.d.ts +1 -0
- package/dist/components/NSHeader.js +2 -1
- package/dist/components/NSHeader.js.map +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/main.js.map +1 -1
- package/package.json +4 -4
- package/src/components/NSCard.module.css +17 -1
- package/src/components/NSCard.tsx +11 -5
- package/src/components/NSEntityCardBackground.module.css +40 -0
- package/src/components/NSEntityCardBackground.tsx +68 -0
- package/src/components/NSHeader.tsx +23 -18
- package/src/main.ts +1 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
export interface NSCardProps {
|
|
3
3
|
id?: string | number;
|
|
4
|
-
title
|
|
4
|
+
title?: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
image: {
|
|
7
7
|
src: string;
|
|
8
8
|
alt: string;
|
|
9
9
|
};
|
|
10
10
|
link?: {
|
|
11
|
-
text
|
|
11
|
+
text?: string;
|
|
12
12
|
href: string;
|
|
13
13
|
target?: string;
|
|
14
14
|
};
|
|
@@ -4,10 +4,13 @@ import { Component } from 'react';
|
|
|
4
4
|
import Styles from './NSCard.module.css';
|
|
5
5
|
export class NSCard extends Component {
|
|
6
6
|
render() {
|
|
7
|
-
var _a;
|
|
8
|
-
return (_jsx(_Fragment, { children: _jsxs("article", { className: Styles.ns_card, children: [_jsxs("div", { className: Styles.ns_card_detail_container, children: [_jsxs("div", { className: Styles.ns_card_title_img, style: { alignItems: this.props.description ? "flex-start" : "center" }, children: [_jsx("img", { className: Styles.ns_card_img, src: this.props.image.src, alt: this.props.image.alt }), _jsx("h3", { className: Styles.ns_card_title, children: this.props.title })] }), this.props.description &&
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
8
|
+
return (_jsx(_Fragment, { children: _jsxs("article", { className: Styles.ns_card, children: [_jsxs("div", { className: Styles.ns_card_detail_container, children: [_jsxs("div", { className: Styles.ns_card_title_img, style: { alignItems: this.props.description ? "flex-start" : "center" }, children: [_jsx("img", { className: Styles.ns_card_img, src: this.props.image.src, alt: this.props.image.alt }), _jsx("h3", { className: Styles.ns_card_title, children: this.props.title && this.props.title })] }), this.props.description &&
|
|
9
9
|
_jsx("p", { className: Styles.ns_card_description, children: this.props.description })] }), this.props.link &&
|
|
10
|
-
|
|
10
|
+
this.props.link.text ?
|
|
11
|
+
_jsx("div", { className: Styles.ns_card_link_container, children: _jsx("a", { className: Styles.ns_card_link, href: (_a = this.props.link) === null || _a === void 0 ? void 0 : _a.href, target: (_c = (_b = this.props.link) === null || _b === void 0 ? void 0 : _b.target) !== null && _c !== void 0 ? _c : "_self", children: (_d = this.props.link) === null || _d === void 0 ? void 0 : _d.text }) })
|
|
12
|
+
:
|
|
13
|
+
_jsx("div", { className: Styles.ns_card_link_container, children: _jsx("a", { className: Styles.ns_link_absolute, href: (_e = this.props.link) === null || _e === void 0 ? void 0 : _e.href, target: (_g = (_f = this.props.link) === null || _f === void 0 ? void 0 : _f.target) !== null && _g !== void 0 ? _g : "_self" }) })] }) }));
|
|
11
14
|
}
|
|
12
15
|
}
|
|
13
16
|
//# sourceMappingURL=NSCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSCard.js","sourceRoot":"","sources":["../../src/components/NSCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,MAA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
79
80
|
}
|
|
80
81
|
|
|
82
|
+
.ns_link_absolute {
|
|
83
|
+
position: absolute;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
left: 0;
|
|
87
|
+
right: 0;
|
|
88
|
+
top:0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
81
94
|
@media only screen and (min-width: 576px) {
|
|
82
95
|
.ns_card {
|
|
83
96
|
width: 65%;
|
|
@@ -94,4 +107,7 @@
|
|
|
94
107
|
.ns_card {
|
|
95
108
|
width: 31%;
|
|
96
109
|
}
|
|
97
|
-
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Component } from 'react';
|
|
2
|
+
import { Background } from '../types/Background';
|
|
3
|
+
export interface IProps {
|
|
4
|
+
id?: string | number;
|
|
5
|
+
title: string;
|
|
6
|
+
link?: {
|
|
7
|
+
href: string;
|
|
8
|
+
target?: string;
|
|
9
|
+
};
|
|
10
|
+
background?: Background;
|
|
11
|
+
}
|
|
12
|
+
interface IState {
|
|
13
|
+
background?: Background;
|
|
14
|
+
}
|
|
15
|
+
export declare class NSEntityCardBackground extends Component<IProps, IState> {
|
|
16
|
+
constructor(props: IProps);
|
|
17
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
import Styles from './NSEntityCardBackground.module.css';
|
|
5
|
+
export class NSEntityCardBackground extends Component {
|
|
6
|
+
constructor(props) {
|
|
7
|
+
var _a, _b, _c;
|
|
8
|
+
super(props);
|
|
9
|
+
this.state = {
|
|
10
|
+
background: {
|
|
11
|
+
image: `url(${(_a = props.background) === null || _a === void 0 ? void 0 : _a.image})`,
|
|
12
|
+
color: (_b = props.background) === null || _b === void 0 ? void 0 : _b.color,
|
|
13
|
+
position: (_c = props.background) === null || _c === void 0 ? void 0 : _c.position
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
var _a, _b, _c, _d, _e, _f;
|
|
19
|
+
return (_jsx(_Fragment, { children: _jsxs("article", { className: Styles.card_background, style: {
|
|
20
|
+
backgroundImage: (_a = this.state.background) === null || _a === void 0 ? void 0 : _a.image,
|
|
21
|
+
backgroundColor: (_b = this.state.background) === null || _b === void 0 ? void 0 : _b.color,
|
|
22
|
+
backgroundPosition: (_c = this.state.background) === null || _c === void 0 ? void 0 : _c.position
|
|
23
|
+
}, children: [_jsx("p", { className: Styles.card_background_text, children: this.props.title }), this.props.link &&
|
|
24
|
+
_jsx("div", { className: Styles.ns_card_link_container, children: _jsx("a", { className: Styles.ns_link_absolute, href: (_d = this.props.link) === null || _d === void 0 ? void 0 : _d.href, target: (_f = (_e = this.props.link) === null || _e === void 0 ? void 0 : _e.target) !== null && _f !== void 0 ? _f : "_self" }) })] }) }));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=NSEntityCardBackground.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NSEntityCardBackground.js","sourceRoot":"","sources":["../../src/components/NSEntityCardBackground.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,MAAM,MAAM,qCAAqC,CAAA;AAqBxD,MAAM,OAAO,sBAAuB,SAAQ,SAAyB;IAEpE,YAAY,KAAa;;QAExB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACZ,UAAU,EAAE;gBACX,KAAK,EAAE,OAAO,MAAA,KAAK,CAAC,UAAU,0CAAE,KAAK,GAAG;gBACxC,KAAK,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,KAAK;gBAC9B,QAAQ,EAAE,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ;aACpC;SACD,CAAA;IACF,CAAC;IAEQ,MAAM;;QAEd,OAAO,CACN,4BACC,mBAAS,SAAS,EAAE,MAAM,CAAC,eAAe,EACzC,KAAK,EACJ;oBACA,eAAe,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,UAAU,0CAAE,KAAK;oBAC7C,eAAe,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,UAAU,0CAAE,KAAK;oBAC7C,kBAAkB,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,UAAU,0CAAE,QAAQ;iBACnD,aAGD,YAAG,SAAS,EAAE,MAAM,CAAC,oBAAoB,YACvC,IAAI,CAAC,KAAK,CAAC,KAAK,GACd,EAGH,IAAI,CAAC,KAAK,CAAC,IAAI;wBACf,cAAK,SAAS,EAAE,MAAM,CAAC,sBAAsB,YAC5C,YAAG,SAAS,EAAE,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,0CAAE,IAAI,EAAE,MAAM,EAAE,MAAA,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,0CAAE,MAAM,mCAAI,OAAO,GAC1G,GACC,IAEG,GACT,CACH,CAAC;IACH,CAAC;CACD"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.card_background {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-end;
|
|
5
|
+
justify-content: flex-end;
|
|
6
|
+
gap: 24px 0;
|
|
7
|
+
box-shadow: 0 2px 10px 4px #00000040;
|
|
8
|
+
padding: 24px;
|
|
9
|
+
border-radius: 24px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
max-width: 358px;
|
|
12
|
+
position: relative;
|
|
13
|
+
color: #fff;
|
|
14
|
+
background-repeat: no-repeat;
|
|
15
|
+
background-size: cover;
|
|
16
|
+
background-position: center;
|
|
17
|
+
min-height: 320px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.card_background_text {
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
line-height: inherit;
|
|
24
|
+
font-family: inherit;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ns_card_link_container {
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ns_link_absolute {
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
left: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
top: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
@@ -35,7 +35,8 @@ export class NSHeader extends React.Component {
|
|
|
35
35
|
this.setState({ showNavbar: !this.state.showNavbar });
|
|
36
36
|
}
|
|
37
37
|
render() {
|
|
38
|
-
return (_jsx("nav", { className: Styles.ns_navbar, children: _jsxs("div", { className: `${Styles.ns_navbar_parent_content} container`, children: [_jsx("img", { src: this.props.logo, alt: "Logo", width: 48, height: 48 }), _jsxs("div", { className: `${Styles.ns_navbar_content} `, children: [_jsx("div", { className: `${Styles.ns_navbar_elements} ${this.state.showNavbar && Styles.ns_navbar_active}`, children: this.render_menu(0, null) }),
|
|
38
|
+
return (_jsx("nav", { className: Styles.ns_navbar, children: _jsxs("div", { className: `${Styles.ns_navbar_parent_content} container`, children: [_jsx("img", { src: this.props.logo, alt: "Logo", width: 48, height: 48 }), _jsxs("div", { className: `${Styles.ns_navbar_content} `, children: [_jsx("div", { className: `${Styles.ns_navbar_elements} ${this.state.showNavbar && Styles.ns_navbar_active}`, children: this.render_menu(0, null) }), this.props.account &&
|
|
39
|
+
_jsxs(_Fragment, { children: [_jsxs("div", { className: `${Styles.ns_navbar_login_status}`, children: [_jsx("span", { className: `${Styles.ns_navbar_usersname}`, children: "name" }), _jsx("img", { src: '../assets/images/exit.svg', alt: "Exit", width: 20, height: 20 })] }), _jsx("div", { className: Styles.ns_navbar_menu_icon, onClick: this.handleShowNavbar, children: _jsx("img", { src: '../assets/images/menu.svg', alt: "Menu", width: 19, height: 17 }) })] })] })] }) }));
|
|
39
40
|
}
|
|
40
41
|
render_menu(level, parent_id) {
|
|
41
42
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NSHeader.js","sourceRoot":"","sources":["../../src/components/NSHeader.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAiB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"NSHeader.js","sourceRoot":"","sources":["../../src/components/NSHeader.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAE3C,OAAO,WAAW,MAAM,6BAA6B,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAiB,MAAM,qBAAqB,CAAC;AAiB7E,MAAM,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAyB;IACzD,YAAY,KAAa;QAErB,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG;YACT,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,KAAK;SACpB,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3D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components/NSButtonRed";
|
|
3
3
|
export * from "./components/NSCard";
|
|
4
|
+
export * from "./components/NSEntityCardBackground";
|
|
4
5
|
export * from "./components/NSEntityBar";
|
|
5
6
|
export * from "./components/NSFooter";
|
|
6
7
|
export * from "./components/NSHeader";
|
package/dist/main.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./components/NSButtonGreen";
|
|
2
2
|
export * from "./components/NSButtonRed";
|
|
3
3
|
export * from "./components/NSCard";
|
|
4
|
+
export * from "./components/NSEntityCardBackground";
|
|
4
5
|
export * from "./components/NSEntityBar";
|
|
5
6
|
export * from "./components/NSFooter";
|
|
6
7
|
export * from "./components/NSHeader";
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,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1
|
{
|
|
2
2
|
"name": "namirasoft-site-react",
|
|
3
|
-
"title": "
|
|
3
|
+
"title": "Namirasoft Site React",
|
|
4
4
|
"description": "Namira Software Corporation Site React NPM Package",
|
|
5
5
|
"icon": "logo.png",
|
|
6
6
|
"logo": "https://static.namirasoft.com/logo/namirasoft/name.png",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"framework": "npm",
|
|
9
9
|
"application": "package",
|
|
10
10
|
"private": false,
|
|
11
|
-
"version": "1.3.
|
|
11
|
+
"version": "1.3.4",
|
|
12
12
|
"main": "./dist/main.js",
|
|
13
13
|
"types": "./dist/main.d.ts",
|
|
14
14
|
"author": "Amir Abolhasani",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@types/node": "^20.11.30",
|
|
25
|
-
"@types/react": "^18.2.
|
|
25
|
+
"@types/react": "^18.2.71",
|
|
26
26
|
"@types/react-dom": "^18.2.22",
|
|
27
|
-
"antd": "^5.15.
|
|
27
|
+
"antd": "^5.15.4",
|
|
28
28
|
"bootstrap": "^5.3.3",
|
|
29
29
|
"link-react": "^3.0.0",
|
|
30
30
|
"namirasoft-api-link": "^1.3.0",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
border-radius: 24px;
|
|
12
12
|
width: 100%;
|
|
13
13
|
max-width: 358px;
|
|
14
|
+
position: relative;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
.ns_card_detail_container {
|
|
@@ -78,6 +79,18 @@
|
|
|
78
79
|
width: 100%;
|
|
79
80
|
}
|
|
80
81
|
|
|
82
|
+
.ns_link_absolute {
|
|
83
|
+
position: absolute;
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
left: 0;
|
|
87
|
+
right: 0;
|
|
88
|
+
top:0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
81
94
|
@media only screen and (min-width: 576px) {
|
|
82
95
|
.ns_card {
|
|
83
96
|
width: 65%;
|
|
@@ -94,4 +107,7 @@
|
|
|
94
107
|
.ns_card {
|
|
95
108
|
width: 31%;
|
|
96
109
|
}
|
|
97
|
-
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
@@ -7,7 +7,7 @@ import Styles from './NSCard.module.css'
|
|
|
7
7
|
export interface NSCardProps
|
|
8
8
|
{
|
|
9
9
|
id?: string | number;
|
|
10
|
-
title
|
|
10
|
+
title?: string;
|
|
11
11
|
description?: string;
|
|
12
12
|
image: {
|
|
13
13
|
src: string;
|
|
@@ -15,7 +15,7 @@ export interface NSCardProps
|
|
|
15
15
|
};
|
|
16
16
|
link?:
|
|
17
17
|
{
|
|
18
|
-
text
|
|
18
|
+
text?: string;
|
|
19
19
|
href: string;
|
|
20
20
|
target?: string;
|
|
21
21
|
}
|
|
@@ -31,7 +31,7 @@ export class NSCard extends Component<NSCardProps> {
|
|
|
31
31
|
<div className={Styles.ns_card_title_img} style={{ alignItems: this.props.description ? "flex-start" : "center" }}>
|
|
32
32
|
<img className={Styles.ns_card_img} src={this.props.image.src} alt={this.props.image.alt} />
|
|
33
33
|
<h3 className={Styles.ns_card_title}>
|
|
34
|
-
{this.props.title}
|
|
34
|
+
{this.props.title && this.props.title }
|
|
35
35
|
</h3>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
@@ -43,9 +43,15 @@ export class NSCard extends Component<NSCardProps> {
|
|
|
43
43
|
|
|
44
44
|
</div>
|
|
45
45
|
{this.props.link &&
|
|
46
|
+
this.props.link.text ?
|
|
46
47
|
<div className={Styles.ns_card_link_container}>
|
|
47
|
-
<a className={Styles.ns_card_link} href={this.props.link
|
|
48
|
-
{this.props.link
|
|
48
|
+
<a className={Styles.ns_card_link} href={this.props.link?.href} target={this.props.link?.target ?? "_self"} >
|
|
49
|
+
{this.props.link?.text}
|
|
50
|
+
</a>
|
|
51
|
+
</div>
|
|
52
|
+
:
|
|
53
|
+
<div className={Styles.ns_card_link_container}>
|
|
54
|
+
<a className={Styles.ns_link_absolute} href={this.props.link?.href} target={this.props.link?.target ?? "_self"} >
|
|
49
55
|
</a>
|
|
50
56
|
</div>
|
|
51
57
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.card_background {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: flex-end;
|
|
5
|
+
justify-content: flex-end;
|
|
6
|
+
gap: 24px 0;
|
|
7
|
+
box-shadow: 0 2px 10px 4px #00000040;
|
|
8
|
+
padding: 24px;
|
|
9
|
+
border-radius: 24px;
|
|
10
|
+
width: 100%;
|
|
11
|
+
max-width: 358px;
|
|
12
|
+
position: relative;
|
|
13
|
+
color: #fff;
|
|
14
|
+
background-repeat: no-repeat;
|
|
15
|
+
background-size: cover;
|
|
16
|
+
background-position: center;
|
|
17
|
+
min-height: 320px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.card_background_text {
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
line-height: inherit;
|
|
24
|
+
font-family: inherit;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ns_card_link_container {
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ns_link_absolute {
|
|
32
|
+
position: absolute;
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: 100%;
|
|
35
|
+
left: 0;
|
|
36
|
+
right: 0;
|
|
37
|
+
top: 0;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Component } from 'react';
|
|
4
|
+
|
|
5
|
+
import Styles from './NSEntityCardBackground.module.css'
|
|
6
|
+
import { Background } from '../types/Background';
|
|
7
|
+
|
|
8
|
+
export interface IProps
|
|
9
|
+
{
|
|
10
|
+
id?: string | number;
|
|
11
|
+
title: string;
|
|
12
|
+
link?:
|
|
13
|
+
{
|
|
14
|
+
href: string;
|
|
15
|
+
target?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
background?: Background;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface IState
|
|
22
|
+
{
|
|
23
|
+
background?: Background;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class NSEntityCardBackground extends Component<IProps, IState> {
|
|
27
|
+
|
|
28
|
+
constructor(props: IProps)
|
|
29
|
+
{
|
|
30
|
+
super(props);
|
|
31
|
+
this.state = {
|
|
32
|
+
background: {
|
|
33
|
+
image: `url(${props.background?.image})`,
|
|
34
|
+
color: props.background?.color,
|
|
35
|
+
position: props.background?.position
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
override render()
|
|
41
|
+
{
|
|
42
|
+
return (
|
|
43
|
+
<>
|
|
44
|
+
<article className={Styles.card_background}
|
|
45
|
+
style=
|
|
46
|
+
{{
|
|
47
|
+
backgroundImage: this.state.background?.image,
|
|
48
|
+
backgroundColor: this.state.background?.color,
|
|
49
|
+
backgroundPosition: this.state.background?.position
|
|
50
|
+
}}
|
|
51
|
+
>
|
|
52
|
+
|
|
53
|
+
<p className={Styles.card_background_text}>
|
|
54
|
+
{this.props.title}
|
|
55
|
+
</p>
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
{this.props.link &&
|
|
59
|
+
<div className={Styles.ns_card_link_container}>
|
|
60
|
+
<a className={Styles.ns_link_absolute} href={this.props.link?.href} target={this.props.link?.target ?? "_self"} >
|
|
61
|
+
</a>
|
|
62
|
+
</div>
|
|
63
|
+
}
|
|
64
|
+
</article >
|
|
65
|
+
</>
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -10,7 +10,8 @@ interface IProps
|
|
|
10
10
|
{
|
|
11
11
|
scope: string;
|
|
12
12
|
name: string;
|
|
13
|
-
|
|
13
|
+
logo: string;
|
|
14
|
+
account?: boolean;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
interface IState
|
|
@@ -70,23 +71,27 @@ export class NSHeader extends React.Component<IProps, IState> {
|
|
|
70
71
|
<div className={`${Styles.ns_navbar_content} `} >
|
|
71
72
|
<div className={`${Styles.ns_navbar_elements} ${this.state.showNavbar && Styles.ns_navbar_active}`}>
|
|
72
73
|
{this.render_menu(0, null)}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
74
|
+
</div>
|
|
75
|
+
{this.props.account &&
|
|
76
|
+
<>
|
|
77
|
+
<div className={`${Styles.ns_navbar_login_status}`}>
|
|
78
|
+
<span className={`${Styles.ns_navbar_usersname}`}>name</span>
|
|
79
|
+
<img src='../assets/images/exit.svg'
|
|
80
|
+
alt="Exit"
|
|
81
|
+
width={20}
|
|
82
|
+
height={20}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
<div className={Styles.ns_navbar_menu_icon} onClick={this.handleShowNavbar}>
|
|
86
|
+
<img
|
|
87
|
+
src='../assets/images/menu.svg'
|
|
88
|
+
alt="Menu"
|
|
89
|
+
width={19}
|
|
90
|
+
height={17}
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
</>
|
|
94
|
+
}
|
|
90
95
|
</div>
|
|
91
96
|
</div>
|
|
92
97
|
</nav>
|
package/src/main.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./components/NSButtonGreen";
|
|
2
2
|
export * from "./components/NSButtonRed";
|
|
3
3
|
export * from "./components/NSCard";
|
|
4
|
+
export * from "./components/NSEntityCardBackground";
|
|
4
5
|
export * from "./components/NSEntityBar";
|
|
5
6
|
export * from "./components/NSFooter";
|
|
6
7
|
export * from "./components/NSHeader";
|