diff --git a/.gitignore b/.gitignore index b7aa0f000ec071aa3396d0f1b27c1be37bbf6600..fe3291cd80a1f65ccfec7caa6f9426e7d9974d99 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ SAS/OTB/jRSP/autoconf_share SAS/OTB/jRSP/bootstrap SAS/OTB/jRSP/configure.in **/.idea +SAS/TMSS/frontend/tmss_webapp/package-lock.json +SAS/TMSS/frontend/tmss_webapp/node_modules/ diff --git a/SAS/TMSS/frontend/tmss_webapp/README.md b/SAS/TMSS/frontend/tmss_webapp/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9c40dcdc3d8c852db2b42a2da2d8f867029378b4 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/README.md @@ -0,0 +1,68 @@ +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `yarn start` + +Runs the app in the development mode.<br /> +Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.<br /> +You will also see any lint errors in the console. + +### `yarn test` + +Launches the test runner in the interactive watch mode.<br /> +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `yarn build` + +Builds the app for production to the `build` folder.<br /> +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.<br /> +Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `yarn eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). + +### Code Splitting + +This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting + +### Analyzing the Bundle Size + +This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size + +### Making a Progressive Web App + +This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app + +### Advanced Configuration + +This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration + +### Deployment + +This section has moved here: https://facebook.github.io/create-react-app/docs/deployment + +### `yarn build` fails to minify + +This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify diff --git a/SAS/TMSS/frontend/tmss_webapp/package.json b/SAS/TMSS/frontend/tmss_webapp/package.json new file mode 100644 index 0000000000000000000000000000000000000000..b5328e779ebfa77c91b24d16cf90c040bc06e3a4 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/package.json @@ -0,0 +1,51 @@ +{ + "name": "tmss_gui", + "version": "0.1.0", + "private": true, + "dependencies": { + "@json-editor/json-editor": "^2.3.0", + "@testing-library/jest-dom": "^4.2.4", + "@testing-library/react": "^9.3.2", + "@testing-library/user-event": "^7.1.2", + "axios": "^0.19.2", + "font-awesome": "^4.7.0", + "history": "^5.0.0", + "node-sass": "^4.12.0", + "primeflex": "^1.3.0", + "primeicons": "^4.0.0", + "primereact": "^4.2.2", + "react": "^16.13.1", + "react-app-polyfill": "^1.0.6", + "react-bootstrap": "^1.0.1", + "react-bootstrap-datetimepicker": "0.0.22", + "react-dom": "^16.13.1", + "react-frame-component": "^4.1.2", + "react-json-view": "^1.19.1", + "react-router-dom": "^5.2.0", + "react-scripts": "3.4.1", + "react-transition-group": "^1.2.1", + "typescript": "^3.9.5", + "yup": "^0.29.1" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/SAS/TMSS/frontend/tmss_webapp/public/favicon.ico b/SAS/TMSS/frontend/tmss_webapp/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..eb16acbe5ecd12aa72a0fdf8c46031ba410c4f7e Binary files /dev/null and b/SAS/TMSS/frontend/tmss_webapp/public/favicon.ico differ diff --git a/SAS/TMSS/frontend/tmss_webapp/public/index.html b/SAS/TMSS/frontend/tmss_webapp/public/index.html new file mode 100644 index 0000000000000000000000000000000000000000..4d5295648ddd04e625e8c19fb890c91f89629b5f --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/public/index.html @@ -0,0 +1,43 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8" /> + <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> + <meta name="viewport" content="width=device-width, initial-scale=1" /> + <meta name="theme-color" content="#000000" /> + <meta + name="description" + content="Telescope Manager Specification System" + /> + <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> + <!-- + manifest.json provides metadata used when your web app is installed on a + user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ + --> + <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> + <!-- + Notice the use of %PUBLIC_URL% in the tags above. + It will be replaced with the URL of the `public` folder during the build. + Only files inside the `public` folder can be referenced from the HTML. + + Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will + work correctly both with client-side routing and a non-root public URL. + Learn how to configure a non-root public URL by running `npm run build`. + --> + <title>TMSS</title> + </head> + <body> + <noscript>You need to enable JavaScript to run this app.</noscript> + <div id="root"></div> + <!-- + This HTML file is a template. + If you open it directly in the browser, you will see an empty page. + + You can add webfonts, meta tags, or analytics to this file. + The build step will place the bundled scripts into the <body> tag. + + To begin the development, run `npm start` or `yarn start`. + To create a production bundle, use `npm run build` or `yarn build`. + --> + </body> +</html> diff --git a/SAS/TMSS/frontend/tmss_webapp/public/manifest.json b/SAS/TMSS/frontend/tmss_webapp/public/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..080d6c77ac21bb2ef88a6992b2b73ad93daaca92 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/public/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/SAS/TMSS/frontend/tmss_webapp/public/robots.txt b/SAS/TMSS/frontend/tmss_webapp/public/robots.txt new file mode 100644 index 0000000000000000000000000000000000000000..e9e57dc4d41b9b46e05112e9f45b7ea6ac0ba15e --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/SAS/TMSS/frontend/tmss_webapp/src/App.css b/SAS/TMSS/frontend/tmss_webapp/src/App.css new file mode 100644 index 0000000000000000000000000000000000000000..18ccb9475ca09cfadf5cd73e300c156090c9812f --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/App.css @@ -0,0 +1,39 @@ +.App { + /* text-align: center; */ +} + +.App-logo { + height: 40vmin; + pointer-events: none; +} + +@media (prefers-reduced-motion: no-preference) { + .App-logo { + animation: App-logo-spin infinite 20s linear; + } +} + +.App-header { + background-color: #303d59; + height: 50px; + display: flex; + flex-direction: column; + /* align-items: center; */ + justify-content: center; + font-size: calc(10px + 2vmin); + color: white; + padding-left: 10px; +} + +.App-link { + color: #61dafb; +} + +@keyframes App-logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/App.js b/SAS/TMSS/frontend/tmss_webapp/src/App.js new file mode 100644 index 0000000000000000000000000000000000000000..0d607d738c330273f30c7f9dc5a6421c4a0069c7 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/App.js @@ -0,0 +1,62 @@ +import React, {Component} from 'react'; +import { BrowserRouter as Router } from 'react-router-dom'; + +import {AppTopbar} from './layout/components/AppTopbar'; +import {AppMenu} from './layout/components/AppMenu'; +import { AppFooter } from './layout/components/AppFooter'; +import {RoutedContent} from './routes'; + +// import {Dashboard} from './routes/dashboard/dashboard'; + +import './layout/layout.scss'; +// import './App.css'; + + +class App extends Component { + + constructor() { + super(); + this.state = { + currentMenu: '', + currentPath: '/' + } + this.onMenuItemClick = this.onMenuItemClick.bind(this) + this.menu = [ + {label: 'Dashboard', icon: 'pi pi-fw pi-home', to:'/dashboard'}, + {label: 'Scheduling Units', icon: 'pi pi-fw pi-calendar', to:'/scheduling'} + ]; + + // this.menuComponent = {'Dashboard': Dashboard} + } + + onMenuItemClick(event) { + console.log(event); + this.setState({currentMenu:event.item.label, currentPath: event.item.path}); + } + + render() { + return ( + <React.Fragment> + <div className="App"> + + <AppTopbar></AppTopbar> + <Router basename={ this.state.currentPath }> + <AppMenu model={this.menu} onMenuItemClick={this.onMenuItemClick} /> + <div className="layout-wrapper layout-static layout-static-sidebar-active"> + <div className="layout-main"> + + <RoutedContent /> + + </div> + </div> + </Router> + <AppFooter></AppFooter> + + + </div> + </React.Fragment> + ); + } +} + +export default App; diff --git a/SAS/TMSS/frontend/tmss_webapp/src/App.test.js b/SAS/TMSS/frontend/tmss_webapp/src/App.test.js new file mode 100644 index 0000000000000000000000000000000000000000..6b91e5f1e9ffaab1e20239b210818532ce90a08b --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/App.test.js @@ -0,0 +1,9 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import App from './App'; + +test('renders ASTRON in footer', () => { + const { getByText } = render(<App />); + const linkElement = getByText("ASTRON"); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/index.css b/SAS/TMSS/frontend/tmss_webapp/src/index.css new file mode 100644 index 0000000000000000000000000000000000000000..ec2585e8c0bb8188184ed1e0703c4c8f2a8419b0 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/index.css @@ -0,0 +1,13 @@ +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/index.js b/SAS/TMSS/frontend/tmss_webapp/src/index.js new file mode 100644 index 0000000000000000000000000000000000000000..f5185c1ec7a5dccf30b55a8e3f89afc3eca764a1 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/index.js @@ -0,0 +1,17 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; +import * as serviceWorker from './serviceWorker'; + +ReactDOM.render( + <React.StrictMode> + <App /> + </React.StrictMode>, + document.getElementById('root') +); + +// If you want your app to work offline and load faster, you can change +// unregister() to register() below. Note this comes with some pitfalls. +// Learn more about service workers: https://bit.ly/CRA-PWA +serviceWorker.unregister(); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/_overrides.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/_overrides.scss new file mode 100644 index 0000000000000000000000000000000000000000..850b92b170e5957de7638ac69233197a155174af --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/_overrides.scss @@ -0,0 +1 @@ +//Suggested location to add your overrides so that migration would be easy by just updating the SASS folder in the future \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/_variables.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/_variables.scss new file mode 100644 index 0000000000000000000000000000000000000000..cfb153f3cea23fd4b18dcc389dc39af723fe7a52 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/_variables.scss @@ -0,0 +1,46 @@ +/* General */ +$fontSize:14px; +$bodyBgColor:#edf0f5; +$textColor:#333333; +$textSecondaryColor:#707070; +$borderRadius:3px; +$dividerColor:#e3e3e3; +$transitionDuration:.2s; +$maskBgColor:#424242; + +/* Menu Common */ +$menuitemBadgeBgColor:#007be5; +$menuitemBadgeColor:#ffffff; +$submenuFontSize:13px; +$menuitemActiveRouteColor:#1fa1fc; + +/* Menu Light */ +$menuBgColorFirst:#f3f4f9; +$menuBgColorLast:#d7dbe8; +$menuitemColor:#232428; +$menuitemHoverColor:#0388e5; +$menuitemActiveColor:#0388e5; +$menuitemActiveBgColor:#ffffff; +$menuitemBorderColor:rgba(207, 211, 224, 0.6); + +/* Menu Dark */ +$menuDarkBgColorFirst:#ffffff; +$menuDarkBgColorLast:#ffffff; +$menuitemDarkColor:#0388e5; +$menuitemDarkHoverColor:#0388e5; +$menuitemDarkActiveColor:#0388e5; +$menuitemDarkActiveBgColor:#ffffff; +$menuitemDarkBorderColor:rgba(246, 248, 252, 0.918); + +/* Topbar */ +$topbarLeftBgColor:#3d4977; +$topbarRightBgColor:#3d4977; +$topbarItemBadgeBgColor:#ef6262; +$topbarItemBadgeColor:#ffffff; +$topbarItemColor:#ffffff; +$topbarItemHoverColor:#c3e8fb; +$topbarSearchInputBorderBottomColor:#ffffff; +$topbarSearchInputColor:#ffffff; + +/* Footer */ +$footerBgColor:#ffffff; \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppFooter.js b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppFooter.js new file mode 100644 index 0000000000000000000000000000000000000000..27edea6d5758942eaf4582237ed240d18b554082 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppFooter.js @@ -0,0 +1,14 @@ +import React, { Component } from 'react'; + +export class AppFooter extends Component { + + render() { + return ( + <div className="layout-footer"> + <span className="footer-text" style={{'marginRight': '5px'}}><strong>TMSS</strong> by <strong>ASTRON</strong></span> + </div> + ); + } +} + +export default AppFooter; \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppFooter.test.js b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppFooter.test.js new file mode 100644 index 0000000000000000000000000000000000000000..fed16b1eb682162af3c51f16a5cf79527fb3ab19 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppFooter.test.js @@ -0,0 +1,9 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import AppFooter from './AppFooter'; + +test('renders ASTRON in footer', () => { + const { getByText } = render(<AppFooter />); + const linkElement = getByText("ASTRON"); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppMenu.js b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppMenu.js new file mode 100644 index 0000000000000000000000000000000000000000..7f0e4e18c1ee09448b7ed7f2330702f7b3d875dc --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppMenu.js @@ -0,0 +1,137 @@ +import React, { Component } from 'react'; +import {NavLink} from 'react-router-dom' +import PropTypes from 'prop-types'; +import classNames from 'classnames'; + +class AppSubmenu extends Component { + + static defaultProps = { + className: null, + items: null, + onMenuItemClick: null, + root: false, + permissions: null + + } + + static propTypes = { + className: PropTypes.string, + items: PropTypes.array, + onMenuItemClick: PropTypes.func, + root: PropTypes.bool, + permissions: PropTypes.array + } + + constructor(props) { + super(props); + this.state = {activeIndex: null}; + } + + onMenuItemClick(event, item, index) { + //avoid processing disabled items + if(item.disabled) { + event.preventDefault(); + return true; + } + + //execute command + if(item.command) { + item.command({originalEvent: event, item: item}); + } + + if(index === this.state.activeIndex) + this.setState({activeIndex: null}); + else + this.setState({activeIndex: index}); + + if(this.props.onMenuItemClick) { + this.props.onMenuItemClick({ + originalEvent: event, + item: item + }); + } + } + + renderLinkContent(item) { + let submenuIcon = item.items && <i className="pi pi-fw pi-angle-down menuitem-toggle-icon"></i>; + let badge = item.badge && <span className="menuitem-badge">{item.badge}</span>; + + return ( + <React.Fragment> + <i className={item.icon}></i> + <span>{item.label}</span> + {submenuIcon} + {badge} + </React.Fragment> + ); + } + + renderLink(item, i) { + let content = this.renderLinkContent(item); + + if (item.to) { + return ( + <NavLink activeClassName="active-route" to={item.to} onClick={(e) => this.onMenuItemClick(e, item, i)} exact target={item.target}> + {content} + </NavLink> + ) + } + else { + return ( + <a href={item.url} onClick={(e) => this.onMenuItemClick(e, item, i)} target={item.target}> + {content} + </a> + ); + + } + } + + render() { + + let items = this.props.items && this.props.items.map((item, i) => { + let active = this.state.activeIndex === i; + // let styleClass = classNames(item.badgeStyleClass, {'active-menuitem': active && !item.to}); + let styleClass = classNames(item.badgeStyleClass, {'active-menuitem': active && item.to}); + console.log(item.badgeStyleClass); + console.log(i); + console.log(this.state.activeIndex); + console.log(active); + console.log(styleClass); + return ( + <li className={styleClass} key={i}> + {item.items && this.props.root===true && <div className='arrow'></div>} + {this.renderLink(item, i)} + <AppSubmenu items={item.items} onMenuItemClick={this.props.onMenuItemClick}/> + </li> + ); + + }); + + return items ? <ul className={this.props.className}>{items}</ul> : null; + } +} + +export class AppMenu extends Component { + + static defaultProps = { + model: null, + onMenuItemClick: null + } + + static propTypes = { + model: PropTypes.array, + onMenuItemClick: PropTypes.func + } + + render() { + // console.log(authenticationService.currentUserValue); + return ( + <div className={'layout-sidebar layout-sidebar-light'} > + <div className="layout-menu-container"> + {/* <AppSubmenu items={this.props.model} permissions={authenticationService.currentUserValue.permissions} className="layout-menu" onMenuItemClick={this.props.onMenuItemClick} root={true}/> */} + <AppSubmenu items={this.props.model} className="layout-menu" onMenuItemClick={this.props.onMenuItemClick} root={true}/> + </div> + </div> + ); + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppTopbar.js b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppTopbar.js new file mode 100644 index 0000000000000000000000000000000000000000..ccd16881c0a2f108516bd1fc3a40e723cb6da71f --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/components/AppTopbar.js @@ -0,0 +1,39 @@ + +import React, {Component} from 'react'; +import 'primeicons/primeicons.css'; +import 'primereact/resources/themes/nova-light/theme.css'; +import 'primereact/resources/primereact.css'; +import 'primeflex/primeflex.css'; + +// import { PropTypes } from 'prop-types'; + + + export class AppTopbar extends Component { + + // constructor(props) { + // super(props); + // } + + + // static defaultProps = { + // onToggleMenu: null + // } + + + // static propTypes = { + // onToggleMenu: PropTypes.func + // } + + render() { + return ( + <React.Fragment> + <div className="layout-wrapper layout-static layout-static-sidebar-inactive"> + <div className="layout-topbar clearfix"> + <button className="p-link layout-menu-button"><i className="pi pi-bars"></i></button> + <span className="header-title">TMSS</span> + </div> + </div> + </React.Fragment> + ) + } +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/layout.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/layout.scss new file mode 100644 index 0000000000000000000000000000000000000000..5980a6378545ea73371eef791355b27aba58dd6d --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/layout.scss @@ -0,0 +1,3 @@ +@import "./_variables"; +@import "./sass/_layout"; +@import "./_overrides"; \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_content.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_content.scss new file mode 100644 index 0000000000000000000000000000000000000000..693a30ddbfb3214511538caff487fcd8bb9c1a8f --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_content.scss @@ -0,0 +1,6 @@ +.layout-main { + @include transition(margin-left $transitionDuration); + padding: 60px 16px 16px 16px; + min-height: 95vh; + background-color: white; +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_dashboard.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_dashboard.scss new file mode 100644 index 0000000000000000000000000000000000000000..8fd362957dac1f26dd3c9b6089352a2e51f6baf8 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_dashboard.scss @@ -0,0 +1,234 @@ +/* Dashboard */ +.dashboard { + .summary-box.summary-box-projects .card { + border-top: 4px solid #0097a7; + background-color: hsl(187, 100%, 42%); + } + .summary-box.summary-box-activeschedules .card { + border-top: 4px solid #ad1457; + background-color: #e91e63; + } + .summary-box.summary-box-taskcompleted .card { + border-top: 4px solid #f47b08; + background-color: #ffb300; + } + .summary-box.summary-box-activetask .card { + border-top: 4px solid #455a64; + background-color: #607d8b; + } + .summary-box { + position: relative; + } + .summary-box .card { + min-height: 100px; + } + .summary-box-icon{ + position: absolute; + right: 24px; + top: 32px; + } + .card { + height: 100%; + margin-bottom: 0; + } + .summary { + position: relative; + + .title { + font-size: 20px; + } + + .detail { + color: $textSecondaryColor; + display: block; + margin-top: 10px; + } + + .count { + color: #ffffff; + position: absolute; + top: 10px; + right: 10px; + font-size: 10px; + padding: 7px 14px; + @include border-radius($borderRadius); + + &.visitors { + background-color: #20d077; + } + + &.purchases { + background-color: #f9c851; + } + + &.revenue { + background-color: #007be5; + } + } + } + + .highlight-box { + height: 100px; + @include clearfix(); + + .initials { + height: 100%; + float: left; + width: 50%; + text-align: center; + padding: 1em; + + > span { + font-size: 48px; + } + } + + .highlight-details { + height: 100%; + background-color: #ffffff; + float: left; + width: 50%; + padding: 1em; + + i { + font-size: 24px; + vertical-align: middle; + margin-right: .25em; + } + + .count { + color: $textSecondaryColor; + font-size: 20px; + display: block; + } + } + } + + .task-list { + list-style-type: none; + margin: 0; + padding: 0; + + li { + padding: .5em .25em; + border-bottom: 1px solid $dividerColor; + @include clearfix(); + } + + .p-checkbox { + vertical-align: middle; + margin-right: .5em; + } + + .task-name { + vertical-align: middle; + } + + i { + float: right; + font-size: 24px; + color: $textSecondaryColor; + } + + .p-panel-content { + min-height: 256px; + } + } + + .contact-form { + .p-panel-content { + min-height: 256px; + } + } + + .contacts { + + ul { + list-style-type: none; + padding: 0; + margin: 0; + + li { + border-bottom: 1px solid $dividerColor; + + button { + padding: 9px; + width: 100%; + box-sizing: border-box; + text-decoration: none; + position: relative; + display: block; + @include border-radius(2px); + @include transition(background-color .2s); + + .name { + position: absolute; + right: 10px; + top: 10px; + font-size: 18px; + } + + .email { + position: absolute; + right: 10px; + top: 30px; + font-size: 14px; + color: $textSecondaryColor; + } + + &:hover { + cursor: pointer; + background-color: #eeeeee; + } + } + + &:last-child { + border: 0; + } + } + } + + .p-panel-content { + min-height: 256px; + } + } + + .activity-list { + list-style-type: none; + padding: 0; + margin: 0; + + li { + border-bottom: 1px solid $dividerColor; + padding: 16px 8px; + + .count { + font-size: 24px; + color: #ffffff; + background-color: #007be5; + font-weight: 700; + display: inline-block; + padding: .25em .5em; + @include border-radius($borderRadius); + } + + &:first-child { + border-top: 1px solid $dividerColor; + } + + &:last-child { + border: 0; + } + + .p-g-6:first-child { + font-size: 18px; + padding-left: 0; + } + + .p-g-6:last-child { + text-align: right; + color: $textSecondaryColor; + } + } + } +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_editor.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_editor.scss new file mode 100644 index 0000000000000000000000000000000000000000..c1ab91ab97c61072018d69751b4be94eba6d6e1f --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_editor.scss @@ -0,0 +1,797 @@ +/*! + * Quill Editor v1.0.0-beta.3 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */ +.ql-container { + box-sizing: border-box; + font-family: Helvetica, Arial, sans-serif; + font-size: 13px; + height: 100%; + margin: 0px; + position: relative; +} +.ql-clipboard { + left: -100000px; + position: absolute; + top: 50%; +} +.ql-clipboard p { + margin: 0; + padding: 0; +} +.ql-editor { + box-sizing: border-box; + cursor: text; + line-height: 1.42; + height: 100%; + outline: none; + overflow-y: auto; + padding: 12px 15px; + tab-size: 4; + text-align: left; + white-space: pre-wrap; +} +.ql-editor p, +.ql-editor ol, +.ql-editor ul, +.ql-editor pre, +.ql-editor blockquote, +.ql-editor h1, +.ql-editor h2, +.ql-editor h3, +.ql-editor h4, +.ql-editor h5, +.ql-editor h6 { + margin: 0; + padding: 0; + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8; +} +.ql-editor ol { + padding-left: 20px; +} +.ql-editor ul { + padding-left: 8px; + list-style: disc inside; +} +.ql-editor ol > li { + list-style-type: none; +} +.ql-editor ol { + list-style-type: none; + position: relative; +} +.ql-editor ol li { + counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8; + counter-increment: list-num; +} +.ql-editor ol li:before { + content: counter(list-num, decimal) '. '; + margin-right: -16px; + position: absolute; + right: 100%; + text-align: right; +} +.ql-editor ol li.ql-indent-1 { + counter-increment: list-1; +} +.ql-editor ol li.ql-indent-1:before { + content: counter(list-1, lower-alpha) '. '; + margin-right: -56px; +} +.ql-editor ol li.ql-indent-1 { + counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8; +} +.ql-editor ol li.ql-indent-2 { + counter-increment: list-2; +} +.ql-editor ol li.ql-indent-2:before { + content: counter(list-2, lower-roman) '. '; + margin-right: -96px; +} +.ql-editor ol li.ql-indent-2 { + counter-reset: list-3 list-4 list-5 list-6 list-7 list-8; +} +.ql-editor ol li.ql-indent-3 { + counter-increment: list-3; +} +.ql-editor ol li.ql-indent-3:before { + content: counter(list-3, decimal) '. '; + margin-right: -136px; +} +.ql-editor ol li.ql-indent-3 { + counter-reset: list-4 list-5 list-6 list-7 list-8; +} +.ql-editor ol li.ql-indent-4 { + counter-increment: list-4; +} +.ql-editor ol li.ql-indent-4:before { + content: counter(list-4, lower-alpha) '. '; + margin-right: -176px; +} +.ql-editor ol li.ql-indent-4 { + counter-reset: list-5 list-6 list-7 list-8; +} +.ql-editor ol li.ql-indent-5 { + counter-increment: list-5; +} +.ql-editor ol li.ql-indent-5:before { + content: counter(list-5, lower-roman) '. '; + margin-right: -216px; +} +.ql-editor ol li.ql-indent-5 { + counter-reset: list-6 list-7 list-8; +} +.ql-editor ol li.ql-indent-6 { + counter-increment: list-6; +} +.ql-editor ol li.ql-indent-6:before { + content: counter(list-6, decimal) '. '; + margin-right: -256px; +} +.ql-editor ol li.ql-indent-6 { + counter-reset: list-7 list-8; +} +.ql-editor ol li.ql-indent-7 { + counter-increment: list-7; +} +.ql-editor ol li.ql-indent-7:before { + content: counter(list-7, lower-alpha) '. '; + margin-right: -296px; +} +.ql-editor ol li.ql-indent-7 { + counter-reset: list-8; +} +.ql-editor ol li.ql-indent-8 { + counter-increment: list-8; +} +.ql-editor ol li.ql-indent-8:before { + content: counter(list-8, lower-roman) '. '; + margin-right: -336px; +} +.ql-editor .ql-indent-1 { + padding-left: 40px; +} +.ql-editor .ql-indent-2 { + padding-left: 80px; +} +.ql-editor .ql-indent-3 { + padding-left: 120px; +} +.ql-editor .ql-indent-4 { + padding-left: 160px; +} +.ql-editor .ql-indent-5 { + padding-left: 200px; +} +.ql-editor .ql-indent-6 { + padding-left: 240px; +} +.ql-editor .ql-indent-7 { + padding-left: 280px; +} +.ql-editor .ql-indent-8 { + padding-left: 320px; +} +.ql-editor .ql-video { + display: block; +} +.ql-editor .ql-video.ql-align-center { + margin: 0 auto; +} +.ql-editor .ql-video.ql-align-right { + margin: 0 0 0 auto; +} +.ql-editor .ql-bg-black { + background-color: #000; +} +.ql-editor .ql-bg-red { + background-color: #e60000; +} +.ql-editor .ql-bg-orange { + background-color: #f90; +} +.ql-editor .ql-bg-yellow { + background-color: #ff0; +} +.ql-editor .ql-bg-green { + background-color: #008a00; +} +.ql-editor .ql-bg-blue { + background-color: #06c; +} +.ql-editor .ql-bg-purple { + background-color: #93f; +} +.ql-editor .ql-color-white { + color: #fff; +} +.ql-editor .ql-color-red { + color: #e60000; +} +.ql-editor .ql-color-orange { + color: #f90; +} +.ql-editor .ql-color-yellow { + color: #ff0; +} +.ql-editor .ql-color-green { + color: #008a00; +} +.ql-editor .ql-color-blue { + color: #06c; +} +.ql-editor .ql-color-purple { + color: #93f; +} +.ql-editor .ql-font-serif { + font-family: Georgia, Times New Roman, serif; +} +.ql-editor .ql-font-monospace { + font-family: Monaco, Courier New, monospace; +} +.ql-editor .ql-size-small { + font-size: 10px; +} +.ql-editor .ql-size-large { + font-size: 18px; +} +.ql-editor .ql-size-huge { + font-size: 32px; +} +.ql-editor .ql-direction-rtl { + direction: rtl; + text-align: inherit; +} +.ql-editor .ql-align-center { + text-align: center; +} +.ql-editor .ql-align-justify { + text-align: justify; +} +.ql-editor .ql-align-right { + text-align: right; +} +.ql-editor.ql-blank::before { + color: rgba(0,0,0,0.6); + content: attr(data-placeholder); + font-style: italic; + pointer-events: none; + position: absolute; +} +.ql-hidden { + display: none; +} +.ql-tooltip { + position: absolute; +} +.ql-tooltip a { + cursor: pointer; + text-decoration: none; +} +.ql-toolbar:before, +.ql-toolbar:after { + content: ' '; + display: table; +} +.ql-toolbar:after { + clear: both; +} +.ql-toolbar button { + background: none; + border: none; + cursor: pointer; + display: inline-block; + float: left; + height: 24px; + outline: none; + padding: 3px 5px; + width: 24px; +} +.ql-toolbar button svg { + height: 100%; +} +.ql-toolbar .ql-stroke { + fill: none; + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 2; +} +.ql-toolbar .ql-stroke-mitter { + fill: none; + stroke-mitterlimit: 10; + stroke-width: 2; +} +.ql-toolbar .ql-empty { + fill: none; +} +.ql-toolbar .ql-even { + fill-rule: evenodd; +} +.ql-toolbar .ql-thin, +.ql-toolbar .ql-stroke.ql-thin { + stroke-width: 1; +} +.ql-toolbar .ql-transparent { + opacity: 0.4; +} +.ql-editor h1 { + font-size: 2em; +} +.ql-editor h2 { + font-size: 1.5em; +} +.ql-editor h3 { + font-size: 1.17em; +} +.ql-editor h4 { + font-size: 1em; +} +.ql-editor h5 { + font-size: 0.83em; +} +.ql-editor h6 { + font-size: 0.67em; +} +.ql-editor pre { + white-space: pre-wrap; +} +.ql-editor a { + text-decoration: underline; +} +.ql-editor blockquote { + border-left: 4px solid #ccc; + margin-bottom: 5px; + margin-top: 5px; + padding-left: 16px; +} +.ql-editor pre.hljs { + overflow: visible; +} +.ql-editor code, +.ql-editor pre:not(.hljs) { + background-color: #f0f0f0; +} +.ql-editor code, +.ql-editor pre { + border-radius: 3px; +} +.ql-editor code { + font-size: 85%; + padding-bottom: 2px; + padding-top: 2px; +} +.ql-editor code:before, +.ql-editor code:after { + content: "\A0"; + letter-spacing: -2px; +} +.ql-editor *:not(pre) + pre, +.ql-editor pre:first-of-type { + margin-top: 5px; + padding-top: 5px; +} +.ql-editor pre { + margin-bottom: 5px; + padding: 0px 10px 5px; +} +.ql-editor pre + pre { + margin-top: -10px; +} +.ql-editor img { + max-width: 100%; +} +.ql-snow .ql-image-tooltip { + padding: 10px; + text-align: center; + width: 300px; +} +.ql-snow .ql-image-tooltip input[type=text] { + height: 30px; + width: 100%; +} +.ql-snow .ql-image-tooltip a.ql-cancel, +.ql-snow .ql-image-tooltip a.ql-action { + border: 1px solid #06c; + display: inline-block; + float: left; + line-height: 18px; + padding: 5px; + width: 50%; +} +.ql-snow .ql-image-tooltip a.ql-cancel::before { + color: #06c; + content: 'Cancel'; +} +.ql-snow .ql-image-tooltip a.ql-action { + background-color: #06c; +} +.ql-snow .ql-image-tooltip a.ql-action::before { + color: #fff; + content: 'Insert'; +} +.ql-snow .ql-image-tooltip .ql-preview { + height: 200px; + margin: 10px 0px; + position: relative; +} +.ql-snow .ql-image-tooltip .ql-preview img { + bottom: 0; + left: 0; + margin: auto; + max-height: 100%; + max-width: 100%; + position: absolute; + right: 0; + top: 0; +} +.ql-snow .ql-image-tooltip .ql-empty.ql-preview::before { + border: 1px dashed #ccc; + color: #ccc; + content: 'Preview'; + display: block; + line-height: 200px; +} +.ql-snow .ql-link-tooltip::before { + content: "Visit URL:"; + line-height: 26px; + margin-right: 8px; +} +.ql-snow .ql-link-tooltip { + margin-top: 10px; + padding: 5px 12px; + white-space: nowrap; +} +.ql-snow .ql-link-tooltip input[type=text] { + display: none; + height: 26px; + width: 170px; +} +.ql-snow .ql-link-tooltip a.ql-preview { + display: inline-block; + max-width: 200px; + overflow-x: hidden; + text-overflow: ellipsis; + vertical-align: top; +} +.ql-snow .ql-link-tooltip a.ql-action::before { + color: #444; + content: '-'; + line-height: 26px; + margin-left: 8px; +} +.ql-snow .ql-link-tooltip a.ql-action::after { + border-right: 1px solid #ccc; + content: 'Edit'; + margin-left: 8px; + padding-right: 8px; +} +.ql-snow .ql-link-tooltip a.ql-remove::before { + content: 'Remove'; + margin-left: 8px; +} +.ql-snow .ql-link-tooltip a { + line-height: 26px; +} +.ql-snow .ql-link-tooltip.ql-editing a.ql-preview, +.ql-snow .ql-link-tooltip.ql-editing a.ql-remove { + display: none; +} +.ql-snow .ql-link-tooltip.ql-editing input[type=text] { + display: inline-block; +} +.ql-snow .ql-link-tooltip.ql-editing a.ql-action::after { + border-right: 0px; + content: 'Save'; + padding-right: 0px; +} +.ql-toolbar.ql-snow { + border: 1px solid #ccc; + box-sizing: border-box; + font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; + padding: 8px; +} +.ql-toolbar.ql-snow * { + box-sizing: border-box; +} +.ql-toolbar.ql-snow .ql-formats { + display: inline-block; + margin-right: 15px; + vertical-align: middle; +} +.ql-toolbar.ql-snow button:hover, +.ql-toolbar.ql-snow button.ql-active, +.ql-toolbar.ql-snow .ql-picker-label:hover, +.ql-toolbar.ql-snow .ql-picker-label.ql-active, +.ql-toolbar.ql-snow .ql-picker-item:hover, +.ql-toolbar.ql-snow .ql-picker-item.ql-selected { + color: #06c; +} +.ql-toolbar.ql-snow button:hover .ql-fill, +.ql-toolbar.ql-snow button.ql-active .ql-fill, +.ql-toolbar.ql-snow .ql-picker-label:hover .ql-fill, +.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-fill, +.ql-toolbar.ql-snow .ql-picker-item:hover .ql-fill, +.ql-toolbar.ql-snow .ql-picker-item.ql-selected .ql-fill, +.ql-toolbar.ql-snow button:hover .ql-stroke.ql-fill, +.ql-toolbar.ql-snow button.ql-active .ql-stroke.ql-fill, +.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke.ql-fill, +.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke.ql-fill, +.ql-toolbar.ql-snow .ql-picker-item:hover .ql-stroke.ql-fill, +.ql-toolbar.ql-snow .ql-picker-item.ql-selected .ql-stroke.ql-fill { + fill: #06c; +} +.ql-toolbar.ql-snow button:hover .ql-stroke, +.ql-toolbar.ql-snow button.ql-active .ql-stroke, +.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke, +.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke, +.ql-toolbar.ql-snow .ql-picker-item:hover .ql-stroke, +.ql-toolbar.ql-snow .ql-picker-item.ql-selected .ql-stroke, +.ql-toolbar.ql-snow button:hover .ql-stroke-mitter, +.ql-toolbar.ql-snow button.ql-active .ql-stroke-mitter, +.ql-toolbar.ql-snow .ql-picker-label:hover .ql-stroke-mitter, +.ql-toolbar.ql-snow .ql-picker-label.ql-active .ql-stroke-mitter, +.ql-toolbar.ql-snow .ql-picker-item:hover .ql-stroke-mitter, +.ql-toolbar.ql-snow .ql-picker-item.ql-selected .ql-stroke-mitter { + stroke: #06c; +} +.ql-toolbar.ql-snow .ql-stroke { + stroke: #444; +} +.ql-toolbar.ql-snow .ql-stroke-mitter { + stroke: #444; +} +.ql-toolbar.ql-snow .ql-fill, +.ql-toolbar.ql-snow .ql-stroke.ql-fill { + fill: #444; +} +.ql-toolbar.ql-snow .ql-direction svg:last-child { + display: none; +} +.ql-toolbar.ql-snow .ql-direction.ql-active svg:last-child { + display: inline; +} +.ql-toolbar.ql-snow .ql-direction.ql-active svg:first-child { + display: none; +} +.ql-toolbar.ql-snow .ql-picker { + color: #444; + display: inline-block; + float: left; + font-size: 14px; + font-weight: 500; + height: 24px; + position: relative; + vertical-align: middle; +} +.ql-toolbar.ql-snow .ql-picker-label { + border: 1px solid transparent; + cursor: pointer; + display: inline-block; + height: 100%; + padding-left: 8px; + padding-right: 2px; + position: relative; + width: 100%; +} +.ql-toolbar.ql-snow .ql-picker-label svg { + float: right; + height: 18px; + margin-top: 2px; + width: 18px; +} +.ql-toolbar.ql-snow .ql-picker-label::before { + vertical-align: middle; +} +.ql-toolbar.ql-snow .ql-picker-options { + background-color: #fff; + border: 1px solid transparent; + display: none; + min-width: 100%; + padding: 4px 8px; + position: absolute; + white-space: nowrap; +} +.ql-toolbar.ql-snow .ql-picker-options .ql-picker-item { + cursor: pointer; + display: block; + padding-bottom: 5px; + padding-top: 5px; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label { + border-color: #ccc; + color: #ccc; + z-index: 2; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill { + fill: #ccc; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke { + stroke: #ccc; +} +.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options { + border-color: #ccc; + box-shadow: rgba(0,0,0,0.2) 0 2px 8px; + display: block; + margin-top: -1px; + z-index: 1; +} +.ql-toolbar.ql-snow .ql-color-picker, +.ql-toolbar.ql-snow .ql-icon-picker { + width: 28px; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-label, +.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-label { + padding: 2px 4px; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-label svg, +.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-label svg { + margin-top: 0px; +} +.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-options { + padding: 4px 0px; +} +.ql-toolbar.ql-snow .ql-icon-picker .ql-picker-item { + height: 24px; + padding: 2px 4px; +} +.ql-toolbar.ql-snow .ql-color-picker.ql-expanded .ql-picker-options, +.ql-toolbar.ql-snow .ql-icon-picker.ql-expanded .ql-picker-options { + margin-top: -6px; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-options { + padding: 5px; + width: 152px; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item { + border: 1px solid transparent; + float: left; + height: 16px; + margin: 2px; + padding: 0px; + width: 16px; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-primary-color { + margin-bottom: toolbarPadding; +} +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected, +.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover { + border-color: #000; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=''])::before, +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=''])::before, +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=''])::before { + content: attr(data-label); +} +.ql-toolbar.ql-snow .ql-picker.ql-header { + width: 98px; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item::before { + content: 'Normal'; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + content: 'Heading 1'; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + content: 'Heading 2'; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + content: 'Heading 3'; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + content: 'Heading 4'; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + content: 'Heading 5'; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before, +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + content: 'Heading 6'; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before { + font-size: 2em; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { + font-size: 1.5em; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { + font-size: 1.17em; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { + font-size: 1em; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before { + font-size: 0.83em; +} +.ql-toolbar.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before { + font-size: 0.67em; +} +.ql-toolbar.ql-snow .ql-picker.ql-font { + width: 108px; +} +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-label::before, +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-item::before { + content: 'Sans Serif'; +} +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before, +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { + content: 'Serif'; +} +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before, +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { + content: 'Monospace'; +} +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before { + font-family: Georgia, Times New Roman, serif; +} +.ql-toolbar.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before { + font-family: Monaco, Courier New, monospace; +} +.ql-toolbar.ql-snow .ql-picker.ql-size { + width: 98px; +} +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label::before, +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item::before { + content: 'Normal'; +} +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before, +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { + content: 'Small'; +} +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before, +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { + content: 'Large'; +} +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before, +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { + content: 'Huge'; +} +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before { + font-size: 10px; +} +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before { + font-size: 18px; +} +.ql-toolbar.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before { + font-size: 32px; +} +.ql-toolbar.ql-snow .ql-color-picker.ql-background .ql-picker-item { + background-color: #fff; +} +.ql-toolbar.ql-snow .ql-color-picker.ql-color .ql-picker-item { + background-color: #000; +} +.ql-toolbar.ql-snow + .ql-container.ql-snow { + border-top: 0px; +} +.ql-snow .ql-tooltip { + background-color: #fff; + border: 1px solid #ccc; + box-shadow: 0px 0px 5px #ddd; + color: #444; +} +.ql-snow .ql-tooltip input[type=text] { + border: 1px solid #ccc; + font-size: 13px; + margin: 0px; + padding: 3px 5px; +} +.ql-container.ql-snow { + border: 1px solid #ccc; +} +.ql-container.ql-snow a { + color: #06c; +} +.ql-container.ql-snow * { + box-sizing: border-box; +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_footer.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_footer.scss new file mode 100644 index 0000000000000000000000000000000000000000..35d3116a9c189ae82be06ffb8d7103d4f9dcfcf9 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_footer.scss @@ -0,0 +1,14 @@ +.layout-footer { + @include transition(margin-left $transitionDuration); + background-color: $footerBgColor; + padding: 1em 2em; + + img { + vertical-align: middle; + } + + .footer-text { + vertical-align: middle; + float: right; + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_layout.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_layout.scss new file mode 100644 index 0000000000000000000000000000000000000000..b5182b1c58420ad500fc0cb48e1b85d4ef2ae393 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_layout.scss @@ -0,0 +1,12 @@ +@import "./_mixins"; +@import "./_splash"; +@import "./_main"; +@import "./_topbar"; +@import "./_sidebar"; +@import "./_profile"; +@import "./_menu"; +@import "./_content"; +@import "./_footer"; +@import "./_responsive"; +@import "./_utils"; +@import "./_dashboard"; \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_main.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_main.scss new file mode 100644 index 0000000000000000000000000000000000000000..9c4b17db84c02f84691163de1075398385ef0230 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_main.scss @@ -0,0 +1,28 @@ +* { + box-sizing: border-box; +} + +html { + height: 100%; +} + +body { + font-family: "Open Sans", "Helvetica Neue", sans-serif; + font-size: $fontSize; + color: $textColor; + background-color: $bodyBgColor; + margin: 0; + padding: 0; + min-height: 100%; + -webkit-font-smoothing: antialiased; +} + +a { + text-decoration: none; +} + +.layout-wrapper { + padding: 0; + // min-height: 100vh; +} + diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss new file mode 100644 index 0000000000000000000000000000000000000000..9fea8e94f390367c23a1874b1d0e19060a43e5b5 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_menu.scss @@ -0,0 +1,184 @@ +.layout-menu-container { + padding-bottom: 120px; +} + +.layout-menu { + list-style-type: none; + margin: 0; + padding: 0; + + li { + a { + cursor: pointer; + position: relative; + text-decoration: none; + display: block; + @include transition(color $transitionDuration); + + i { + font-size: 18px; + vertical-align: middle; + } + + span { + margin-left: .25em; + vertical-align: middle; + line-height: 18px; + display: inline-block; + } + + .menuitem-toggle-icon { + position: absolute; + top: 50%; + right: 1em; + margin-top: -9px; + } + + &.router-link-active { + font-weight: 700; + } + } + + &.active-menuitem { + > a { + .menuitem-toggle-icon { + @include icon-override("\e933"); + } + } + + > ul { + max-height: 500px; + } + } + } + + > li { + > a { + padding: 1em; + + span { + font-size: $fontSize; + } + } + + &:last-child { + > a { + border-bottom: 1px solid $menuitemBorderColor; + } + } + + ul { + list-style-type: none; + margin: 0; + padding: 0; + padding-left: 1.5em; + max-height: 0; + overflow: hidden; + @include transition-property(max-height); + @include transition-duration(0.4s); + @include transition-timing-function(cubic-bezier(0.86, 0, 0.07, 1)); + + li { + a { + cursor: pointer; + padding: .75em 1em; + border-top: 0 none; + + span { + font-size: $submenuFontSize; + } + } + + &:last-child { + padding-bottom: 1em; + } + } + } + } +} + +.layout-sidebar-light { + @include linear-gradient($menuBgColorFirst, $menuBgColorLast); + + .layout-menu { + > li { + > a { + border-top: 1px solid $menuitemBorderColor; + } + + &:last-child { + > a { + border-bottom: 1px solid $menuitemBorderColor; + } + } + + ul { + background-color: $menuitemActiveBgColor; + } + } + + li { + a { + color: $menuitemColor; + + &.router-link-active { + color: $menuitemActiveRouteColor; + } + + &:hover { + color: $menuitemHoverColor; + } + } + + &.active-menuitem { + > a { + background-color: $menuitemActiveBgColor; + color: $menuitemActiveColor; + } + } + } + } +} + +.layout-sidebar-dark { + @include linear-gradient($menuDarkBgColorFirst, $menuDarkBgColorLast); + + .layout-menu { + > li { + > a { + border-top: 1px solid $menuitemDarkBorderColor; + } + + &:last-child { + > a { + border-bottom: 1px solid $menuitemDarkBorderColor; + } + } + + ul { + background-color: $menuitemDarkActiveBgColor; + } + } + + li { + a { + color: $menuitemDarkColor; + + &.router-link-active { + color: $menuitemActiveRouteColor; + } + + &:hover { + color: $menuitemDarkHoverColor; + } + } + + &.active-menuitem { + > a { + background-color: $menuitemDarkActiveBgColor; + color: $menuitemDarkActiveColor; + } + } + } + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_mixins.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_mixins.scss new file mode 100644 index 0000000000000000000000000000000000000000..e31c9cf0394ee94a67565d2588318b944fbf4a31 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_mixins.scss @@ -0,0 +1,120 @@ +// Icon Override Mixin +@mixin icon-override($icon) { + &:before { + content: $icon; + } +} + +// === MIXINS === // +@mixin border-radius($val) { + -moz-border-radius: $val; + -webkit-border-radius: $val; + border-radius: $val; +} + +@mixin border-radius-right($val) { + -moz-border-radius-topright: $val; + -webkit-border-top-right-radius: $val; + border-top-right-radius: $val; + -moz-border-radius-bottomright: $val; + -webkit-border-bottom-right-radius: $val; + border-bottom-right-radius: $val; +} + +@mixin border-radius-left($val) { + -moz-border-radius-topleft: $val; + -webkit-border-top-left-radius: $val; + border-top-left-radius: $val; + -moz-border-radius-bottomleft: $val; + -webkit-border-bottom-left-radius: $val; + border-bottom-left-radius: $val; +} + +@mixin border-radius-top($val) { + -moz-border-radius-topleft: $val; + -webkit-border-top-left-radius: $val; + border-top-left-radius: $val; + -moz-border-radius-topright: $val; + -webkit-border-top-right-radius: $val; + border-top-right-radius: $val; +} + +@mixin border-radius-bottom($val) { + -moz-border-radius-bottomleft: $val; + -webkit-border-bottom-left-radius: $val; + border-bottom-left-radius: $val; + -moz-border-radius-bottomright: $val; + -webkit-border-bottom-right-radius: $val; + border-bottom-right-radius: $val; +} + +@mixin linear-gradient($top, $bottom){ + background: $top; /* Old browsers */ + background: -moz-linear-gradient(top, $top 0%, $bottom 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, $top 0%,$bottom 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(top, $top 0%,$bottom 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(top, $top 0%,$bottom 100%); /* IE10+ */ + background: linear-gradient(to bottom, $top 0%,$bottom 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#000000',GradientType=0 ); /* IE6-9 */ +} + +@mixin linear-gradient-left($left, $right){ + background: $left; /* Old browsers */ + background: -moz-linear-gradient(left, $left 0%, $right 100%); /* FF3.6+ */ + background: -webkit-gradient(linear, left top, right top, color-stop(0%,$left), color-stop(100%,$right)); /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(left, $left 0%,$right 100%); /* Chrome10+,Safari5.1+ */ + background: -o-linear-gradient(left, $left 0%,$right 100%); /* Opera 11.10+ */ + background: -ms-linear-gradient(left, $left 0%,$right 100%); /* IE10+ */ + background: linear-gradient(to right, $left 0%,$right 100%); /* W3C */ + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=$left, endColorstr=$right,GradientType=1 ); /* IE6-9 */ +} + +@mixin transition($transition...) { + -moz-transition: $transition; + -o-transition: $transition; + -webkit-transition: $transition; + transition: $transition; +} + +@mixin transition-property($property) { + -webkit-transition-property: $property; + -moz-transition-property: $property; + -ms-transition-property: $property; + -o-transition-property: $property; + transition-property: $property; +} + +@mixin transition-duration($duration) { + -moz-transition-duration: $duration; + -webkit-transition-duration: $duration; + -o-transition-duration: $duration; + transition-duration: $duration; +} + +@mixin transition-timing-function($function) { + -webkit-transition-timing-function: $function; + -moz-transition-timing-function: $function; + -o-transition-timing-function: $function; + transition-timing-function: $function; +} + +@mixin opacity($opacity) { + opacity: $opacity; + $opacity-ie: $opacity * 100; + filter: alpha(opacity=$opacity-ie); +} + +@mixin shadow($value) { + -webkit-box-shadow: $value; + -moz-box-shadow: $value; + box-shadow: $value; +} + +@mixin clearfix { + &:after { + content: ""; + display: table; + clear: both; + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_profile.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_profile.scss new file mode 100644 index 0000000000000000000000000000000000000000..da266609bc672200fefa0f7de350354caaac5f25 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_profile.scss @@ -0,0 +1,113 @@ +.layout-profile { + text-align: center; + padding: 20px 0; + + img { + width: 56px; + margin: 10px; + } + + .layout-profile-link { + cursor: pointer; + display: inline-block; + margin-bottom: .75em; + @include transition(color $transitionDuration); + + i { + display: inline-block; + font-size: 16px; + vertical-align: middle; + } + } + + ul { + list-style-type: none; + padding: 0; + margin: 0; + max-height: 0; + overflow: hidden; + @include transition-property(max-height); + @include transition-duration(0.4s); + @include transition-timing-function(cubic-bezier(0.86, 0, 0.07, 1)); + + &.layout-profile-expanded { + max-height: 500px; + } + + li { + button { + width: 100%; + padding: 1em; + border: 0 none; + border-radius: 0; + cursor: pointer; + @include transition(color $transitionDuration); + + &:hover { + color: $menuitemHoverColor; + } + + span { + margin-left: .25em; + vertical-align: middle; + } + + i { + vertical-align: middle; + } + } + } + } +} + +.layout-sidebar-light { + .layout-profile { + .layout-profile-link { + color: $menuitemColor; + + &:hover { + color: $menuitemHoverColor; + } + } + + ul { + background-color: $menuitemActiveBgColor; + + li { + button { + color: $menuitemColor; + + &:hover { + color: $menuitemHoverColor; + } + } + } + } + } +} + +.layout-sidebar-dark { + .layout-profile { + .layout-profile-link { + color: $menuitemDarkColor; + + &:hover { + color: $menuitemDarkHoverColor; + } + } + + ul { + background-color: $menuitemDarkActiveBgColor; + + li { + button { + color: $menuitemDarkColor; + + &:hover { + color: $menuitemDarkHoverColor; + } + } + } + } + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_responsive.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_responsive.scss new file mode 100644 index 0000000000000000000000000000000000000000..97ab84ce038e66fe3bfdf4a5a2de512d491709ec --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_responsive.scss @@ -0,0 +1,98 @@ +@media (min-width: 1025px) { + .layout-wrapper { + &.layout-overlay { + .layout-sidebar { + left: -250px; + } + + .layout-topbar { + left: 0; + } + + .layout-main, .layout-footer { + margin-left: 0; + } + + &.layout-overlay-sidebar-active { + .layout-sidebar { + left: 0; + } + + .layout-topbar { + left: 250px; + } + } + } + + &.layout-static { + .layout-sidebar { + left: 0; + } + + .layout-topbar { + left: 250px; + } + + .layout-main, .layout-footer { + margin-left: 250px; + } + + &.layout-static-sidebar-inactive { + .layout-sidebar { + left: -250px; + } + + .layout-topbar { + left: 0; + } + + .layout-main, .layout-footer { + margin-left: 0; + } + } + } + } +} + +@media (max-width: 1024px) { + .layout-wrapper { + .layout-topbar { + left: 0; + } + + .layout-main, .layout-footer { + margin-left: 0; + } + + .layout-sidebar { + left: -250px; + margin-top: 50px; + } + + .layout-mask { + display: none; + position: fixed; + width: 100%; + height: 100%; + top: 50px; + left: 0; + z-index: 998; + background-color: $maskBgColor; + @include opacity(0.7); + } + + &.layout-mobile-sidebar-active { + .layout-sidebar { + left: -0; + } + + .layout-mask { + display: block; + } + } + } + + .body-overflow-hidden { + overflow: hidden; + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_sidebar.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_sidebar.scss new file mode 100644 index 0000000000000000000000000000000000000000..cca2a830c7f57a18ff9687d8d98de016709c7aa5 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_sidebar.scss @@ -0,0 +1,31 @@ +.layout-sidebar { + padding-top: 60px; + position: fixed; + width: 250px; + height: 100%; + // z-index: 999; + overflow-y: auto; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + @include transition(left $transitionDuration); + @include shadow(0 0 6px 0 rgba(0, 0, 0, 0.16)); + + .layout-logo { + text-align: center; + margin-top: 24px; + } + + .menuitem-badge { + display: inline-block; + margin-left: 4px; + font-size: 10px; + width: 16px; + height: 16px; + line-height: 16px; + text-align: center; + color: $menuitemBadgeColor; + background-color: $menuitemBadgeBgColor; + @include border-radius(50%); + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_splash.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_splash.scss new file mode 100644 index 0000000000000000000000000000000000000000..1af75ac61e4cf9c635c4ed791901cc5fa571b3fb --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_splash.scss @@ -0,0 +1,52 @@ +.splash-screen { + width: 100%; + height: 100%; + position: fixed; + @include linear-gradient-left($topbarLeftBgColor, $topbarRightBgColor); + + .splash-container { + width: 40px; + height: 40px; + margin: 0px auto; + position: absolute; + left: 50%; + top: 50%; + margin-left: -20px; + margin-top: -20px; + + } + + .splash-double-bounce1, .splash-double-bounce2 { + width: 100%; + height: 100%; + border-radius: 50%; + background-color: $topbarItemColor; + opacity: 0.6; + position: absolute; + top: 0; + left: 0; + + -webkit-animation: splash-bounce 2.0s infinite ease-in-out; + animation: splash-bounce 2.0s infinite ease-in-out; + } + + .splash-double-bounce2 { + -webkit-animation-delay: -1.0s; + animation-delay: -1.0s; + } + + @-webkit-keyframes splash-bounce { + 0%, 100% { -webkit-transform: scale(0.0) } + 50% { -webkit-transform: scale(1.0) } + } + + @keyframes splash-bounce { + 0%, 100% { + transform: scale(0.0); + -webkit-transform: scale(0.0); + } 50% { + transform: scale(1.0); + -webkit-transform: scale(1.0); + } + } +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_topbar.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_topbar.scss new file mode 100644 index 0000000000000000000000000000000000000000..310133c2db197d0c33a8db3e045e256ffe19c868 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_topbar.scss @@ -0,0 +1,133 @@ +.layout-topbar { + position: fixed; + height: 50px; + padding: .7em 1.5em 0em 1.5em; + color: #ffffff; + z-index: 999; + right: 0; + @include clearfix(); + @include linear-gradient-left($topbarLeftBgColor,$topbarRightBgColor); + @include transition(left $transitionDuration); + + .header-title { + font-size: 22px; + margin-left: 10px; + } + + .layout-topbar-icons { + float: right; + display: block; + -moz-animation-duration: .5s; + -webkit-animation-duration: .5s; + animation-duration: .5s; + + + button { + position: relative; + color: $topbarItemColor; + margin-left: 20px; + display: inline-block; + text-decoration: none; + @include transition(color $transitionDuration); + overflow: visible; + + &:hover { + color: $topbarItemHoverColor; + } + + span { + &.layout-topbar-icon { + font-size: 2em; + } + + &.layout-topbar-item-text { + font-size: 20px; + display: none; + } + + &.layout-topbar-badge { + position: absolute; + font-size: 10px; + right: -5px; + top: -5px; + width: 16px; + height: 16px; + text-align: center; + line-height: 16px; + color: $topbarItemBadgeColor; + background-color: $topbarItemBadgeBgColor; + @include border-radius(50%); + } + } + } + + .layout-topbar-search { + padding: 0; + position: relative; + display: inline-block; + top: -4px; + + input { + display: inline-block; + border: 0 none; + font-size: $fontSize; + background: transparent; + border-bottom: 2px solid $topbarSearchInputBorderBottomColor; + outline: 0 none; + -webkit-box-shadow: none; + box-shadow: none; + color: $topbarSearchInputColor; + width: 100px; + padding: 1px 20px 1px 1px; + margin: 0px; + @include border-radius(2px); + + &::-webkit-input-placeholder { color:$topbarSearchInputColor; opacity: .7; @include transition(opacity $transitionDuration);} + &:-moz-placeholder { color:$topbarSearchInputColor; opacity: .7; @include transition(opacity $transitionDuration);} + &::-moz-placeholder { color:$topbarSearchInputColor; opacity: .7; @include transition(opacity $transitionDuration);} + &:-ms-input-placeholder { color:$topbarSearchInputColor; opacity: .7; @include transition(opacity $transitionDuration);} + } + + .layout-topbar-search-icon { + font-size: 18px; + position: absolute; + top: -1px; + right: 0px; + } + + &:hover { + input { + border-bottom-color: $topbarItemHoverColor; + &::-webkit-input-placeholder { opacity: 1 } + &:-moz-placeholder {opacity: 1} + &::-moz-placeholder {opacity: 1} + &:-ms-input-placeholder {opacity: 1} + } + + .layout-topbar-search-icon { + color: $topbarItemHoverColor; + } + } + } + } + + .layout-menu-button { + cursor: pointer; + display: inline-block; + text-decoration: none; + color: $topbarItemColor; + @include transition(color $transitionDuration); + + span { + font-size: 2em; + } + + &:hover { + color: $topbarItemHoverColor; + } + } + + button { + cursor: pointer; + } +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_utils.scss b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_utils.scss new file mode 100644 index 0000000000000000000000000000000000000000..2a37da7437e2d182dea31fb4cc0da9ea3cb67c29 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/layout/sass/_utils.scss @@ -0,0 +1,38 @@ +/* Typography */ +h1 { + font-weight: normal; + margin: 0; + font-size: 24px; +} + +h2 { + font-size: 20px; + font-weight: normal; + margin: 0; +} + +.card { + background-color: #ffffff; + padding: 1em; + margin-bottom: 16px; + @include border-radius($borderRadius); + + &.card-w-title { + padding-bottom: 2em; + } + + h1 { + margin: 1em 0 .5em 0; + border-bottom: 1px solid #d5d5d5; + padding: .1em; + font-size: 24px; + + &:first-child { + margin: 0 0 .5em 0; + } + } +} + +.p-g { + -ms-flex-wrap: wrap; +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Dashboard/index.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Dashboard/index.js new file mode 100644 index 0000000000000000000000000000000000000000..dd52fdf11774d21f1e002716cf9804f1ac581d8d --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Dashboard/index.js @@ -0,0 +1,12 @@ +import React, {Component} from 'react'; + +export class Dashboard extends Component { + + render() { + return ( + <h1>Dashboard</h1> + ); + } +} + +export default Dashboard; \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/index.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/index.js new file mode 100644 index 0000000000000000000000000000000000000000..5ce2273ff25cb9371132f73e8c685415cb3ab5de --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/Scheduling/index.js @@ -0,0 +1,12 @@ +import React, {Component} from 'react'; + +export class Scheduling extends Component { + + render() { + return ( + <h1>Scheduling Units</h1> + ); + } +} + +export default Scheduling; \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/routes/index.js b/SAS/TMSS/frontend/tmss_webapp/src/routes/index.js new file mode 100644 index 0000000000000000000000000000000000000000..323019846cfc267c7874b64bee9ed4bd8a795f10 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/routes/index.js @@ -0,0 +1,19 @@ +import React from 'react'; +import { + Route, + Switch, + Redirect +} from 'react-router-dom'; + +import {Dashboard} from './Dashboard'; +import {Scheduling} from './Scheduling'; + +export const RoutedContent = () => { + return ( + <Switch> + <Redirect from="/" to="/" exact /> + <Route path="/dashboard" exact component={Dashboard} /> + <Route path="/scheduling" exact component={Scheduling} /> + </Switch> + ); +} \ No newline at end of file diff --git a/SAS/TMSS/frontend/tmss_webapp/src/serviceWorker.js b/SAS/TMSS/frontend/tmss_webapp/src/serviceWorker.js new file mode 100644 index 0000000000000000000000000000000000000000..b04b771a82613a80b0532d7082508763620074bf --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/serviceWorker.js @@ -0,0 +1,141 @@ +// This optional code is used to register a service worker. +// register() is not called by default. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on subsequent visits to a page, after all the +// existing tabs open on the page have been closed, since previously cached +// resources are updated in the background. + +// To learn more about the benefits of this model and instructions on how to +// opt-in, read https://bit.ly/CRA-PWA + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +export function register(config) { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebook/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Let's check if a service worker still exists or not. + checkValidServiceWorker(swUrl, config); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://bit.ly/CRA-PWA' + ); + }); + } else { + // Is not localhost. Just register service worker + registerValidSW(swUrl, config); + } + }); + } +} + +function registerValidSW(swUrl, config) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been fetched, + // but the previous service worker will still serve the older + // content until all client tabs are closed. + console.log( + 'New content is available and will be used when all ' + + 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' + ); + + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); + } + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl, config) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl, { + headers: { 'Service-Worker': 'script' }, + }) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + const contentType = response.headers.get('content-type'); + if ( + response.status === 404 || + (contentType != null && contentType.indexOf('javascript') === -1) + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready + .then(registration => { + registration.unregister(); + }) + .catch(error => { + console.error(error.message); + }); + } +} diff --git a/SAS/TMSS/frontend/tmss_webapp/src/setupTests.js b/SAS/TMSS/frontend/tmss_webapp/src/setupTests.js new file mode 100644 index 0000000000000000000000000000000000000000..74b1a275a0ea7df518f17bcea5375abf003abe55 --- /dev/null +++ b/SAS/TMSS/frontend/tmss_webapp/src/setupTests.js @@ -0,0 +1,5 @@ +// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom/extend-expect';