ci: improve release process, clean up and re-org repo, add automated minification (#143)
* ci: update scripts * release 2.7.1 * remove tracked stylesheets * docs: revert stable tag to 2.7.0 * chore: move Plugin source into own dir * docs: delete info texts These can now be found in the [project wiki][wiki]. [wiki]: https://github.com/markcheret/footnotes/wiki * docs: tweak contributing guide * ci: reflect new directory structure * chore: update gitignore * chore: reflect new dir structure * docs: update documentation * build(linting): add Husky hooks, Markdown linting, lint all MD files * fix pre-push command * fix pre-push command * build: add stylesheet, JS minification * ci: add linting steps * ci: comment out CSS linting step (that's going to be a whole *thing*) * ci: minify all JS files * ci: call correct JS file * chore: lint * ci: fix PHP linting commands * chore: increment version constant string * ci: concat AMP stylesheets * ci: improve build scripts * chore: add assets dir
This commit is contained in:
parent
e780d817c1
commit
6a1117be15
183 changed files with 9761 additions and 2941 deletions
14
src/templates/dashboard/configure-label-solution.html
Normal file
14
src/templates/dashboard/configure-label-solution.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<div class="footnotes_description">
|
||||
<p>[[description-1-selection]]</p>
|
||||
</div>
|
||||
<table class="configure-label-solution widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-selection]]</td>
|
||||
<td>[[selection]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-2-selection]]</p>
|
||||
</div>
|
18
src/templates/dashboard/customize-css-migration.html
Normal file
18
src/templates/dashboard/customize-css-migration.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<div class="footnotes_description">
|
||||
<p>[[description-css]]</p>
|
||||
</div>
|
||||
<table class="customize_css_migration widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-css]]</td>
|
||||
<td>[[css]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-show-legacy]]</td>
|
||||
<td>[[show-legacy]] <span class="footnotes_notice">[[notice-show-legacy]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-show-legacy]]</p>
|
||||
</div>
|
33
src/templates/dashboard/customize-css-new.html
Normal file
33
src/templates/dashboard/customize-css-new.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<table id="customize_css_new" class="customize_css_new widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[headline]]<br />
|
||||
<div class="list">
|
||||
<p>.footnote_referrer = enclosing <span>
|
||||
<p>.footnote_referrer > a = optional <a> enclosing the <sup>
|
||||
<p>.footnote_plugin_tooltip_text = inner <sup>, not tooltip
|
||||
<p><!--closing p tags are not mandatory-->
|
||||
<p>.footnote_tooltip = inner <span>
|
||||
<p>.footnote_tooltip_continue = nested <span>
|
||||
<p><!--closing p tags are not mandatory-->
|
||||
<p>.footnotes_reference_container = enclosing <div>
|
||||
<p>.footnote_container_prepare = label <div>
|
||||
<p>.footnote_reference_container_label = <span>
|
||||
<p>.footnote_reference_container_collapse_button = sibling <span>
|
||||
<p><!--closing p tags are not mandatory-->
|
||||
<p>.footnotes_table = <table>
|
||||
<p>.footnotes_plugin_reference_row = <tr>
|
||||
<p>.footnote_plugin_index_combi = first <td> if identical footnotes are combined
|
||||
<p>.footnote_plugin_index = first <td> if identical footnotes are not combined
|
||||
<p>.footnote_index = <a> or <span> in first <td> in 3-column table
|
||||
<p>.footnote_plugin_symbol = second <td> in 3-column table
|
||||
<p>.footnote_plugin_link = <a> or <span> if identical footnotes are not combined
|
||||
<p>.footnote_backlink = <a> or <span> if identical footnotes are combined, or in second <td> in 3-column table
|
||||
<p>.footnote_index_arrow = nested <span>, symbol only
|
||||
<p>.footnote_plugin_text = second <td>, or third <td> in 3-column table
|
||||
</div>
|
||||
</td>
|
||||
<td>[[css]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
11
src/templates/dashboard/customize-css.html
Normal file
11
src/templates/dashboard/customize-css.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="footnotes_description">
|
||||
<p>[[description-css]]</p>
|
||||
</div>
|
||||
<table class="customize_css widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-css]]</td>
|
||||
<td>[[css]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
15
src/templates/dashboard/customize-hyperlink-arrow.html
Normal file
15
src/templates/dashboard/customize-hyperlink-arrow.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<table class="customize_hyperlink_arrow widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-symbol]]</td>
|
||||
<td>
|
||||
[[symbol-options]]
|
||||
[[symbol-custom]]
|
||||
<span class="footnotes_notice">[[notice-symbol]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-symbol]]</p>
|
||||
</div>
|
24
src/templates/dashboard/customize-superscript.html
Normal file
24
src/templates/dashboard/customize-superscript.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
<table class="customize_superscript widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-superscript]]</td>
|
||||
<td>[[superscript]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-normalize]]</td>
|
||||
<td>[[normalize]] <span class="footnotes_notice">[[notice-normalize]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-before]]</td>
|
||||
<td>[[before]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-after]]</td>
|
||||
<td>[[after]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-link]]</td>
|
||||
<td><span class="footnotes_notice">[[notice-link]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
62
src/templates/dashboard/editor-button.html
Normal file
62
src/templates/dashboard/editor-button.html
Normal file
|
@ -0,0 +1,62 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Footnote button for the Classic Editor text mode.
|
||||
*
|
||||
* @since 1.3.0
|
||||
* @lastmodified 2021-02-18T2043+0100
|
||||
*
|
||||
* @since 2.5.4 Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report.
|
||||
* @since 2.5.4 Bugfix: Editor button: Classic Editor text mode: correct label to singular.
|
||||
*/?>
|
||||
-->
|
||||
<script type="text/javascript">
|
||||
/**
|
||||
* Brackets the selected text with tags in the text area.
|
||||
*
|
||||
* @param string elementID
|
||||
* @param string openTag
|
||||
* @param string closeTag
|
||||
*/
|
||||
function MCI_Footnotes_wrapText(elementID, openTag, closeTag) {
|
||||
var textArea = jQuery('#' + elementID);
|
||||
var len = textArea.val().length;
|
||||
var start = textArea[0].selectionStart;
|
||||
var end = textArea[0].selectionEnd;
|
||||
var selectedText = textArea.val().substring(start, end);
|
||||
var replacement = openTag + selectedText + closeTag;
|
||||
textArea.val(textArea.val().substring(0, start) + replacement + textArea.val().substring(end, len));
|
||||
}
|
||||
/**
|
||||
* Adds a button to the Classic Editor text mode.
|
||||
*
|
||||
* - Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report.
|
||||
*
|
||||
* @reporter @dpartridge
|
||||
* @link https://wordpress.org/support/topic/qtags-addbutton/
|
||||
*
|
||||
*/
|
||||
if ( QTags ) {
|
||||
QTags.addButton( 'MCI_Footnotes_QuickTag_button', 'footnote', MCI_Footnotes_text_editor_callback );
|
||||
}
|
||||
|
||||
/**
|
||||
* callback function when the button is clicked
|
||||
* executes a ajax call to get the start and end tag for the footnotes and
|
||||
* adds them in before and after the selected text
|
||||
*/
|
||||
function MCI_Footnotes_text_editor_callback() {
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: '/wp-admin/admin-ajax.php',
|
||||
data: {
|
||||
action: 'footnotes_getTags'
|
||||
},
|
||||
success: function(data, textStatus, XMLHttpRequest){
|
||||
var l_arr_Tags = JSON.parse(data);
|
||||
MCI_Footnotes_wrapText("content", l_arr_Tags['start'], l_arr_Tags['end']);
|
||||
},
|
||||
error: function(MLHttpRequest, textStatus, errorThrown){
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
50
src/templates/dashboard/expert-lookup.html
Normal file
50
src/templates/dashboard/expert-lookup.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
<div class="footnotes_description">
|
||||
<p>[[description-1]]</p>
|
||||
<p>[[description-2]]</p>
|
||||
<p>[[description-3]]</p>
|
||||
</div>
|
||||
<table class="expert_lookup widefat fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>[[head-hook]]</th>
|
||||
<th>[[head-checkbox]]</th>
|
||||
<th>[[head-numbox]]</th>
|
||||
<th>[[head-url]]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-the-title]]</td>
|
||||
<td>[[the-title]]</td>
|
||||
<td>[[priority-the-title]]</td>
|
||||
<td><a href="[[url-the-title]]" target="_blank">[[url-the-title]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-the-content]]</td>
|
||||
<td>[[the-content]]</td>
|
||||
<td>[[priority-the-content]]</td>
|
||||
<td><a href="[[url-the-content]]" target="_blank">[[url-the-content]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-the-excerpt]]</td>
|
||||
<td>[[the-excerpt]]</td>
|
||||
<td>[[priority-the-excerpt]]</td>
|
||||
<td><a href="[[url-the-excerpt]]" target="_blank">[[url-the-excerpt]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-widget-title]]</td>
|
||||
<td>[[widget-title]]</td>
|
||||
<td>[[priority-widget-title]]</td>
|
||||
<td><a href="[[url-widget-title]]" target="_blank">[[url-widget-title]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-widget-text]]</td>
|
||||
<td>[[widget-text]]</td>
|
||||
<td>[[priority-widget-text]]</td>
|
||||
<td><a href="[[url-widget-text]]" target="_blank">[[url-widget-text]]</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-4]]</p>
|
||||
</div>
|
2
src/templates/dashboard/how-to-donate.html
Normal file
2
src/templates/dashboard/how-to-donate.html
Normal file
|
@ -0,0 +1,2 @@
|
|||
<input type="button" class="button button-primary" value="[[caption]]"
|
||||
onclick="window.open('https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6Z6CZDW8PPBBJ');" />
|
17
src/templates/dashboard/how-to-help.html
Normal file
17
src/templates/dashboard/how-to-help.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div class="footnote_placeholder_box_container">
|
||||
[[label-start]] <b>[[start]]</b>
|
||||
<br/>
|
||||
[[label-end]] <b>[[end]]</b>
|
||||
</div>
|
||||
|
||||
<div class="footnote_placeholder_box_example">
|
||||
<span class="footnote_highlight_placeholder">[[example-code]]</span>
|
||||
<br/>
|
||||
[[example-string]]
|
||||
<br/>
|
||||
[[example]]
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;">
|
||||
[[information]]
|
||||
</div>
|
32
src/templates/dashboard/mouse-over-box-appearance.html
Normal file
32
src/templates/dashboard/mouse-over-box-appearance.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<table class="mouse_over_box_appearance widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-font-size]]</td>
|
||||
<td>[[font-size-enable]][[font-size-scalar]][[font-size-unit]] <span class="footnotes_notice">[[notice-font-size]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-color]]</td>
|
||||
<td>[[color]] <span class="footnotes_notice">[[notice-color]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-background]]</td>
|
||||
<td>[[background]] <span class="footnotes_notice">[[notice-background]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-width]]</td>
|
||||
<td>[[border-width]] <span class="footnotes_notice">[[notice-border-width]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-color]]</td>
|
||||
<td>[[border-color]] <span class="footnotes_notice">[[notice-border-color]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-radius]]</td>
|
||||
<td>[[border-radius]] <span class="footnotes_notice">[[notice-border-radius]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-box-shadow-color]]</td>
|
||||
<td>[[box-shadow-color]] <span class="footnotes_notice">[[notice-box-shadow-color]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
8
src/templates/dashboard/mouse-over-box-dimensions.html
Normal file
8
src/templates/dashboard/mouse-over-box-dimensions.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<table class="mouse_over_box_dimensions widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-max-width]]</td>
|
||||
<td>[[max-width]] [[width]] <span class="footnotes_notice">[[notice-max-width]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
15
src/templates/dashboard/mouse-over-box-display.html
Normal file
15
src/templates/dashboard/mouse-over-box-display.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<table class="mouse_over_box_display widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-enable]]</td>
|
||||
<td>[[enable]] <span class="footnotes_notice">[[notice-enable]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-alternative]]</td>
|
||||
<td>[[alternative]] <span class="footnotes_notice">[[notice-alternative]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-alternative]]</p>
|
||||
</div>
|
16
src/templates/dashboard/mouse-over-box-position.html
Normal file
16
src/templates/dashboard/mouse-over-box-position.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<table class="mouse_over_box_position widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-position]]</td>
|
||||
<td>[[position]] [[position-alternative]] <span class="footnotes_notice">[[notice-position]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-x]]</td>
|
||||
<td>[[offset-x]] [[offset-x-alternative]] <span class="footnotes_notice">[[notice-offset-x]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-y]]</td>
|
||||
<td>[[offset-y]] [[offset-y-alternative]] <span class="footnotes_notice">[[notice-offset-y]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
22
src/templates/dashboard/mouse-over-box-text.html
Normal file
22
src/templates/dashboard/mouse-over-box-text.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
<div class="footnotes_description">
|
||||
<p>[[description-delimiter]]</p>
|
||||
</div>
|
||||
<table class="mouse_over_box_text widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-delimiter]]</td>
|
||||
<td>[[delimiter]] <span class="footnotes_notice">[[notice-delimiter]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-mirror]]</td>
|
||||
<td>[[mirror]] <span class="footnotes_notice">[[notice-mirror]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-separator]]</td>
|
||||
<td>[[separator]] <span class="footnotes_notice">[[notice-separator]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-mirror]]</p>
|
||||
</div>
|
20
src/templates/dashboard/mouse-over-box-timing.html
Normal file
20
src/templates/dashboard/mouse-over-box-timing.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<table class="mouse_over_box_timing widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-fade-in-delay]]</td>
|
||||
<td>[[fade-in-delay]] <span class="footnotes_notice">[[notice-fade-in-delay]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-in-duration]]</td>
|
||||
<td>[[fade-in-duration]] <span class="footnotes_notice">[[notice-fade-in-duration]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-out-delay]]</td>
|
||||
<td>[[fade-out-delay]] <span class="footnotes_notice">[[notice-fade-out-delay]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-out-duration]]</td>
|
||||
<td>[[fade-out-duration]] <span class="footnotes_notice">[[notice-fade-out-duration]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
16
src/templates/dashboard/mouse-over-box-truncation.html
Normal file
16
src/templates/dashboard/mouse-over-box-truncation.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<table class="mouse_over_box_truncation widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-truncation]]</td>
|
||||
<td>[[truncation]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-max-length]]</td>
|
||||
<td>[[max-length]] <span class="footnotes_notice">[[notice-max-length]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-readon]]</td>
|
||||
<td>[[readon]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
91
src/templates/dashboard/other-plugins.html
Normal file
91
src/templates/dashboard/other-plugins.html
Normal file
|
@ -0,0 +1,91 @@
|
|||
<div class="plugin-card">
|
||||
<div class="plugin-card-top">
|
||||
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox plugin-icon">
|
||||
<img src="[[plugin-icon]]"/>
|
||||
</a>
|
||||
<div class="name column-name">
|
||||
<h4>
|
||||
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox">[[plugin-title]]</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="action-links">
|
||||
<ul class="plugin-action-buttons">
|
||||
<li>
|
||||
[[install-link]]
|
||||
</li>
|
||||
<li>
|
||||
<a href="[[server]]/wp-admin/plugin-install.php?tab=plugin-information&plugin=[[plugin-name]]&TB_iframe=true&width=600&height=550" class="thickbox" aria-label="More information about [[plugin-title]]" data-title="[[plugin-title]]">[[more-details-label]]</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="desc column-description">
|
||||
<p id="manfisher-[[plugin-name]]-description"></p>
|
||||
<p class="authors">
|
||||
<cite id="manfisher-[[plugin-name]]-author"></cite>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="plugin-card-bottom">
|
||||
<div class="vers column-rating">
|
||||
<div class="star-rating" title="">
|
||||
<span class="screen-reader-text" id="manfisher-[[plugin-name]]-rating-text"></span>
|
||||
<div class="star"></div>
|
||||
<div class="star"></div>
|
||||
<div class="star"></div>
|
||||
<div class="star"></div>
|
||||
<div class="star"></div>
|
||||
</div>
|
||||
<span class="num-ratings" id="manfisher-[[plugin-name]]-rating-num"></span>
|
||||
</div>
|
||||
<div class="column-updated">
|
||||
<strong>[[last-updated-label]]:</strong>
|
||||
<span id="manfisher-[[plugin-name]]-updated"></span>
|
||||
</div>
|
||||
<div class="column-downloaded" id="manfisher-[[plugin-name]]-downloads"></div>
|
||||
<div class="column-compatibility">
|
||||
<!--<span class="compatibility-compatible"></span>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: '/wp-admin/admin-ajax.php',
|
||||
data: {
|
||||
action: 'footnotes_get_plugin_info',
|
||||
plugin: '[[plugin-name]]'
|
||||
},
|
||||
dataType: 'json',
|
||||
success: function (data, textStatus, XMLHttpRequest) {
|
||||
var l_obj_Description = jQuery("#manfisher-[[plugin-name]]-description");
|
||||
var l_obj_Author = jQuery("#manfisher-[[plugin-name]]-author");
|
||||
var l_obj_RatingText = jQuery("#manfisher-[[plugin-name]]-rating-text");
|
||||
var l_obj_RatingNum = jQuery("#manfisher-[[plugin-name]]-rating-num");
|
||||
var l_obj_LastUpdated = jQuery("#manfisher-[[plugin-name]]-updated");
|
||||
var l_obj_Downloads = jQuery("#manfisher-[[plugin-name]]-downloads");
|
||||
|
||||
if (data == null) {
|
||||
l_obj_Description.text("No response received.");
|
||||
} else if (data.error) {
|
||||
l_obj_Description.text(data.error);
|
||||
} else {
|
||||
l_obj_Description.text(data.PluginDescription);
|
||||
l_obj_Author.append("By " + data.PluginAuthor);
|
||||
l_obj_RatingText.text(data.PluginRatingText);
|
||||
l_obj_RatingText.next().addClass(data.PluginRating1);
|
||||
l_obj_RatingText.next().next().addClass(data.PluginRating2);
|
||||
l_obj_RatingText.next().next().next().addClass(data.PluginRating3);
|
||||
l_obj_RatingText.next().next().next().next().addClass(data.PluginRating4);
|
||||
l_obj_RatingText.next().next().next().next().next().addClass(data.PluginRating5);
|
||||
l_obj_RatingNum.text("(" + data.PluginRating + ")");
|
||||
l_obj_LastUpdated.text(data.PluginLastUpdated);
|
||||
l_obj_Downloads.text(data.PluginDownloads + " downloads");
|
||||
}
|
||||
},
|
||||
error: function (MLHttpRequest, textStatus, errorThrown) {
|
||||
console.log(textStatus);
|
||||
}
|
||||
});
|
||||
</script>
|
14
src/templates/dashboard/settings-amp.html
Normal file
14
src/templates/dashboard/settings-amp.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<div class="footnotes_description">
|
||||
<p>[[description-1-amp]]</p>
|
||||
</div>
|
||||
<table class="settings_amp widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-amp]]</td>
|
||||
<td>[[amp]] <span class="footnotes_notice">[[notice-amp]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-2-amp]]</p>
|
||||
</div>
|
11
src/templates/dashboard/settings-excerpts.html
Normal file
11
src/templates/dashboard/settings-excerpts.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<table class="settings_excerpts widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-excerpts]]</td>
|
||||
<td>[[excerpts]] <span class="footnotes_notice">[[notice-excerpts]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-excerpts]]</p>
|
||||
</div>
|
28
src/templates/dashboard/settings-hard-links.html
Normal file
28
src/templates/dashboard/settings-hard-links.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<table class="settings_hard_links widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-hard-links]]</td>
|
||||
<td>[[hard-links]] <span class="footnotes_notice">[[notice-hard-links]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-footnote]]</td>
|
||||
<td>[[footnote]] <span class="footnotes_notice">[[notice-footnote]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-referrer]]</td>
|
||||
<td>[[referrer]] <span class="footnotes_notice">[[notice-referrer]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-separator]]</td>
|
||||
<td>[[separator]] <span class="footnotes_notice">[[notice-separator]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-backlink-tooltips]]</td>
|
||||
<td>[[backlink-tooltips]] <span class="footnotes_notice">[[notice-backlink-tooltips]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-backlink-tooltip-text]]</td>
|
||||
<td>[[backlink-tooltip-text]] <span class="footnotes_notice">[[notice-backlink-tooltip-text]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
12
src/templates/dashboard/settings-love.html
Normal file
12
src/templates/dashboard/settings-love.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<table class="settings_love widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-love]]</td>
|
||||
<td>[[love]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-no-love]]</td>
|
||||
<td>[[no-love]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
15
src/templates/dashboard/settings-numbering.html
Normal file
15
src/templates/dashboard/settings-numbering.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<table class="settings_numbering widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-counter-style]]</td>
|
||||
<td>[[counter-style]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-identical]]</td>
|
||||
<td>[[identical]] <span class="footnotes_notice">[[notice-identical]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-identical]]</p>
|
||||
</div>
|
121
src/templates/dashboard/settings-reference-container.html
Normal file
121
src/templates/dashboard/settings-reference-container.html
Normal file
|
@ -0,0 +1,121 @@
|
|||
<table class="settings_reference_container widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-name]]</td>
|
||||
<td>[[name]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-element]]</td>
|
||||
<td>[[element]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border]]</td>
|
||||
<td>[[border]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-collapse]]</td>
|
||||
<td>[[collapse]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-script]]</td>
|
||||
<td>[[script]] <span class="footnotes_notice">[[notice-script]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-position]]</td>
|
||||
<td>[[position]] <span class="footnotes_notice">[[notice-position]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-shortcode]]</td>
|
||||
<td>[[shortcode]] <span class="footnotes_notice">[[notice-shortcode]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-section]]</td>
|
||||
<td>[[section]] <span class="footnotes_notice">[[notice-section]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-startpage]]</td>
|
||||
<td>[[startpage]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-margin-top]]</td>
|
||||
<td>[[margin-top]] <span class="footnotes_notice">[[notice-margin-top]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-margin-bottom]]</td>
|
||||
<td>[[margin-bottom]] <span class="footnotes_notice">[[notice-margin-bottom]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-page-layout]]</td>
|
||||
<td>[[page-layout]] <span class="footnotes_notice">[[notice-page-layout]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-url-wrap]]</td>
|
||||
<td>[[url-wrap]] <span class="footnotes_notice">[[notice-url-wrap]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-symbol]]</td>
|
||||
<td>[[symbol-enable]] <span class="footnotes_notice">[[notice-symbol]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-switch]]</td>
|
||||
<td>[[switch]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-3column]]</td>
|
||||
<td>[[3column]] <span class="footnotes_notice">[[notice-3column]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-row-borders]]</td>
|
||||
<td>[[row-borders]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-separator]]</td>
|
||||
<td>
|
||||
[[separator-enable]]
|
||||
[[separator-options]]
|
||||
[[separator-custom]]
|
||||
<span class="footnotes_notice">[[notice-separator]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-terminator]]</td>
|
||||
<td>
|
||||
[[terminator-enable]]
|
||||
[[terminator-options]]
|
||||
[[terminator-custom]]
|
||||
<span class="footnotes_notice">[[notice-terminator]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-width]]</td>
|
||||
<td>
|
||||
[[width-enable]]
|
||||
[[width-scalar]]
|
||||
[[width-unit]]
|
||||
<span class="footnotes_notice">[[notice-width]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-max-width]]</td>
|
||||
<td>
|
||||
[[max-width-enable]]
|
||||
[[max-width-scalar]]
|
||||
[[max-width-unit]]
|
||||
<span class="footnotes_notice">[[notice-max-width]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-line-break]]</td>
|
||||
<td>[[line-break]]
|
||||
<span class="footnotes_notice">[[notice-line-break]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-link]]</td>
|
||||
<td>[[link]] <span class="footnotes_notice">[[notice-link]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-link]]</p>
|
||||
</div>
|
32
src/templates/dashboard/settings-scrolling.html
Normal file
32
src/templates/dashboard/settings-scrolling.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<table class="settings_scrolling widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-scroll-css]]</td>
|
||||
<td>[[scroll-css]] <span class="footnotes_notice">[[notice-scroll-css]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-offset]]</td>
|
||||
<td>[[scroll-offset]] <span class="footnotes_notice">[[notice-scroll-offset]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-duration]]</td>
|
||||
<td>[[scroll-duration]] <span class="footnotes_notice">[[notice-scroll-duration]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-asymmetricity]]</td>
|
||||
<td>[[scroll-asymmetricity]] <span class="footnotes_notice">[[notice-scroll-asymmetricity]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-down-duration]]</td>
|
||||
<td>[[scroll-down-duration]] <span class="footnotes_notice">[[notice-scroll-down-duration]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-down-delay]]</td>
|
||||
<td>[[scroll-down-delay]] <span class="footnotes_notice">[[notice-scroll-down-delay]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-up-delay]]</td>
|
||||
<td>[[scroll-up-delay]] <span class="footnotes_notice">[[notice-scroll-up-delay]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
63
src/templates/dashboard/settings-start-end.html
Normal file
63
src/templates/dashboard/settings-start-end.html
Normal file
|
@ -0,0 +1,63 @@
|
|||
<div class="footnotes_description">
|
||||
<p>[[description-escapement]]</p>
|
||||
</div>
|
||||
<table class="settings_start_end widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-short-code-start]]</td>
|
||||
<td>
|
||||
<span>[[short-code-start]]</span>
|
||||
<span>[[short-code-start-user]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-short-code-end]]</td>
|
||||
<td>
|
||||
<span>[[short-code-end]]</span>
|
||||
<span>[[short-code-end-user]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-parentheses]]</p>
|
||||
</div>
|
||||
<table class="settings_start_end widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-syntax]]</td>
|
||||
<td>[[syntax]] <span class="footnotes_notice">[[notice-syntax]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description-syntax]]</p>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var l_obj_ShortCodeStart = jQuery("#[[short-code-start-id]]");
|
||||
var l_obj_ShortCodeEnd = jQuery("#[[short-code-end-id]]");
|
||||
var l_obj_ShortCodeStartUserDefined = jQuery("#[[short-code-start-user-id]]");
|
||||
var l_obj_ShortCodeEndUserDefined = jQuery("#[[short-code-end-user-id]]");
|
||||
|
||||
function footnotes_Display_UserDefined_Placeholders() {
|
||||
if (l_obj_ShortCodeStart.val() == "userdefined") {
|
||||
l_obj_ShortCodeStartUserDefined.parent().show();
|
||||
l_obj_ShortCodeEndUserDefined.parent().show();
|
||||
} else {
|
||||
l_obj_ShortCodeStartUserDefined.parent().hide();
|
||||
l_obj_ShortCodeEndUserDefined.parent().hide();
|
||||
}
|
||||
}
|
||||
footnotes_Display_UserDefined_Placeholders();
|
||||
|
||||
l_obj_ShortCodeStart.on('change', function() {
|
||||
var l_int_SelectedIndex = jQuery(this).prop("selectedIndex");
|
||||
jQuery('#[[short-code-end-id]] option:eq(' + l_int_SelectedIndex + ')').prop('selected', true);
|
||||
footnotes_Display_UserDefined_Placeholders();
|
||||
});
|
||||
l_obj_ShortCodeEnd.on('change', function() {
|
||||
var l_int_SelectedIndex = jQuery(this).prop("selectedIndex");
|
||||
jQuery('#[[short-code-start-id]] option:eq(' + l_int_SelectedIndex + ')').prop('selected', true);
|
||||
footnotes_Display_UserDefined_Placeholders();
|
||||
});
|
||||
</script>
|
40
src/templates/public/amp-footnote-expand.html
Normal file
40
src/templates/public/amp-footnote-expand.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Footnote template to enable AMP compatibility mode.
|
||||
*
|
||||
* - Adding: Tooltips: make display work purely by style rules for AMP compatibility, thanks to @milindmore22 code contribution.
|
||||
* - Bugfix: Tooltips: enable accessibility by keyboard navigation, thanks to @westonruter code contribution.
|
||||
* - Adding: Reference container: get expanding and collapsing to work also in AMP compatibility mode, thanks to @westonruter code contribution.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* @contributor @milindmore22
|
||||
* @link https://github.com/ampproject/amp-wp/issues/5913#issuecomment-785306933
|
||||
*
|
||||
* @contributor @westonruter
|
||||
* @link https://github.com/ampproject/amp-wp/issues/5913#issuecomment-785419655
|
||||
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799580854
|
||||
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799582394
|
||||
* @link https://amp.dev/documentation/guides-and-tutorials/learn/amp-actions-and-events/#*-(all-elements)
|
||||
*/?>
|
||||
-->
|
||||
<span
|
||||
class="footnote_referrer relative"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
[[hard-link]]
|
||||
on="tap:footnote_references_container_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=false),footnotes_container_button_plus_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=true),footnotes_container_button_minus_[[post_id]]_[[container_id]].toggleClass(class=collapsed, force=false)"
|
||||
><[[sup-span]]
|
||||
id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_tooltip_text"
|
||||
>[[before]][[index]][[after]]</[[sup-span]]
|
||||
></[[link-span]]
|
||||
>[[anchor-element]]<span
|
||||
id="footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_tooltip position"
|
||||
[[style]]
|
||||
>[[text]]</span
|
||||
></span
|
||||
>
|
35
src/templates/public/amp-footnote.html
Normal file
35
src/templates/public/amp-footnote.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Footnote template to enable AMP compatibility mode.
|
||||
*
|
||||
* - Adding: Tooltips: make display work purely by style rules for AMP compatibility, thanks to @milindmore22 code contribution.
|
||||
* - Bugfix: Tooltips: enable accessibility by keyboard navigation, thanks to @westonruter code contribution.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* @contributor @milindmore22
|
||||
* @link https://github.com/ampproject/amp-wp/issues/5913#issuecomment-785306933
|
||||
*
|
||||
* @contributor @westonruter
|
||||
* @link https://github.com/ampproject/amp-wp/issues/5913#issuecomment-785419655
|
||||
*/?>
|
||||
-->
|
||||
<span
|
||||
class="footnote_referrer relative"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
[[hard-link]]
|
||||
><[[sup-span]]
|
||||
id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_tooltip_text"
|
||||
>[[before]][[index]][[after]]</[[sup-span]]
|
||||
></[[link-span]]
|
||||
>[[anchor-element]]<span
|
||||
id="footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_tooltip position"
|
||||
[[style]]
|
||||
>[[text]]</span
|
||||
></span
|
||||
>
|
|
@ -0,0 +1,47 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row template with legacy extra column for backlink symbol, uncombined footnotes.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
class="footnote_plugin_index"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_index"
|
||||
[[hard-link]]
|
||||
>[[index]][[terminator]]</[[link-span]]
|
||||
>[[anchor-element]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_symbol"
|
||||
><[[link-span]]
|
||||
class="footnote_backlink"
|
||||
[[hard-link]]
|
||||
>[[arrow]]</[[link-span]]
|
||||
></td
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td
|
||||
>
|
||||
</tr>
|
38
src/templates/public/amp-reference-container-body-combi.html
Normal file
38
src/templates/public/amp-reference-container-body-combi.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row template with the ability to have combined footnotes.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* - Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @happyches
|
||||
* @link https://wordpress.org/support/topic/custom-css-for-jumbled-references/
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
class="footnote_plugin_index_combi[[pointer]]"
|
||||
>[[backlinks]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
|
@ -0,0 +1,45 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row template for uncombined footnotes with the backlink symbol appended.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @contributor @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[index]][[terminator]][[arrow]]</[[link-span]]
|
||||
>[[anchor-element]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
39
src/templates/public/amp-reference-container-body.html
Executable file
39
src/templates/public/amp-reference-container-body.html
Executable file
|
@ -0,0 +1,39 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* AMP compatible table row default template for uncombined footnotes.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[arrow]][[index]][[terminator]]</[[link-span]]
|
||||
>[[anchor-element]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td
|
||||
>
|
||||
</tr>
|
75
src/templates/public/amp-reference-container-collapsed.html
Normal file
75
src/templates/public/amp-reference-container-collapsed.html
Normal file
|
@ -0,0 +1,75 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Reference container template to enable AMP compatibility mode.
|
||||
*
|
||||
* - Adding: Reference container: get expanding and collapsing to work also in AMP compatibility mode, thanks to @westonruter code contribution.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* @contributor @westonruter
|
||||
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799580854
|
||||
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799582394
|
||||
* @link https://amp.dev/documentation/guides-and-tutorials/learn/amp-actions-and-events/#*-(all-elements)
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<div
|
||||
class="speaker-mute footnotes_reference_container"
|
||||
>
|
||||
<div
|
||||
class="footnote_container_prepare"
|
||||
><[[element]]
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_label_expand_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_label pointer"
|
||||
on="tap:footnote_references_container_[[post_id]]_[[container_id]].toggleClass(class=collapsed),footnotes_container_button_plus_[[post_id]]_[[container_id]].toggleClass(class=collapsed),footnotes_container_button_minus_[[post_id]]_[[container_id]].toggleClass(class=collapsed)"
|
||||
>[[name]]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_button_plus_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_collapse_button"
|
||||
on="tap:footnote_references_container_[[post_id]]_[[container_id]].toggleClass(class=collapsed),footnotes_container_button_plus_[[post_id]]_[[container_id]].toggleClass(class=collapsed),footnotes_container_button_minus_[[post_id]]_[[container_id]].toggleClass(class=collapsed)"
|
||||
>[+]</span
|
||||
><span
|
||||
></span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_button_minus_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_collapse_button collapsed"
|
||||
on="tap:footnote_references_container_[[post_id]]_[[container_id]].toggleClass(class=collapsed),footnotes_container_button_plus_[[post_id]]_[[container_id]].toggleClass(class=collapsed),footnotes_container_button_minus_[[post_id]]_[[container_id]].toggleClass(class=collapsed)"
|
||||
>[−]</span
|
||||
></[[element]]
|
||||
></div
|
||||
>
|
||||
<div
|
||||
id="footnote_references_container_[[post_id]]_[[container_id]]"
|
||||
class="collapsed"
|
||||
><table
|
||||
class="footnotes_table footnote-reference-container"
|
||||
><caption
|
||||
class="accessibility"
|
||||
>[[caption]]</caption
|
||||
>
|
||||
<tbody>
|
||||
[[content]]
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
58
src/templates/public/amp-reference-container.html
Normal file
58
src/templates/public/amp-reference-container.html
Normal file
|
@ -0,0 +1,58 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Reference container template to enable AMP compatibility mode.
|
||||
*
|
||||
* - Adding: Reference container: get expanding and collapsing to work also in AMP compatibility mode, thanks to @westonruter code contribution.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
* @since 2.6.0 (release)
|
||||
*
|
||||
* @contributor @westonruter
|
||||
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799580854
|
||||
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799582394
|
||||
* @link https://amp.dev/documentation/guides-and-tutorials/learn/amp-actions-and-events/#*-(all-elements)
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<div
|
||||
class="speaker-mute footnotes_reference_container"
|
||||
>
|
||||
<div
|
||||
class="footnote_container_prepare"
|
||||
><[[element]]
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_label_expand_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_label pointer"
|
||||
on="tap:footnote_references_container_[[post_id]]_[[container_id]].toggleClass(class=collapsed)"
|
||||
>[[name]]</span
|
||||
></[[element]]
|
||||
></div
|
||||
>
|
||||
<div
|
||||
id="footnote_references_container_[[post_id]]_[[container_id]]"
|
||||
><table
|
||||
class="footnotes_table footnote-reference-container"
|
||||
><caption
|
||||
class="accessibility"
|
||||
>[[caption]]</caption
|
||||
>
|
||||
<tbody>
|
||||
[[content]]
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
43
src/templates/public/footnote-alternative.html
Normal file
43
src/templates/public/footnote-alternative.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Alternative footnote template with plain JS tooltips and CSS transitions.
|
||||
*
|
||||
* - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566
|
||||
*
|
||||
* - Bugfix: Tooltips: Alternative tooltips: add missing accessibility, thanks to @derivationfr issue report.
|
||||
*
|
||||
* @since 2.5.11 (draft)
|
||||
*
|
||||
* @reporter @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
*/?>
|
||||
-->
|
||||
<span
|
||||
class="footnote_referrer relative"
|
||||
onmouseover="footnote_tooltip_show('footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]')"
|
||||
onfocus="footnote_tooltip_show('footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]')"
|
||||
onmouseout="footnote_tooltip_hide('footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]')"
|
||||
onfocusout="footnote_tooltip_hide('footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]')"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
onclick="footnote_moveToReference_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
[[hard-link]]
|
||||
><[[sup-span]]
|
||||
id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_tooltip_text"
|
||||
>[[before]][[index]][[after]]</[[sup-span]]
|
||||
></[[link-span]]
|
||||
>[[anchor-element]]<span
|
||||
id="footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_tooltip position hidden"
|
||||
onmouseout="footnote_tooltip_hide('footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]')"
|
||||
[[style]]
|
||||
>[[text]]</span
|
||||
></span
|
||||
>
|
23
src/templates/public/footnote.html
Executable file
23
src/templates/public/footnote.html
Executable file
|
@ -0,0 +1,23 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
*/?>
|
||||
-->
|
||||
<span
|
||||
class="footnote_referrer"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
onclick="footnote_moveToReference_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
onkeypress="footnote_moveToReference_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
[[hard-link]]
|
||||
><[[sup-span]]
|
||||
id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_tooltip_text"
|
||||
>[[before]][[index]][[after]]</[[sup-span]]
|
||||
></[[link-span]]
|
||||
>[[anchor-element]]<span
|
||||
id="footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_tooltip"
|
||||
>[[text]]</span
|
||||
></span
|
||||
>
|
123
src/templates/public/js-reference-container.html
Normal file
123
src/templates/public/js-reference-container.html
Normal file
|
@ -0,0 +1,123 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Plain JavaScript reference container start and end without scroll script.
|
||||
*
|
||||
* @since 2.5.6
|
||||
* @type object
|
||||
* @lastmodified 2021-02-20T0252+0100
|
||||
*
|
||||
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
*
|
||||
* @since 2.5.6
|
||||
*
|
||||
* @reporter @hopper87it
|
||||
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
|
||||
*
|
||||
* @reporter @pkverma99
|
||||
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188
|
||||
*
|
||||
* The heavy jQuery Core library from WordPress must not be deferred for
|
||||
* the jQuery reference container to work, and is detrimental to page speed.
|
||||
* This alternative works with plain JS but does not support scroll animation.
|
||||
* The plugin is set to enable hard links when this option is enabled.
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*
|
||||
* - Bugfix: Backlinks: reflect scroll functions down/up differentiation across the template set, thanks to @bogosavljev bug report.
|
||||
*
|
||||
* @reporter @bogosavljef
|
||||
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14214720
|
||||
*/?>
|
||||
-->
|
||||
<div
|
||||
class="speaker-mute footnotes_reference_container"
|
||||
>
|
||||
<div
|
||||
class="footnote_container_prepare"
|
||||
><[[element]]
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_label_expand_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_label pointer"
|
||||
onclick="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_button_plus_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="[[button-style]]"
|
||||
onclick="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[+]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_label_collapse_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_label pointer"
|
||||
style="display: none;"
|
||||
onclick="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnotes_container_button_minus_[[post_id]]_[[container_id]]"
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="display: none;"
|
||||
onclick="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
onkeydown="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[−]</span
|
||||
></[[element]]
|
||||
></div
|
||||
>
|
||||
<div
|
||||
id="footnote_references_container_[[post_id]]_[[container_id]]"
|
||||
style="[[style]]"
|
||||
><table
|
||||
class="footnotes_table footnote-reference-container"
|
||||
><caption
|
||||
class="accessibility"
|
||||
>[[caption]]</caption
|
||||
>
|
||||
<tbody>
|
||||
[[content]]
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function footnote_expand_reference_container_[[post_id]]_[[container_id]]() {
|
||||
document.getElementById('footnote_references_container_[[post_id]]_[[container_id]]').style.display = "inline";
|
||||
document.getElementById('footnotes_container_label_expand_[[post_id]]_[[container_id]]').style.display = "none";
|
||||
document.getElementById('footnotes_container_label_collapse_[[post_id]]_[[container_id]]').style.display = "inline";
|
||||
document.getElementById('footnotes_container_button_plus_[[post_id]]_[[container_id]]').style.display = "none";
|
||||
document.getElementById('footnotes_container_button_minus_[[post_id]]_[[container_id]]').style.display = "inline";
|
||||
}
|
||||
function footnote_collapse_reference_container_[[post_id]]_[[container_id]]() {
|
||||
document.getElementById('footnote_references_container_[[post_id]]_[[container_id]]').style.display = "none";
|
||||
document.getElementById('footnotes_container_label_collapse_[[post_id]]_[[container_id]]').style.display = "none";
|
||||
document.getElementById('footnotes_container_label_expand_[[post_id]]_[[container_id]]').style.display = "inline";
|
||||
document.getElementById('footnotes_container_button_minus_[[post_id]]_[[container_id]]').style.display = "none";
|
||||
document.getElementById('footnotes_container_button_plus_[[post_id]]_[[container_id]]').style.display = "inline";
|
||||
}
|
||||
function footnote_moveToReference_[[post_id]]_[[container_id]](p_str_TargetID) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
}
|
||||
function footnote_moveToAnchor_[[post_id]]_[[container_id]](p_str_TargetID) {
|
||||
/* defined to keep using standard row templates */
|
||||
}
|
||||
</script>
|
50
src/templates/public/reference-container-body-3column.html
Normal file
50
src/templates/public/reference-container-body-3column.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Table row template with legacy extra column for backlink symbol, uncombined footnotes.
|
||||
*
|
||||
* - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
class="footnote_plugin_index"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_index"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
[[hard-link]]
|
||||
>[[index]][[terminator]]</[[link-span]]
|
||||
>[[anchor-element]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_symbol"
|
||||
><[[link-span]]
|
||||
onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
class="footnote_backlink"
|
||||
[[hard-link]]
|
||||
>[[arrow]]</[[link-span]]
|
||||
></td
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td
|
||||
>
|
||||
</tr>
|
36
src/templates/public/reference-container-body-combi.html
Normal file
36
src/templates/public/reference-container-body-combi.html
Normal file
|
@ -0,0 +1,36 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Table row template with the ability to have combined footnotes.
|
||||
*
|
||||
* - Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @happyches
|
||||
* @link https://wordpress.org/support/topic/custom-css-for-jumbled-references/
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
class="footnote_plugin_index_combi[[pointer]]"
|
||||
[[event]]
|
||||
>[[backlinks]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
43
src/templates/public/reference-container-body-switch.html
Normal file
43
src/templates/public/reference-container-body-switch.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Table row template for uncombined footnotes with the backlink symbol appended.
|
||||
*
|
||||
* - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @contributor @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[index]][[terminator]][[arrow]]</[[link-span]]
|
||||
>[[anchor-element]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
40
src/templates/public/reference-container-body.html
Executable file
40
src/templates/public/reference-container-body.html
Executable file
|
@ -0,0 +1,40 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Table row default template for uncombined footnotes.
|
||||
*
|
||||
* @since 2.2.10 Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes.
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<th
|
||||
scope="row"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
|
||||
><[[link-span]]
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_plugin_link"
|
||||
[[hard-link]]
|
||||
>[[arrow]][[index]][[terminator]]</[[link-span]]
|
||||
>[[anchor-element]]</th
|
||||
>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td
|
||||
>
|
||||
</tr>
|
110
src/templates/public/reference-container.html
Normal file
110
src/templates/public/reference-container.html
Normal file
|
@ -0,0 +1,110 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Yields the reference container start and end including the scroll script.
|
||||
*
|
||||
* @since unknown
|
||||
* @type object
|
||||
*
|
||||
* - Bugfix: Reference container: restore expand/collapse button in the template, thanks to @ragonesi bug report.
|
||||
*
|
||||
* @since 2.0.2
|
||||
*
|
||||
* @reporter @ragonesi
|
||||
* @link https://wordpress.org/support/topic/hyperlink-symbol-in-reference-container/#post-13587782
|
||||
*
|
||||
* The expand/collapse button was lost @since 2.0.0 for an unknown reason.
|
||||
* The fix was about restoring the button code (only, while the script remained complete).
|
||||
*
|
||||
* - Bugfix: Reference container: apply web semantics to improve readability for assistive technologies, thanks to @derivationfr issue report and code contribution.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @contributor @derivationfr
|
||||
* @link https://wordpress.org/support/topic/enhance-accesibility-by-using-instead-of/
|
||||
* @link https://a11y-101.com/development/tables
|
||||
*
|
||||
* For assistive technologies to improve accessibility by reading tables in a meaningful manner,
|
||||
* the tables must be marked up properly using table header elements for header rows and header
|
||||
* columns as applicable.
|
||||
* The table caption must also be present for screen readers but may be hidden to sighted users.
|
||||
*/?>
|
||||
-->
|
||||
<div
|
||||
class="speaker-mute footnotes_reference_container"
|
||||
>
|
||||
<div
|
||||
class="footnote_container_prepare"
|
||||
><[[element]]
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_reference_container_label pointer"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[[name]]</span
|
||||
><span
|
||||
role="button"
|
||||
tabindex="0"
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="[[button-style]]"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]();"
|
||||
>[<a
|
||||
id="footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]"
|
||||
>+</a
|
||||
>]</span
|
||||
></[[element]]
|
||||
></div
|
||||
>
|
||||
<div
|
||||
id="footnote_references_container_[[post_id]]_[[container_id]]"
|
||||
style="[[style]]"
|
||||
><table
|
||||
class="footnotes_table footnote-reference-container"
|
||||
><caption
|
||||
class="accessibility"
|
||||
>[[caption]]</caption
|
||||
>
|
||||
<tbody>
|
||||
[[content]]
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function footnote_expand_reference_container_[[post_id]]_[[container_id]]() {
|
||||
jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').show();
|
||||
jQuery('#footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]').text('−');
|
||||
}
|
||||
function footnote_collapse_reference_container_[[post_id]]_[[container_id]]() {
|
||||
jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').hide();
|
||||
jQuery('#footnote_reference_container_collapse_button_[[post_id]]_[[container_id]]').text('+');
|
||||
}
|
||||
function footnote_expand_collapse_reference_container_[[post_id]]_[[container_id]]() {
|
||||
if (jQuery('#footnote_references_container_[[post_id]]_[[container_id]]').is(':hidden')) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
} else {
|
||||
footnote_collapse_reference_container_[[post_id]]_[[container_id]]();
|
||||
}
|
||||
}
|
||||
function footnote_moveToReference_[[post_id]]_[[container_id]](p_str_TargetID) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
var l_obj_Target = jQuery('#' + p_str_TargetID);
|
||||
if (l_obj_Target.length) {
|
||||
jQuery( 'html, body' ).delay( [[scroll-down-delay]] );
|
||||
jQuery('html, body').animate({
|
||||
scrollTop: l_obj_Target.offset().top - window.innerHeight * [[scroll-offset]]
|
||||
},
|
||||
[[scroll-down-duration]]);
|
||||
}
|
||||
}
|
||||
function footnote_moveToAnchor_[[post_id]]_[[container_id]](p_str_TargetID) {
|
||||
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
|
||||
var l_obj_Target = jQuery('#' + p_str_TargetID);
|
||||
if (l_obj_Target.length) {
|
||||
jQuery( 'html, body' ).delay( [[scroll-up-delay]] );
|
||||
jQuery('html, body').animate({
|
||||
scrollTop: l_obj_Target.offset().top - window.innerHeight * [[scroll-offset]]
|
||||
},
|
||||
[[scroll-up-duration]]);
|
||||
}
|
||||
}
|
||||
</script>
|
18
src/templates/public/tooltip.html
Normal file
18
src/templates/public/tooltip.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
*/?>
|
||||
-->
|
||||
<script type="text/javascript">
|
||||
jQuery('#footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]').tooltip({
|
||||
tip: '#footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]',
|
||||
tipClass: 'footnote_tooltip',
|
||||
effect: 'fade',
|
||||
predelay: [[fade-in-delay]],
|
||||
fadeInSpeed: [[fade-in-duration]],
|
||||
delay: [[fade-out-delay]],
|
||||
fadeOutSpeed: [[fade-out-duration]],
|
||||
position: '[[position]]',
|
||||
relative: true,
|
||||
offset: [[[offset-y]], [[offset-x]]],
|
||||
});
|
||||
</script>
|
Reference in a new issue