Skip to content

Commit

Permalink
update: sites CSS updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Dexagod committed Apr 30, 2024
1 parent f896074 commit 68295da
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 6 deletions.
1 change: 1 addition & 0 deletions demo/sites/auditingsite/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
width: 100%;
word-wrap: break-word;
text-align: left;
margin-right: 1em;
}

#audit-page {
Expand Down
1 change: 1 addition & 0 deletions demo/sites/authorizationsite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"uuid": "^9.0.1"
},
"scripts": {
"dev": "yarn run -T react-scripts start",
"start": "yarn run -T serve -s build -l 5001",
"build": "yarn run -T react-scripts build"
},
Expand Down
18 changes: 18 additions & 0 deletions demo/sites/authorizationsite/src/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.App {
text-align: center;
height: 100vh;
top: 0
}

.App-logo {
Expand Down Expand Up @@ -37,3 +39,19 @@
}
}

.header-title {
margin: 0;
padding: 1em;
position: absolute;
left: 0;
top: 0;
}

.header-greeting {
margin: 0;
padding: 1em;
position: absolute;
right: 0;
top: 0;

}
9 changes: 8 additions & 1 deletion demo/sites/authorizationsite/src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ export default function Home() {

useEffect(() => {
async function getPolicies() {
let policies = await readPolicyDirectory();
let policies: SimplePolicy[] = []
try {
policies = await readPolicyDirectory();
} catch (_ignored) {}

setPolicyList(policies)
}
getPolicies()
Expand All @@ -28,8 +32,11 @@ export default function Home() {
async function addPolicyFromFormdata(formdata: any) {
console.log('Adding the following policy:')
console.log(formdata)

const policyObject = await createAndSubmitPolicy(formdata)
if(policyObject) setPolicyList(policyList.concat(policyObject))


}

function renderPolicy(policy: SimplePolicy) {
Expand Down
3 changes: 2 additions & 1 deletion demo/sites/authorizationsite/src/components/Navigate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export default function Navigate() {
return (
<div>
<nav>
<p>Welcome Ruben Verborgh</p>
<h3 className="header-title">Policy Authorization Companion</h3>
<p className="header-greeting">Welcome Ruben Verborgh</p>
</nav>
</div>
)
Expand Down
16 changes: 12 additions & 4 deletions demo/sites/authorizationsite/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ body {
-moz-osx-font-smoothing: grayscale;
overflow: hidden;
width: 100vw;
height: 100vh;
margin: 0px
}

code {
Expand All @@ -15,9 +17,10 @@ code {
}

nav {
background-color: lightskyblue;
background-color: #ececec;
margin: 0;
height: 3em;
height: 3.5em;
margin-bottom: 4em;
}

.rowcontainer {
Expand All @@ -41,14 +44,17 @@ nav {
}

#policymanagementcontainer {
background-color: #fffbe4;
background-color: #ececec;
height: 200px;
width: 80vw;
margin: auto;
display: flex;
height: 100%;
overflow: hidden;
border: 1px solid black;
border-radius: 1em;
-moz-box-shadow: 0 0 3px #ccc;
-webkit-box-shadow: 0 0 3px #ccc;
box-shadow: 0 0 3px #ccc;
}

#addPolicy {
Expand Down Expand Up @@ -103,6 +109,8 @@ nav {
#policyview {
width: 90%;
height: 90%;
border: 0;
border-radius: 1em;
}

#PolicyListContainer {
Expand Down

0 comments on commit 68295da

Please sign in to comment.