Module:Prime limit navigation: Difference between revisions
ArrowHead294 (talk | contribs) m 75% seems a little too small |
ArrowHead294 (talk | contribs) mNo edit summary |
||
Line 3: | Line 3: | ||
local PRIME_LIST = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97} | local PRIME_LIST = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97} | ||
local function table_index (t, v) | local function table_index(t, v) | ||
for i, ti in ipairs (t) do | for i, ti in ipairs (t) do | ||
if v == ti then | if v == ti then | ||
Line 18: | Line 18: | ||
entry_curr = "[[" .. PRIME_LIST[i] .. "-limit]]" | entry_curr = "[[" .. PRIME_LIST[i] .. "-limit]]" | ||
if PRIME_LIST[i - 1] then | if PRIME_LIST[i - 1] then | ||
entry_prev = "<span style=\"font-size: 0.8em;\">[[" .. PRIME_LIST[i-1] .. "-limit|← " .. PRIME_LIST[i-1] .. "-limit]]</span> " | entry_prev = "<span style=\"font-size: 0.8em;\">[[" .. PRIME_LIST[i-1] .. "-limit|'''←''' " .. PRIME_LIST[i-1] .. "-limit]]</span> " | ||
else | else | ||
entry_prev = "" | entry_prev = "" | ||
end | end | ||
if PRIME_LIST[ i+ 1] then | if PRIME_LIST[ i+ 1] then | ||
entry_next = " <span style=\"font-size: 0.8em;\">[[" .. PRIME_LIST[i+1] .. "-limit|" .. PRIME_LIST[i+1] .. "-limit →]]</span>" | entry_next = " <span style=\"font-size: 0.8em;\">[[" .. PRIME_LIST[i+1] .. "-limit|" .. PRIME_LIST[i+1] .. "-limit '''→''']]</span>" | ||
else | else | ||
entry_next = "" | entry_next = "" |