From d4ad8a5e56dc03c2fcd48cc1b054b18f8b347c74 Mon Sep 17 00:00:00 2001 From: Lukas Eipert Date: Wed, 6 Feb 2019 14:07:04 +0100 Subject: Project template: Fall back to GitLab logo Use gitlab-svg to provide the icons for rails, spring and express. For the new GitLab pages templates, we are falling back to the GitLab logo. --- app/assets/javascripts/projects/project_new.js | 16 ++++++++-------- app/assets/stylesheets/pages/projects.scss | 9 +-------- .../project_templates/_built_in_templates.html.haml | 4 ++-- app/views/shared/icons/_express.svg | 1 - app/views/shared/icons/_rails.svg | 1 - app/views/shared/icons/_spring.svg | 1 - 6 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 app/views/shared/icons/_express.svg delete mode 100644 app/views/shared/icons/_rails.svg delete mode 100644 app/views/shared/icons/_spring.svg (limited to 'app') diff --git a/app/assets/javascripts/projects/project_new.js b/app/assets/javascripts/projects/project_new.js index 9ca1a26b3ac..d65e73a3f9c 100644 --- a/app/assets/javascripts/projects/project_new.js +++ b/app/assets/javascripts/projects/project_new.js @@ -115,35 +115,35 @@ const bindEvents = () => { const templates = { rails: { text: 'Ruby on Rails', - icon: '.template-option svg.icon-rails', + icon: '.template-option .icon-rails', }, express: { text: 'NodeJS Express', - icon: '.template-option svg.icon-node-express', + icon: '.template-option .icon-express', }, spring: { text: 'Spring', - icon: '.template-option svg.icon-java-spring', + icon: '.template-option .icon-spring', }, hugo: { text: 'Pages/Hugo', - icon: '.template-option svg.icon-pages-hugo', + icon: '.template-option .icon-hugo', }, jekyll: { text: 'Pages/Jekyll', - icon: '.template-option svg.icon-pages-jekyll', + icon: '.template-option .icon-jekyll', }, plainhtml: { text: 'Pages/Plain HTML', - icon: '.template-option svg.icon-pages-plainhtml', + icon: '.template-option .icon-plainhtml', }, gitbook: { text: 'Pages/GitBook', - icon: '.template-option svg.icon-pages-gitbook', + icon: '.template-option .icon-gitbook', }, hexo: { text: 'Pages/Hexo', - icon: '.template-option svg.icon-pages-hexo', + icon: '.template-option .icon-hexo', }, }; diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index 3eb02cd4358..66866aedfba 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -507,12 +507,6 @@ } .template-option { - .logo { - .btn-template-icon { - width: 40px !important; - } - } - padding: 16px 0; &:not(:first-child) { @@ -551,9 +545,8 @@ } .selected-icon { - svg { + img { display: none; - top: 7px; height: 20px; width: 20px; } diff --git a/app/views/projects/project_templates/_built_in_templates.html.haml b/app/views/projects/project_templates/_built_in_templates.html.haml index 2a0ce4bd16b..6159f1c3542 100644 --- a/app/views/projects/project_templates/_built_in_templates.html.haml +++ b/app/views/projects/project_templates/_built_in_templates.html.haml @@ -1,7 +1,7 @@ - Gitlab::ProjectTemplate.all.each do |template| .template-option.d-flex.align-items-center - .logo.append-right-10 - = custom_icon(template.logo, size: 40) + .logo.append-right-10.px-1 + = image_tag template.logo, size: 32, class: "btn-template-icon icon-#{template.name}" .description %strong = template.title diff --git a/app/views/shared/icons/_express.svg b/app/views/shared/icons/_express.svg deleted file mode 100644 index a51e81e5568..00000000000 --- a/app/views/shared/icons/_express.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/views/shared/icons/_rails.svg b/app/views/shared/icons/_rails.svg deleted file mode 100644 index 852bd183cc7..00000000000 --- a/app/views/shared/icons/_rails.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/views/shared/icons/_spring.svg b/app/views/shared/icons/_spring.svg deleted file mode 100644 index ccf18749029..00000000000 --- a/app/views/shared/icons/_spring.svg +++ /dev/null @@ -1 +0,0 @@ - -- cgit v1.2.3