Commit cb127785 authored by Filipa Lacerda's avatar Filipa Lacerda

Adds CSS for desktop and mobile

parent 51b418b5
...@@ -3,6 +3,7 @@ import $ from 'jquery'; ...@@ -3,6 +3,7 @@ import $ from 'jquery';
// bootstrap jQuery plugins // bootstrap jQuery plugins
import 'bootstrap-sass/assets/javascripts/bootstrap/affix'; import 'bootstrap-sass/assets/javascripts/bootstrap/affix';
import 'bootstrap-sass/assets/javascripts/bootstrap/alert'; import 'bootstrap-sass/assets/javascripts/bootstrap/alert';
import 'bootstrap-sass/assets/javascripts/bootstrap/button';
import 'bootstrap-sass/assets/javascripts/bootstrap/dropdown'; import 'bootstrap-sass/assets/javascripts/bootstrap/dropdown';
import 'bootstrap-sass/assets/javascripts/bootstrap/modal'; import 'bootstrap-sass/assets/javascripts/bootstrap/modal';
import 'bootstrap-sass/assets/javascripts/bootstrap/tab'; import 'bootstrap-sass/assets/javascripts/bootstrap/tab';
......
...@@ -456,6 +456,7 @@ a.deploy-project-label { ...@@ -456,6 +456,7 @@ a.deploy-project-label {
} }
} }
.project-template,
.project-import { .project-import {
.form-group { .form-group {
margin-bottom: 5px; margin-bottom: 5px;
...@@ -470,7 +471,7 @@ a.deploy-project-label { ...@@ -470,7 +471,7 @@ a.deploy-project-label {
.btn { .btn {
padding: 8px; padding: 8px;
margin-left: 10px; margin-right: 10px;
} }
> div { > div {
...@@ -482,23 +483,112 @@ a.deploy-project-label { ...@@ -482,23 +483,112 @@ a.deploy-project-label {
.project-template { .project-template {
.project-templates-buttons { .project-templates-buttons {
i { i,
img {
display: block; display: block;
height: 24px;
font-size: 24px; font-size: 24px;
margin-bottom: 4px; margin: 4px auto;
} }
img { @media (max-width: $screen-md-max) {
display: block; i,
height: 24px; img {
margin: 0 auto 4px; display: inline-block;
height: 20px;
font-size: 14px;
margin: 0;
}
} }
} }
&:after {
content: "OR";
position: absolute;
color: $gray-darkest;
right: 13px;
z-index: 2;
top: 78px;
}
@media (max-width: $screen-md-max) {
&:after { &:after {
content: "OR"; top: 100%;
float: right; left: 49%;
margin-top: 10px;
}
}
@media (max-width: $screen-xs-min) {
&:after {
top: 100%;
left: 46%;
margin-top: 10px;
}
}
@media (min-width: $screen-xs-max) and (max-width: $screen-md-max) {
&:after {
top: 100%;
left: 49%;
margin-top: 10px;
} }
}
}
.new-project-first-column {
&:after {
background: $white-light;
content: " ";
position: absolute;
top: 66%;
height: 40px;
width: 20px;
right: 7px;
z-index: 1;
}
@media (min-width: $screen-xs-max) and (max-width: $screen-md-max) {
margin-bottom: 40px;
&:after {
top: 100%;
left: 47%;
width: 50px;
}
}
@media (max-width: $screen-xs-max) {
margin-bottom: 40px;
&:after {
top: 100%;
left: 42%;
width: 50px;
}
}
}
.new-project-second-column {
&:before {
background: $gray-darkest;
width: 1px;
height: 100%;
position: absolute;
left: -23px;
display: inline-block;
content: " ";
}
@media (max-width: $screen-md-max) {
&:before {
height: 1px;
left: 15px;
top: -20px;
right: 15px;
width: auto;
}
}
} }
.project-stats { .project-stats {
......
.btn-group.project-templates-buttons{ data: { toggle: "buttons" }} .project-templates-buttons.import-buttons{ data: { toggle: "buttons" }}
%label.btn.active %div.btn.btn-default.active
%input{ type: "radio", autocomplete: "off", name: "project_templates" } %input{ type: "radio", autocomplete: "off", name: "project_templates", id: "blank", checked: "true" }
= icon('file-o') = icon('file-o')
Blank Blank
- Gitlab::ProjectTemplate.all.each do |template| - Gitlab::ProjectTemplate.all.each do |template|
-# The title should be the value posted to the controller, a pretty name to print would be -# The title should be the value posted to the controller, a pretty name to print would be
-# template.name -# template.name
%label.btn %div.btn
%input{ type: "radio", autocomplete: "off", name: "project_templates" } %input{ type: "radio", autocomplete: "off", name: "project_templates", id: template.name }
= image_tag(template.logo_path) = image_tag(template.logo_path)
= template.title = template.title
%div.btn.btn-default
%input{ type: "radio", autocomplete: "off", name: "project_templates", id: "blank" }
= icon('file-o')
Node Express
%div.btn.btn-default
%input{ type: "radio", autocomplete: "off", name: "project_templates", id: "blank"}
= icon('file-o')
Java Spring
...@@ -18,15 +18,15 @@ ...@@ -18,15 +18,15 @@
.col-lg-9.js-toggle-container .col-lg-9.js-toggle-container
= form_for @project, html: { class: 'new_project' } do |f| = form_for @project, html: { class: 'new_project' } do |f|
.row .row
.col-lg-6.col-sm-12 .col-lg-6.col-sm-12.new-project-first-column
.project-template .project-template
.form_group.clearfix .form_group.clearfix
= f.label :template_project, class: 'label-light' do = f.label :template_project, class: 'label-light' do
Create from template Create from template
= link_to icon('question-circle'), help_page_path("public_access/public_access"), aria: { label: "What's included in a template?" }, title: "What's included in a template?", class: 'has-tooltip', data: { placement: 'top'} = link_to icon('question-circle'), help_page_path("public_access/public_access"), aria: { label: "What's included in a template?" }, title: "What's included in a template?", class: 'has-tooltip', data: { placement: 'top'}
.col-sm-12.import-buttons %div
= render 'project_templates', f: f = render 'project_templates', f: f
.col-lg-6.col-sm-12 .col-lg-6.col-sm-12.new-project-second-column
- if import_sources_enabled? - if import_sources_enabled?
.project-import .project-import
.form-group.clearfix .form-group.clearfix
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment