Skip to content

Commit

Permalink
chore(landingpage): move dashboard src from juno to elektra (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
andypf authored Oct 11, 2024
1 parent 9f14403 commit fc16d00
Show file tree
Hide file tree
Showing 53 changed files with 6,665 additions and 142 deletions.
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore the .changeset directory
.changeset

# You can also ignore other files or directories if needed
node_modules
dist
build
builds
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"insertPragma": false,
"singleAttributePerLine": false,
"bracketSameLine": false,
"jsxSingleQuote": false,
"printWidth": 120,
"proseWrap": "preserve",
"quoteProps": "as-needed",
"requirePragma": false,
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
45 changes: 45 additions & 0 deletions app/javascript/widgets/landing_page/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors
* SPDX-License-Identifier: Apache-2.0
*/

.App {
text-align: center;
}

.App-name {
color: rgb(219, 204, 255);
font-size: 2em;
text-transform: uppercase;
}

.App-slogan {
color: #666;
font-size: 1.5em;
text-transform: uppercase;
}

.App-info {
color: #666;
font-size: 1em;
}

.App-header {
background-color: rgb(11, 13, 45);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
/* font-size: calc(10px + 2vmin); */
color: white;
}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
66 changes: 66 additions & 0 deletions app/javascript/widgets/landing_page/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company and Juno contributors
* SPDX-License-Identifier: Apache-2.0
*/

import React, { useCallback, useEffect } from "react"
import PageFooter from "./components/layout/PageFooter"
import PageHead from "./components/layout/PageHead"
import Home from "./pages/home"
import styles from "./styles.scss?inline"
import useStore from "./store"
import { AppShellProvider } from "@cloudoperators/juno-ui-components"

const App = (props) => {
const loginOverlayVisible = useStore(
useCallback((state) => state.loginOverlayVisible)
)
const selectRegion = useStore(useCallback((state) => state.selectRegion))
const setPreselectedRegion = useStore(
useCallback((state) => state.setPreselectedRegion)
)
const selectDomain = useStore(useCallback((state) => state.selectDomain))
const setProdMode = useStore(useCallback((state) => state.setProdMode))

// if a preselected region or domain has been passed into the app be sure to set them in the state
useEffect(() => {
if (props.region) {
selectRegion(props.region.toUpperCase())
setPreselectedRegion(props.region.toUpperCase())
}
if (props.domain) {
selectDomain(props.domain.toUpperCase())
}
if (props.prodmode) {
setProdMode(props.prodmode === "true")
}
}, [props.region, props.domain, props.prodmode])

return (
// use custom style cache to avoid conflicts with other apps
<div
className={`tw-flex tw-flex-col tw-h-full ${
loginOverlayVisible ? "tw-overflow-hidden tw-h-full" : ""
}`}
>
<div className="tw-flex tw-flex-col tw-grow">
<PageHead />

<Home />
<PageFooter />
</div>
</div>
)
}

const StyledApp = (props = {}) => {
return (
<AppShellProvider>
{/* load styles inside the shadow dom */}
<style>{styles}</style>
<App {...props} />
</AppShellProvider>
)
}

export default StyledApp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions app/javascript/widgets/landing_page/assets/images/Service_Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fc16d00

Please sign in to comment.