development 2.1.4d0 needed for bugfix: wrapping long URLs in ref container and tooltips to prevent layout issues; to be posted on Forum

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2425397 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-11-25 07:47:45 +00:00
parent 2eaf22a30b
commit 592c663342
8 changed files with 53 additions and 22 deletions

View file

@ -207,7 +207,7 @@ abstract class MCI_Footnotes_LayoutEngine {
'mci-footnotes-admin-styles',
plugins_url('../../css/settings.css', __FILE__),
'',
'2.1.3'
'2.1.4d0'
);
// UPDATE version # when making changes to settings.css, FOR CACHE BUSTING

View file

@ -160,7 +160,7 @@ class MCI_Footnotes {
'mci-footnotes-css-public',
plugins_url('../css/public.css', __FILE__),
'',
'2.1.3'
'2.1.4d0'
);
}

View file

@ -17,8 +17,9 @@
* 2.1.1: options fixing ref container layout and referrer vertical alignment 2020-11-16T2024+0100
* 2.1.1: option fixing ref container relative position 2020-11-17T0254+0100
* 2.1.2: options for the other hooks 2020-11-19T1849+0100
* 2.1.4: fix line wrapping of URLs based on pattern, not link element 2020-11-25T0837+0100
*
* Last modified: 2020-11-24T0957+0100
* Last modified: 2020-11-25T0837+0100
*/
// If called directly, abort:
@ -443,6 +444,12 @@ class MCI_Footnotes_Task {
// get footnote text
$l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag));
// fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element,
// to prevent them from hanging out of the tooltip in non-Unicode-compliant user agents
// spare however values of the href argument!
// see public.css
$l_str_FootnoteText = preg_replace( '#(?<!href=.)(https?://[^\\s]+)#', '<span class="footnote_url_wrap">$1</span>', $l_str_FootnoteText );
// Text to be displayed instead of the footnote
$l_str_FootnoteReplaceText = "";
@ -715,6 +722,9 @@ class MCI_Footnotes_Task {
}
}
// line wrapping of URLs already fixed, see:
// $l_str_FootnoteText = preg_replace( '#(?<!href=.)(https?://[^\\s]+)#', '<span class="footnote_url_wrap">$1</span>', $l_str_FootnoteText );
// replace all placeholders in 'templates/public/reference-container-body.html'
// or in 'templates/public/reference-container-body-combi.html'
// or in 'templates/public/reference-container-body-3column.html'

View file

@ -4,9 +4,9 @@
* Created-Date: 15.05.14
* Created-Time: 16:21
* Since: 1.0
* Version: 2.1.3
* Version: 2.1.4d0
*
* Last modified: 2020-11-24T0958+0100
* Last modified: 2020-11-25T0836+0100
*/
@ -33,6 +33,26 @@ css/settings.css
color: #545f5a;
}
/*****************************************************
Long URLs in Unicode-non-compliant user agents
prevent URLs from expanding the reference container
in mobile view, or from hanging out of the tooltip
based on pattern, not link element
class/task.php
not cross-browser compatible:
word-break: break-word;
word-break: break-all;
overflow-wrap: anywhere;
word-wrap: anywhere;
*/
.footnote_url_wrap {
word-wrap: break-word;
}
/*****************************************************
Footnote referrers and tooltips
@ -76,9 +96,6 @@ templates/public/footnote-alternative.html
font-weight: normal;
font-style: normal;
}
.footnote_tooltip a {
word-wrap: anywhere;
}
/*
alternative tooltip implementation
@ -192,6 +209,7 @@ footnotes
reference-container-body.html
*/
.footnote_plugin_index,
.footnote_plugin_index_combi,
.footnote_plugin_link,
.footnote_plugin_text {
border:none !important;
@ -214,7 +232,9 @@ reference-container-body.html
These rules when enabled cause the backlink to take an overline
when hovered in some themes, not in others:
.footnote_plugin_index:hover,
.footnote_plugin_index_combi:hover,
.footnote_plugin_index.pointer:hover,
.footnote_plugin_index_combi.pointer:hover,
*/
.footnote_backlink:hover,
.footnote_plugin_link:hover,
@ -222,7 +242,8 @@ when hovered in some themes, not in others:
text-decoration: unset;
text-decoration: underline !important;
}
.footnote_plugin_index {
.footnote_plugin_index,
.footnote_plugin_index_combi {
max-width: 140px;
width: 2em; /*auto-expanding column to fit widest*/
}
@ -233,25 +254,21 @@ when hovered in some themes, not in others:
.footnote_index,
.footnote_backlink,
.footnote_plugin_index.pointer {
.footnote_plugin_index.pointer,
.footnote_plugin_index_combi.pointer {
cursor: pointer;
}
.footnote_plugin_text {
width: unset; /*unset width of text column to fix site issues*/
}
/*
prevent long URLs from expanding the reference container in mobile view:
*/
.footnote_plugin_text a {
word-wrap: anywhere;
}
/*
Responsive
*/
@media only screen and (max-width: 768px) {
.footnote_plugin_index {
.footnote_plugin_index,
.footnote_plugin_index_combi {
max-width: 100px;
}
}
@ -279,7 +296,8 @@ link styling is reverted so as to not gray out referrers/numbers.
.footnote_plugin_tooltip_text {
color: inherit;
}
.footnote_plugin_index a {
.footnote_plugin_index a,
.footnote_plugin_index_combi a {
color: inherit;
text-decoration: none !important;
}

View file

@ -4,9 +4,9 @@
* Created-Date: 15.05.14
* Created-Time: 16:21
* Since: 1.0
* Version: 2.1.3
* Version: 2.1.4d0
*
* Last modified: 2020-11-24T0957+0100
* Last modified: 2020-11-25T0837+0100
*/

View file

@ -4,7 +4,7 @@
Plugin URI: https://wordpress.org/plugins/footnotes/
Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
Author: Mark Cheret
Version: 2.1.3
Version: 2.1.4d0
Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes
Domain Path: /languages

View file

@ -80,6 +80,9 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 2.1.4d0 =
- Bugfix: Reference container, tooltips: fix line wrapping of URLs based on pattern, not link element
= 2.1.3 =
- Bugfix: disable widget_text hook by default to fix accordions declaring headings as widgets
- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy

View file

@ -1,6 +1,6 @@
<tr>
<td
class="footnote_plugin_index[[pointer]]"
class="footnote_plugin_index_combi[[pointer]]"
[[event]]
>[[backlinks]]</td>
<td