Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
plants-of-cse
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Levi Coffman
plants-of-cse
Merge requests
!1
Icons
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Icons
icons
into
master
Overview
0
Commits
5
Pipelines
0
Changes
10
Merged
Levi Coffman
requested to merge
icons
into
master
5 years ago
Overview
0
Commits
5
Pipelines
0
Changes
1
Expand
👍
0
👎
0
Merge request reports
Viewing commit
0004be3a
Prev
Next
Show latest version
1 file
+
44
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
0004be3a
Got most of the style done
· 0004be3a
Levi Coffman
authored
5 years ago
webpage/src/Icon.js
+
44
−
3
Options
@@ -8,7 +8,34 @@ import styled from 'styled-components';
// ******** STYLE *********
const
IconDiv
=
styled
.
div
`
width: min-content;
width: 15em;
height: 20em;
border-style: solid;
border-radius: 1em;
overflow: hidden;
`
;
/**
* HeadShot style.
*/
const
Img
=
styled
.
img
`
width: 100%;
height: 75%;
display: block;
`
;
/**
* Name tag style.
*
* @type {React.DetailedReactHTMLElement<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> | never}
*/
const
NameDiv
=
styled
.
h2
`
width: 100%;
height: 18%;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
`
;
/**
@@ -18,7 +45,10 @@ const IconDiv = styled.div`
*/
const
StatusDiv
=
styled
.
div
`
width: 100%;
text-align: center;
height: 7%;
display: flex;
align-items: center;
justify-content: center;
background-color:
${(
props
)
=>
props
.
status
.
COLOR
}
;
`
;
@@ -52,13 +82,24 @@ class Icon extends Component {
this
.
state
=
{
status
:
STATUS
.
LOADING
,
name
:
"
Loading...
"
,
};
}
/**
* Fetch the current plant status from the server.
*/
getStatus
=
()
=>
{
};
render
()
{
return
(
<
IconDiv
>
<
img
className
=
"
IconImage
"
src
=
{
'
Grass_GIS.png
'
}
alt
=
{
"
icon
"
}
/
>
<
Img
className
=
"
IconImage
"
src
=
{
'
Grass_GIS.png
'
}
alt
=
{
"
icon
"
}
/
>
<
NameDiv
>
{
this
.
state
.
name
}
<
/NameDiv
>
<
StatusDiv
status
=
{
this
.
state
.
status
}
>
Status
:
{
this
.
state
.
status
.
TEXT
}
<
/StatusDiv
>
Loading