mirror of
https://github.com/caddyserver/website.git
synced 2025-04-20 12:15:08 -04:00
Improve docs hovercard and nonstandard notice
This commit is contained in:
parent
773e99ec6e
commit
f3f21afac0
2 changed files with 5 additions and 4 deletions
|
@ -164,13 +164,11 @@ function beginRenderingInto($tpl, moduleID, module) {
|
|||
|
||||
// show notice if module is non-standard
|
||||
if (module.repo) {
|
||||
if (isStandard(module.structure.type_name)) {
|
||||
$('.nonstandard-notice', $tpl).remove();
|
||||
} else {
|
||||
if (!isStandard(module.structure.type_name)) {
|
||||
let { pkg, _ } = splitTypeName(module.structure.type_name);
|
||||
$('.nonstandard-project-link', $tpl).attr('href', module.repo).text(module.repo);
|
||||
$('.nonstandard-package-path', $tpl).text(pkg);
|
||||
$('.nonstandard-notice', $tpl).prepend(nonStandardFlag);
|
||||
$('.nonstandard-notice', $tpl).prepend(nonStandardFlag).show();
|
||||
}
|
||||
|
||||
var $repoName = $('<span/>').text(stripScheme(module.repo));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue