Skip to content
Snippets Groups Projects
Commit 54885b42 authored by Greg Fodor's avatar Greg Fodor
Browse files

Create panel styling progress

parent b4300274
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
} }
.create-panel__form__name--expanded { .create-panel__form__name--expanded {
padding-top: 300px; padding-top: 415px;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
...@@ -96,3 +96,35 @@ ...@@ -96,3 +96,35 @@
cursor: pointer; cursor: pointer;
bottom: 0; bottom: 0;
} }
.create-panel__form__environment {
position: absolute;
top: 0px;
left: 0px;
width: 700px;
height: 100%;
box-sizing: border-box;
border-radius: 14px;
border: 3px solid white;
border-radius: 14px;
overflow: hidden;
pointer-events: none;
}
@media (max-width: 768px) {
.create-panel__form__environment {
width: 100%;
}
}
.create-panel__form__environment__picker {
width: 100%;
height: 390px;
border-bottom: 3px solid white;
overflow: hidden;
}
.create-panel__form__environment__picker__image {
width: 100%;
}
...@@ -125,7 +125,7 @@ body { ...@@ -125,7 +125,7 @@ body {
// background-color: blue; // background-color: blue;
flex: 10; flex: 10;
text-shadow: 0px 0px 2px rgba(32, 32, 32, 1.0); text-shadow: 0px 0px 2px rgba(32, 32, 32, 1.0);
min-height: 400px; min-height: 700px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
...@@ -133,14 +133,21 @@ body { ...@@ -133,14 +133,21 @@ body {
@media (max-width: 768px) { @media (max-width: 768px) {
.hero-content { .hero-content {
padding: 1em 1.5em 1em 1.5em; padding: 1em 1.5em 1em 1.5em;
justify-content: space-around;
} }
} }
.hero-content__container { .hero-content__container {
flex: 10;
padding-top: 2vw; padding-top: 2vw;
padding-left: 2.1em; padding-left: 2.1em;
padding-right: 2.1em; padding-right: 2.1em;
flex: 10;
}
@media (max-width: 768px) {
.hero-content__container {
flex: 0 0 auto;
}
} }
.hero-content__container__title { .hero-content__container__title {
...@@ -189,6 +196,7 @@ body { ...@@ -189,6 +196,7 @@ body {
@media (max-width: 768px) { @media (max-width: 768px) {
.hero-content__create { .hero-content__create {
padding: 0.5em; padding: 0.5em;
align-self: center;
} }
} }
......
...@@ -17,8 +17,8 @@ class HubCreatePanel extends Component { ...@@ -17,8 +17,8 @@ class HubCreatePanel extends Component {
this.state = { this.state = {
name: generateHubName(), name: generateHubName(),
environmentBundleIndex: Math.floor(Math.random() * props.environments[0].length), environmentIndex: Math.floor(Math.random() * props.environments.length),
expanded: false expanded: true
}; };
} }
...@@ -57,6 +57,9 @@ class HubCreatePanel extends Component { ...@@ -57,6 +57,9 @@ class HubCreatePanel extends Component {
</option> </option>
)); ));
const environment = this.props.environments[this.state.environmentIndex];
const environmentImageSrcSet = environment.meta.images.find(i => i.type === "preview-thumbnail").srcset;
const formNameClassNames = classNames("create-panel__form__name", { const formNameClassNames = classNames("create-panel__form__name", {
"create-panel__form__name--expanded": this.state.expanded "create-panel__form__name--expanded": this.state.expanded
}); });
...@@ -108,6 +111,13 @@ class HubCreatePanel extends Component { ...@@ -108,6 +111,13 @@ class HubCreatePanel extends Component {
pattern={HUB_NAME_PATTERN} pattern={HUB_NAME_PATTERN}
title={formatMessage({ id: "home.create_name.validation_warning" })} title={formatMessage({ id: "home.create_name.validation_warning" })}
/> />
{this.state.expanded && (
<div className="create-panel__form__environment">
<div className="create-panel__form__environment__picker">
<img className="create-panel__form__environment__picker__image" srcSet={environmentImageSrcSet} />
</div>
</div>
)}
</div> </div>
</div> </div>
</form> </form>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment