From a8976fd4dc5bc3da51744a527d442df072287b65 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Mon, 20 Jun 2016 14:42:36 +0100 Subject: [PATCH] Use plain links instead of buttons. --- .../web/app/views/project/editor/pdf.jade | 9 +- .../HumanReadableLogsRules.coffee | 82 +++++++++---------- .../public/stylesheets/app/editor/pdf.less | 27 ++++-- 3 files changed, 65 insertions(+), 53 deletions(-) diff --git a/services/web/app/views/project/editor/pdf.jade b/services/web/app/views/project/editor/pdf.jade index 192bdf71d0..6b24e240e7 100644 --- a/services/web/app/views/project/editor/pdf.jade +++ b/services/web/app/views/project/editor/pdf.jade @@ -111,14 +111,13 @@ div.full-size.pdf(ng-controller="PdfController") p.card-hint-text(ng-show="entry.humanReadableHint", ng-bind-html="entry.humanReadableHint") .card-hint-actions .card-hint-action-ext-link - a.btn.btn-sm.btn-default(ng-href="{{ entry.extraInfoURL }}", target="_blank") + a(ng-href="{{ entry.extraInfoURL }}", target="_blank") i.fa.fa-external-link | #{translate("log_hint_extra_info")} .card-hint-action-feedback - label.card-hint-enquiry-label #{translate("log_hint_enquiry_helpful")}  - .btn-group.btn-group-sm(role="group") - button.btn.btn-default #{translate("answer_yes")} - button.btn.btn-default #{translate("answer_no")} + label.card-hint-enquiry-label #{translate("log_hint_enquiry_helpful")} + a #{translate("answer_yes")} + a #{translate("answer_no")} p.entry-content(ng-show="entry.content") {{ entry.content }} p diff --git a/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee b/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee index 16293b0387..95967fbbce 100644 --- a/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee +++ b/services/web/public/coffee/ide/human-readable-logs/HumanReadableLogsRules.coffee @@ -1,43 +1,43 @@ define -> [ - regexToMatch: /Too many }'s/ - extraInfoURL: "https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Too_many_.7D.27s" - humanReadableHint: """ - The reason LaTeX thinks there are too many }'s here is that the opening curly brace is missing after the \\date control sequence and before the word December, so the closing curly brace is seen as one too many (which it is!). - """ - , - regexToMatch: /Undefined control sequence/ - extraInfoURL: "https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Undefined_control_sequence" - humanReadableHint: """ - In this example, LaTeX is complaining that it has no such command ("control sequence") as \\dtae. Obviously it's been mistyped, but only a human can detect that fact: all LaTeX knows is that \\dtae is not a command it knows about: it's undefined. - """ - , - regexToMatch: /Missing \$ inserted/ - extraInfoURL: "https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Not_in_Mathematics_Mode" - humanReadableHint: """ - A character that can only be used in the mathematics was inserted in normal text. If you intended to use mathematics mode, then use $...$ or \\begin{math}...\\end{math} or use the 'quick math mode': \\ensuremath{...}. - """ - , - regexToMatch: /Runaway argument/ - extraInfoURL: "https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Runaway_argument" - humanReadableHint: """ - In this error, the closing curly brace has been omitted from the date. It's the opposite of the error of too many }'s, and it results in \\maketitle trying to format the title page while LaTeX is still expecting more text for the date! - """ - , - regexToMatch: /Underfull \\hbox/ - extraInfoURL: "https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Underfull_hbox" - humanReadableHint: """ - This is a warning that LaTeX cannot stretch the line wide enough to fit, without making the spacing bigger than its currently permitted maximum. The badness (0-10,000) indicates how severe this is (here you can probably ignore a badness of 1394). - """ - , - regexToMatch: /Overfull \\hbox/ - extraInfoURL: "https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Overfull_hbox" - humanReadableHint: """ - An overfull \\hbox means that there is a hyphenation or justification problem: moving the last word on the line to the next line would make the spaces in the line wider than the current limit; keeping the word on the line would make the spaces smaller than the current limit, so the word is left on the line, but with the minimum allowed space between words, and which makes the line go over the edge. - """ - , - regexToMatch: /LaTeX Error: File .* not found/ - extraInfoURL: "https://en.wikibooks.org/wiki/LaTeX/Errors_and_Warnings#Missing_package" - humanReadableHint: """ - When you use the \\usepackage command to request LaTeX to use a certain package, it will look for a file with the specified name and the filetype .sty. In this case the user has mistyped the name of the paralist package, so it's easy to fix. - """ + regexToMatch: /Too many }'s/ + extraInfoURL: "" + humanReadableHint: """ + The reason LaTeX thinks there are too many }'s here is that the opening curly brace is missing after the \\date control sequence and before the word December, so the closing curly brace is seen as one too many (which it is!). + """ + , + regexToMatch: /Undefined control sequence/ + extraInfoURL: "/learn/Errors:Undefined_control_sequence." + humanReadableHint: """ + In this example, LaTeX is complaining that it has no such command ("control sequence") as \\dtae. Obviously it's been mistyped, but only a human can detect that fact: all LaTeX knows is that \\dtae is not a command it knows about: it's undefined. + """ + , + regexToMatch: /Missing \$ inserted/ + extraInfoURL: "/learn/Errors:Missing_$_inserted" + humanReadableHint: """ + A character that can only be used in the mathematics was inserted in normal text. If you intended to use mathematics mode, then use $...$ or \\begin{math}...\\end{math} or use the 'quick math mode': \\ensuremath{...}. + """ + , + regexToMatch: /Runaway argument/ + extraInfoURL: "/learn/Errors:Undefined_control_sequence." + humanReadableHint: """ + In this error, the closing curly brace has been omitted from the date. It's the opposite of the error of too many }'s, and it results in \\maketitle trying to format the title page while LaTeX is still expecting more text for the date! + """ + , + regexToMatch: /Underfull \\hbox/ + extraInfoURL: "/learn/Errors:Underfull_%5Chbox" + humanReadableHint: """ + This is a warning that LaTeX cannot stretch the line wide enough to fit, without making the spacing bigger than its currently permitted maximum. The badness (0-10,000) indicates how severe this is (here you can probably ignore a badness of 1394). + """ + , + regexToMatch: /Overfull \\hbox/ + extraInfoURL: "" + humanReadableHint: """ + An overfull \\hbox means that there is a hyphenation or justification problem: moving the last word on the line to the next line would make the spaces in the line wider than the current limit; keeping the word on the line would make the spaces smaller than the current limit, so the word is left on the line, but with the minimum allowed space between words, and which makes the line go over the edge. + """ + , + regexToMatch: /LaTeX Error: File .* not found/ + extraInfoURL: "/learn/Errors:missing_package" + humanReadableHint: """ + When you use the \\usepackage command to request LaTeX to use a certain package, it will look for a file with the specified name and the filetype .sty. In this case the user has mistyped the name of the paralist package, so it's easy to fix. + """ ] \ No newline at end of file diff --git a/services/web/public/stylesheets/app/editor/pdf.less b/services/web/public/stylesheets/app/editor/pdf.less index 2fa851c190..cdb994c1b2 100644 --- a/services/web/public/stylesheets/app/editor/pdf.less +++ b/services/web/public/stylesheets/app/editor/pdf.less @@ -195,6 +195,19 @@ .fa { color: #FFF; } + + .alert-danger & { + color: @alert-danger-border; + } + + .alert-warning & { + color: @alert-warning-border; + } + + .alert-info & { + color: @alert-info-border; + } + } &-text, @@ -205,9 +218,8 @@ } &-enquiry-label { - font-size: 0.8rem; + font-size: inherit; margin-bottom: 0; - margin-right: 0.5em; font-weight: normal; } @@ -218,18 +230,19 @@ &-action-ext-link, &-action-feedback { display: inline-block; + font-size: 0.8rem; } &-action-feedback { float: right; + + a { + margin-left: 0.5em; + } } & + p { margin-top: 20px; } - - a { - - } -} \ No newline at end of file +}