GithubHelp home page GithubHelp logo

matt-oakes / caprover-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from caprover/caprover-frontend

0.0 1.0 0.0 9.54 MB

Frontend App for https://github.com/caprover/caprover

JavaScript 1.56% HTML 0.49% TypeScript 97.39% Less 0.55%

caprover-frontend's Introduction

Frontend App for CapRover

This project was bootstrapped with Create React App.

Development

Run CapRover backend service in debug mode. Change .env.development to match your backend. Then run npm start

We strive to keep CapRover code base consistent. This will ensure a high level of consistency and lower maintenance load.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

Theming

CaprRover's fronted supports dark and light modes. It is based on antd colour schemes. Therefore, all used antd components within the project support both modes by default. However if we implement a custom component or want to change some global colors some steps needs to be considered.

Implement Dark Mode in custom component

To ensure your elements work with both dark and light modes, following points needs to be considered:

  • Don't use JSX inline styles for colors, use classNames instead and generate according rules within the app.less
  • Use antd variables as @layout-body-background, @body-background, @skeleton-color for the colors.
    • Use @layout-body-background for page backgrounds [#f0f2f5, #000]
    • Use @background-color-light for log views or input areas [#fafafa, rgba(255, 255, 255, 0.04)]
    • Use @body-background for elements within a card [#fff, #000]
    • Use @skeleton-color for all border colors. [#f2f2f2, #303030]
  • Use the class .inner-card for nested cards, like the network stats.
  • If you need additional colors, that are present within an antd component, grab the according variable located in ~antd/lib/style/themes/default.less

Dev Mode & Hot Reload

It can happen that modifying the app.less during npm run dev leads to FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory less. To overcome this, we need to set max-old-space-size.

export NODE_OPTIONS="--max-old-space-size=8192"

Global Variables

To add global less variables place them in styles/vars.less.

Override Antd specific Variables

To override antd specific colors modify the according constant in config-overrides.js -> [lightVars, darkVars].

Contribution

Thanks for contributing to the frontend code! Since contributors list for CapRover automatically picks up the contributors from the main backend repo, please make a minor update the frontend commit in the dockerfile, so your name will get displayed on the main page as a contributor.

https://github.com/caprover/caprover/blob/master/dockerfile-captain.release#L18

Learn More!

For more details and documentation, please visit https://CapRover.com

Backers

Thank you to all our backers! ๐Ÿ™

Contributors

Donate


caprover-frontend's People

Contributors

david-szabo97 avatar devnixs avatar drmrbrewer avatar emrysmyrddin avatar etienne-dldc avatar flomaetschke avatar githubsaturn avatar gnuns avatar horacehylee avatar hugojosefson avatar iamrommel avatar ilijanl avatar juanfrnz avatar kerolloz avatar lguzzon avatar mathiasm74 avatar mexaar avatar miyagui avatar mxdpeep avatar ngoyal16 avatar parcelcat avatar pedro-santiago avatar polotto avatar sidharthv96 avatar solomon23 avatar sztheory avatar tbroadley avatar vitalragaz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.