Skip to main content
Topic: footnotes (Read 6982 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

footnotes

I was playing again with them:
Code: [Select]
diff --git a/sources/Subs.php b/sources/Subs.php
index 5479fc3..82b0a3b 100644
--- a/sources/Subs.php
+++ b/sources/Subs.php
@@ -2369,8 +2369,8 @@ function parse_bbc($message, $smileys = true, $cache_id = '', $parse_tags = arra
  global $fn_num, $fn_content, $fn_count;
 
  $fn_num++;
- $fn_content[] = "<sup id=\"fn$fn_num" . "_" . "$fn_count\">$fn_num&nbsp;</sup>$m[2]<a class=\"footnote_return\" href=\"#ref$fn_num" . "_" . "$fn_count\">&crarr;</a>";
- return "<a href=\"#fn$fn_num" . "_" . "$fn_count\" id=\"ref$fn_num" . "_" . "$fn_count\">[$fn_num]</a>";'), $message);
+ $fn_content[] = "<div class=\"target\" id=\"fn$fn_num" . "_" . "$fn_count\"><sup>$fn_num&nbsp;</sup>$m[2]<a class=\"footnote_return\" href=\"#ref$fn_num" . "_" . "$fn_count\">&crarr;</a></div>";
+ return "<a class=\"target\" href=\"#fn$fn_num" . "_" . "$fn_count\" id=\"ref$fn_num" . "_" . "$fn_count\">[$fn_num]</a>";'), $message);
 
  $fn_total += $fn_num;
 
diff --git a/themes/default/css/index_light.css b/themes/default/css/index_light.css
index 8d1d288..83f9b73 100644
--- a/themes/default/css/index_light.css
+++ b/themes/default/css/index_light.css
@@ -143,6 +143,9 @@ body {
 div.bbc_footnotes {
  border-top: 1px solid #bfbfbf;
 }
+.bbc_footnotes .target:target {
+ background-color: #d8ffdf;
+}
 sup.bbc_footnotes, sup.bbc_footnotes a {
  color: #50aa3a;
  font-weight: 700;

For the result see the attachments.

Idea borrowed from wikipedia.

Push? O:-)

Re: footnotes

Reply #1

Interesting, I can definitely see that being useful. Must have in my book, but others may feel as though it's bloat.

Re: footnotes

Reply #2

Sure ... seems to provide another way to style them which is good, and if folks don't like that its an easy css change for a theme.

Re: footnotes

Reply #3

Committed in #1074. O:-)
Bugs creator.
Features destroyer.
Template killer.

Re: footnotes

Reply #4

1074? Is that a rev number..?

Re: footnotes

Reply #5

Nope, just the github pull request number. :D
Bugs creator.
Features destroyer.
Template killer.

Re: footnotes

Reply #6

So many already..?

Re: footnotes

Reply #7

We were working hard. :P
It's a bit difficult do statistics since PRs are counted with issues, so it's all mixed...
Bugs creator.
Features destroyer.
Template killer.

Re: footnotes

Reply #8

Hmm yeah.

Do you know if the pull request gets updated (marked done) on the site if it's merged or rebased locally then pushed to the repo?

Re: footnotes

Reply #9

Yes, they are.
I'm not sure what exactly triggers the closing (if the commit message of the merge or something else), the last I did it, I used the same commit message and after I pushed it the PR was closed.
Bugs creator.
Features destroyer.
Template killer.