Difference between revisions of "Template:Internal Link Popup/doc"
(Created page with "{{info|text=This template is a work in progress. It requires CSS style sheet support and will not work properly without changes to either your or the global common.css.}} Thi...") |
m |
||
Line 31: | Line 31: | ||
#<code><nowiki>{{Internal Link Popup|link|foreign link}}</nowiki></code> | #<code><nowiki>{{Internal Link Popup|link|foreign link}}</nowiki></code> | ||
#<code><nowiki>{{Internal Link Popup|link|foreign link|language code}}</nowiki></code> | #<code><nowiki>{{Internal Link Popup|link|foreign link|language code}}</nowiki></code> | ||
+ | #<code><nowiki>{{Internal Link Popup|link|foreign link|language code|status=status of this page in EN MGP}}</nowiki></code> | ||
#<code><nowiki>{{Internal Link Popup|link|foreign link|lang=language code}}</nowiki></code> | #<code><nowiki>{{Internal Link Popup|link|foreign link|lang=language code}}</nowiki></code> | ||
+ | #<code><nowiki>{{Internal Link Popup|link|foreign link|lang=language code|status=status of this page in EN MGP}}</nowiki></code> | ||
Without a specified language code, the template's default reference language will be Chinese (zh), the largest of all Moegirlpedia by far. For example, the previous code, <code><nowiki>{{Internal Link Popup|link|foreign link}}</nowiki></code>, will show up as {{Internal Link Popup|link|foreign link}}. | Without a specified language code, the template's default reference language will be Chinese (zh), the largest of all Moegirlpedia by far. For example, the previous code, <code><nowiki>{{Internal Link Popup|link|foreign link}}</nowiki></code>, will show up as {{Internal Link Popup|link|foreign link}}. | ||
You may specify a language code; only <code>zh</code> and <code>ja</code> is accepted, as these are the only two other language that Moegirlpedia exists in. <code><nowiki>{{Internal Link Popup|link|foreign link|ja}}</nowiki></code> will show up as {{Internal Link Popup|link|foreign link|ja}}. | You may specify a language code; only <code>zh</code> and <code>ja</code> is accepted, as these are the only two other language that Moegirlpedia exists in. <code><nowiki>{{Internal Link Popup|link|foreign link|ja}}</nowiki></code> will show up as {{Internal Link Popup|link|foreign link|ja}}. | ||
+ | |||
+ | You can also replace the generic information (that "this page does not exist in English Moegirlpedia yet") with a custom message. <code><nowiki>{{Internal Link Popup|link|foreign link|status=This page exists in English but more info can be retrieved from the Chinese version. }}</nowiki></code> yields {{Internal Link Popup|link|foreign link|status=This page exists in English but more info can be retrieved from the Chinese version. }}. |
Revision as of 22:38, 25 August 2019
This template is a work in progress. It requires CSS style sheet support and will not work properly without changes to either your or the global common.css.
|
This template creates an internal link and a popup that appears when the user's mouse hover over the link, noting them that the linked page does not exist and that they may want to refer to Moegirlpedia in a different language. It is unlikely to work in mobile. You may also use the shortcut {{ILP}}
.
Prerequisite
This template requires the following css style to work:
.popup-host .internal-link-popup { display: block !important; visibility: hidden; opacity: 0; min-width: 400px; font-size: 80%; position: absolute; top: 100%; left: 0; z-index: 999 !important; background-color: #fff; border: 1px solid #deede0; padding: 5px; border-radius: 5px; transition: opacity 0.5s; } .popup-host:hover .internal-link-popup { visibility: visible; opacity: 1; }
Until they are included in the global common.css, you will need to include them in your own Common.css style sheet for this template to work correctly. Without the stylesheet, only the red link remains and no popups will appear.
Syntax
{{Internal Link Popup|link|foreign link}}
{{Internal Link Popup|link|foreign link|language code}}
{{Internal Link Popup|link|foreign link|language code|status=status of this page in EN MGP}}
{{Internal Link Popup|link|foreign link|lang=language code}}
{{Internal Link Popup|link|foreign link|lang=language code|status=status of this page in EN MGP}}
Without a specified language code, the template's default reference language will be Chinese (zh), the largest of all Moegirlpedia by far. For example, the previous code, {{Internal Link Popup|link|foreign link}}
, will show up as linkThis page does not exist in English Moegirlpedia yet. You may want to refer to this page on Chinese Moegirlpedia: foreign link. (zh:foreign link).
You may specify a language code; only zh
and ja
is accepted, as these are the only two other language that Moegirlpedia exists in. {{Internal Link Popup|link|foreign link|ja}}
will show up as linkThis page does not exist in English Moegirlpedia yet. You may want to refer to this page on Japanese Moegirlpedia: foreign link. (ja:foreign link).
You can also replace the generic information (that "this page does not exist in English Moegirlpedia yet") with a custom message. {{Internal Link Popup|link|foreign link|status=This page exists in English but more info can be retrieved from the Chinese version. }}
yields linkThis page does not exist in English Moegirlpedia yet. You may want to refer to this page on Chinese Moegirlpedia: foreign link. (zh:foreign link).