diff options
author | Lukas Eipert <leipert@gitlab.com> | 2019-02-06 14:07:04 +0100 |
---|---|---|
committer | Lukas Eipert <leipert@gitlab.com> | 2019-02-07 17:06:24 +0100 |
commit | d4ad8a5e56dc03c2fcd48cc1b054b18f8b347c74 (patch) | |
tree | a8988ad1cea970d513220adb030e8575537c2f93 /lib | |
parent | 37410a9ddf2eb90361974fd676bd0558dcad3ffa (diff) | |
download | gitlab-ce-d4ad8a5e56dc03c2fcd48cc1b054b18f8b347c74.tar.gz |
Project template: Fall back to GitLab logojlenny-AddPagesTemplates
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/project_template.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/gitlab/project_template.rb b/lib/gitlab/project_template.rb index b8b1c4b6490..ef656e5b2ce 100644 --- a/lib/gitlab/project_template.rb +++ b/lib/gitlab/project_template.rb @@ -2,14 +2,12 @@ module Gitlab class ProjectTemplate - attr_reader :title, :name, :description, :preview + attr_reader :title, :name, :description, :preview, :logo - def initialize(name, title, description, preview) - @name, @title, @description, @preview = name, title, description, preview + def initialize(name, title, description, preview, logo = 'illustrations/gitlab_logo.svg') + @name, @title, @description, @preview, @logo = name, title, description, preview, logo end - alias_method :logo, :name - def file archive_path.open end @@ -27,9 +25,9 @@ module Gitlab end TEMPLATES_TABLE = [ - ProjectTemplate.new('rails', 'Ruby on Rails', _('Includes an MVC structure, Gemfile, Rakefile, along with many others, to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/rails'), - ProjectTemplate.new('spring', 'Spring', _('Includes an MVC structure, mvnw and pom.xml to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/spring'), - ProjectTemplate.new('express', 'NodeJS Express', _('Includes an MVC structure to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/express'), + ProjectTemplate.new('rails', 'Ruby on Rails', _('Includes an MVC structure, Gemfile, Rakefile, along with many others, to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/rails', 'illustrations/logos/rails.svg'), + ProjectTemplate.new('spring', 'Spring', _('Includes an MVC structure, mvnw and pom.xml to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/spring', 'illustrations/logos/spring.svg'), + ProjectTemplate.new('express', 'NodeJS Express', _('Includes an MVC structure to help you get started.'), 'https://gitlab.com/gitlab-org/project-templates/express', 'illustrations/logos/express.svg'), ProjectTemplate.new('hugo', 'Pages/Hugo', _('Everything you need to create a GitLab Pages site using Hugo.'), 'https://gitlab.com/pages/hugo'), ProjectTemplate.new('jekyll', 'Pages/Jekyll', _('Everything you need to create a GitLab Pages site using Jekyll.'), 'https://gitlab.com/pages/jekyll'), ProjectTemplate.new('plainhtml', 'Pages/Plain HTML', _('Everything you need to create a GitLab Pages site using plain HTML.'), 'https://gitlab.com/pages/plain-html'), |