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
|
@ -453,6 +453,7 @@ iframe {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: #886c00;
|
color: #886c00;
|
||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nonstandard {
|
.nonstandard {
|
||||||
|
@ -519,6 +520,8 @@ article .json a {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
transition: transform .25s ease-in-out, opacity .25s ease-in-out;
|
transition: transform .25s ease-in-out, opacity .25s ease-in-out;
|
||||||
|
max-height: 50%;
|
||||||
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#hovercard:not(.popup) {
|
#hovercard:not(.popup) {
|
||||||
|
|
|
@ -164,13 +164,11 @@ function beginRenderingInto($tpl, moduleID, module) {
|
||||||
|
|
||||||
// show notice if module is non-standard
|
// show notice if module is non-standard
|
||||||
if (module.repo) {
|
if (module.repo) {
|
||||||
if (isStandard(module.structure.type_name)) {
|
if (!isStandard(module.structure.type_name)) {
|
||||||
$('.nonstandard-notice', $tpl).remove();
|
|
||||||
} else {
|
|
||||||
let { pkg, _ } = splitTypeName(module.structure.type_name);
|
let { pkg, _ } = splitTypeName(module.structure.type_name);
|
||||||
$('.nonstandard-project-link', $tpl).attr('href', module.repo).text(module.repo);
|
$('.nonstandard-project-link', $tpl).attr('href', module.repo).text(module.repo);
|
||||||
$('.nonstandard-package-path', $tpl).text(pkg);
|
$('.nonstandard-package-path', $tpl).text(pkg);
|
||||||
$('.nonstandard-notice', $tpl).prepend(nonStandardFlag);
|
$('.nonstandard-notice', $tpl).prepend(nonStandardFlag).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
var $repoName = $('<span/>').text(stripScheme(module.repo));
|
var $repoName = $('<span/>').text(stripScheme(module.repo));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue