Skip to content

Commit

Permalink
feat: styling dashboard and include plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
farreledwin committed Jun 17, 2024
1 parent ecca583 commit c4f2306
Show file tree
Hide file tree
Showing 38 changed files with 1,818 additions and 186 deletions.
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,15 @@
"yarn": "1.22.19"
},
"packageManager": "yarn@1.22.1",
"version": "0.0.0"
"version": "0.0.0",
"dependencies": {
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/lab": "^5.0.0-alpha.170",
"@mui/material": "^5.15.20",
"@mui/x-charts": "^7.7.0",
"@mui/x-data-grid": "^7.7.0",
"@mui/x-date-pickers": "^7.7.0",
"mui": "^0.0.1"
}
}
24 changes: 18 additions & 6 deletions packages/core/client/src/powered-by/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,23 @@ export const PoweredBy = () => {
const appVersion = `<span class="nb-app-version">v${data?.data?.version}</span>`;

return (
<div
className={cx(style, 'nb-brand')}
dangerouslySetInnerHTML={{
__html: parseHTML(customBrandPlugin?.options?.options?.brand || `Powered by Rantir</a>`, { appVersion }),
}}
></div>
<div className="font-family-golos" style={{ marginTop: '2em' }}>
<div style={{ display: 'flex', justifyContent: 'center', color: '#00000073' }}>
<div>Rantir Cloud</div>
<div style={{ marginRight: '5em', marginLeft: '10em', color: '#00000073' }}>
<svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M7.49375 0.191407C3.62969 0.189844 0.5 3.31797 0.5 7.17891C0.5 10.232 2.45781 12.8273 5.18438 13.7805C5.55156 13.8727 5.49531 13.6117 5.49531 13.4336V12.2227C3.375 12.4711 3.28906 11.068 3.14688 10.8336C2.85938 10.343 2.17969 10.218 2.38281 9.98359C2.86563 9.73516 3.35781 10.0461 3.92813 10.8883C4.34063 11.4992 5.14531 11.3961 5.55313 11.2945C5.64219 10.9273 5.83281 10.5992 6.09531 10.3445C3.89844 9.95078 2.98281 8.61016 2.98281 7.01641C2.98281 6.24297 3.2375 5.53203 3.7375 4.95859C3.41875 4.01328 3.76719 3.20391 3.81406 3.08359C4.72188 3.00234 5.66563 3.73359 5.73906 3.79141C6.25469 3.65234 6.84375 3.57891 7.50313 3.57891C8.16563 3.57891 8.75625 3.65547 9.27656 3.79609C9.45313 3.66172 10.3281 3.03359 11.1719 3.11016C11.2172 3.23047 11.5578 4.0211 11.2578 4.95391C11.7641 5.52891 12.0219 6.2461 12.0219 7.0211C12.0219 8.61797 11.1 9.96016 8.89688 10.3477C9.08558 10.5332 9.23541 10.7546 9.33763 10.9987C9.43984 11.2428 9.49238 11.5049 9.49219 11.7695V13.5273C9.50469 13.668 9.49219 13.807 9.72656 13.807C12.4938 12.8742 14.4859 10.2602 14.4859 7.18047C14.4859 3.31797 11.3547 0.191407 7.49375 0.191407Z"
fill="black"
fillOpacity="0.45"
/>
</svg>
</div>
<div style={{ color: '#00000073' }}>Made With Love From Rantir</div>
</div>
<div style={{ textAlign: 'center', marginTop: '1em', color: '#00000073' }}>
<span>Copyright ©2024 Rantir, Inc. All rights reserved. Join us in the AI, No-Code Revolution</span>
</div>
</div>
);
};
9 changes: 4 additions & 5 deletions packages/core/client/src/user/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ const SettingsMenu: React.FC<{
disabled: true,
label: (
<div style={{ cursor: 'text' }}>
<div style={{ color: token.colorText }}>NocoBase</div>
<div style={{ fontSize: '0.8em', color: token.colorTextDescription }}>v{data?.data?.version}</div>
<div style={{ color: token.colorText }}>Rantir</div>
</div>
),
},
Expand All @@ -48,7 +47,7 @@ const SettingsMenu: React.FC<{
{
key: 'homePage',
label: (
<a href={isSimplifiedChinese ? 'https://cn.nocobase.com/' : 'https://www.nocobase.com'} target="__blank">
<a href={isSimplifiedChinese ? 'https://www.rantir.com/' : 'https://www.rantir.com/'} target="__blank">
{t('Home page')}
</a>
),
Expand All @@ -57,7 +56,7 @@ const SettingsMenu: React.FC<{
key: 'userManual',
label: (
<a
href={isSimplifiedChinese ? 'https://docs-cn.nocobase.com/handbook' : 'https://docs.nocobase.com/handbook'}
href={isSimplifiedChinese ? 'https://www.rantir.com/support' : 'https://www.rantir.com/support'}
target="__blank"
>
{t('Handbook')}
Expand All @@ -67,7 +66,7 @@ const SettingsMenu: React.FC<{
{
key: 'license',
label: (
<a href="https://github.com/nocobase/nocobase/blob/main/LICENSE-AGPL" target="__blank">
<a href="https://www.rantir.com/license" target="__blank">
{t('License')}
</a>
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import React from 'react';
import { ConfigProvider } from 'antd';
import { SchemaComponentOptions } from '@nocobase/client';
import './customstyles.css';
import './modifyicon.js';

const customStyles = {
backgroundColor: '#FFFF00', // Dark blue background
Expand All @@ -34,45 +35,6 @@ const CustomThemeProvider: React.FC = ({ children }) => {
},
}}
>
<style>{`
body {
background-color: ${customStyles.backgroundColor} !important;
color: ${customStyles.textColor} !important;
}
.ant-page-header {
color: black !important;
}
.ant-page-header * {
color: ${customStyles.textColor} !important;
}
.ant-page-header span {
color: ${customStyles.textColor} !important;
}
.css-junazh {
display: ${customStyles.hiddenElementDisplay} !important;
}
.ant-card {
background-color: rgb(231, 231, 231) !important;
border-color: ${customStyles.borderColor} !important;
}
.ant-typography {
color: ${customStyles.textColor} !important;
}
a {
color: ${customStyles.linkColor} !important;
}
.ant-layout-header {
background-color: #000 !important;
}
button[data-testid="schema-initializer-Menu-header"] {
border-color: #FFAB2E !important;
color: #FFAB2E !important;
border-radius: 0rem !important;
border-style: solid !important;
}
`}</style>
<SchemaComponentOptions components={{}}>{children}</SchemaComponentOptions>
</ConfigProvider>
);
Expand Down
Binary file not shown.
112 changes: 7 additions & 105 deletions packages/plugins/@my-project/plugin-theme/src/client/customstyles.css
Original file line number Diff line number Diff line change
@@ -1,110 +1,12 @@
.ant-popover-inner {
background-color: white !important;
border-radius: 4px;
}

.ant-popover-inner .ant-popover-inner-content {
padding: 0 !important;
}

.ant-nb-schema-initializer-menu-item {
background-color: white !important;
color: black !important;
padding: 4px 6px;
border-radius: 4px;
font-size: 11px !important;
margin: 4px 0;
}

.ant-nb-schema-initializer-menu-item:hover {
background-color: #333 !important;
}

/* Menu Background */
.ant-menu {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Menu Headers */
.ant-menu-item-group-title {
font-weight: bold;
font-size: 14px;
color: #000000;
}

/* Menu Items */
.ant-menu-item {
font-size: 14px;
color: #000000;
padding: 8px 16px;
}

.ant-menu-item .anticon {
color: white;
}

.ant-menu-item:hover {
background-color: #F5F5F5;
color: #000000;
}

/* Install New Blocks Button */
.ant-btn {
background-color: #FFFFFF;
padding: 0px 16px;
font-size: 14px;
color: #000000;
border-radius: 0px;
}

.ant-btn:hover {
background-color: #211E1E !important;
color: #FFF !important;
border:0px !important;
}

.css-17black {
position: relative;
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-align-items: center;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
background-color: rgb(47, 47, 47);
padding: 0 20px;

height: 30px;
border-radius: 7px;
color: white;
font-size: 12px;
}

.ant-layout-header {
background-color: yellow !important;
}
.ant-menu-submenu .ant-menu-submenu-vertical {
color:black;
}

.ant-menu-submenu-title {
color: black;
}

span.ant-page-header-heading-title {
color: black !important;
.css-1o1fqc9 {
bottom: -30px !important;
}

.anticon {
color:black;
@font-face {
font-family: GolosText;
src: url('./GolosText-VariableFont_wght.ttf');
}

.ant-menu-title-content {
color: black;
.font-family-golos {
font-family: GolosText;
}
Loading

0 comments on commit c4f2306

Please sign in to comment.