OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Add extract-css option
Oliver Günther82d32f78d29a
diff --git a/app/views/common/preview.html.erb b/app/views/common/preview.html.erbdeleted file mode 100644index ad6a08709de..00000000000--- a/app/views/common/preview.html.erb+++ /dev/null@@ -1,41 +0,0 @@-<%#-- copyright-OpenProject is an open source project management software.-Copyright (C) 2012-2020 the OpenProject GmbH--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License version 3.--OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-Copyright (C) 2006-2017 Jean-Philippe Lang-Copyright (C) 2010-2013 the ChiliProject Team--This program is free software; you can redistribute it and/or-modify it under the terms of the GNU General Public License-as published by the Free Software Foundation; either version 2-of the License, or (at your option) any later version.--This program is distributed in the hope that it will be useful,-but WITHOUT ANY WARRANTY; without even the implied warranty of-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-GNU General Public License for more details.--You should have received a copy of the GNU General Public License-along with this program; if not, write to the Free Software-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.--See docs/COPYRIGHT.rdoc for more details.--++#%>--<% texts.each_pair do |caption, text| %>- <fieldset class="preview">- <legend class="preview--legend"><%= "#{l(:label_preview)} - #{caption}" %></legend>- <% if text.blank? %>- <span class="preview--nothing-to-preview"><%= l(:nothing_to_preview) %></span>- <% else %>- <div class="wiki">- <%= format_text text, attachments: attachments, object: previewed %>- </div>- <% end %>- </fieldset>-<% end %>diff --git a/frontend/package.json b/frontend/package.jsonindex 5718b941f6c..46bc9b48f41 100644--- a/frontend/package.json+++ b/frontend/package.json@@ -132,7 +132,7 @@"scripts": {"analyze": "ng build --prod --stats-json && webpack-bundle-analyzer -p 9999 ../public/assets/frontend/stats.json","prebuild": "./scripts/link_plugin_placeholder.js",- "build": "ng build --prod --named-chunks --source-map",+ "build": "ng build --prod --named-chunks --source-map --extract-css","preserve": "./scripts/link_plugin_placeholder.js","serve": "node --max_old_space_size=8096 ./node_modules/@angular/cli/bin/ng serve --public-host http://localhost:4200","pretest": "./scripts/link_plugin_placeholder.js",diff --git a/frontend/src/global_styles/content/_preview.lsg b/frontend/src/global_styles/content/_preview.lsgdeleted file mode 100644index 652e1512791..00000000000--- a/frontend/src/global_styles/content/_preview.lsg+++ /dev/null@@ -1,17 +0,0 @@-# Preview--```-<fieldset class="preview">- <legend class="preview--legend">Preview - Description</legend>- <div class="wiki">- <h2>An article that's still being written.</h2>- </div>-</fieldset>-```--```-<fieldset class="preview">- <legend class="preview--legend">Preview - Description</legend>- <span class="preview--nothing-to-preview">Nothing to preview</span>-</fieldset>-```diff --git a/frontend/src/global_styles/content/_preview.sass b/frontend/src/global_styles/content/_preview.sassdeleted file mode 100644index 909ca2cf7dc..00000000000--- a/frontend/src/global_styles/content/_preview.sass+++ /dev/null@@ -1,45 +0,0 @@-//-- copyright-// OpenProject is an open source project management software.-// Copyright (C) 2012-2020 the OpenProject GmbH-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License version 3.-//-// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-// Copyright (C) 2006-2017 Jean-Philippe Lang-// Copyright (C) 2010-2013 the ChiliProject Team-//-// This program is free software; you can redistribute it and/or-// modify it under the terms of the GNU General Public License-// as published by the Free Software Foundation; either version 2-// of the License, or (at your option) any later version.-//-// This program is distributed in the hope that it will be useful,-// but WITHOUT ANY WARRANTY; without even the implied warranty of-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-// GNU General Public License for more details.-//-// You should have received a copy of the GNU General Public License-// along with this program; if not, write to the Free Software-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-//-// See docs/COPYRIGHT.rdoc for more details.-//++--.preview- @extend %form--fieldset-or-section- padding: 1rem- background: url('~assets/images/draft.png')- // Min-width has to be defined to avoid a content overflow- // of the preview window. Since this class is also applied to the buttons- // it should however not be too large.- min-width: 0- overflow-wrap: break-word- word-wrap: break-word--.preview--legend- @extend %form--fieldset-legend-or-section-title- border: 0--.preview--nothing-to-preview- color: red