Content deleted Content added
m sync from sandbox; |
sync from sandbox; |
||
Line 2:
local code_open_tag = '<code style="color: inherit; background: inherit; border: inherit; padding: inherit;">';
local lock_icons = { --icon classes are defined in Module:Citation/CS1/styles.css
-- ['free'] = {'cs1-lock-free', 'Freely accessible'}, -- not supported for urls
['registration'] = {'cs1-lock-registration', 'Free registration required'},
['limited'] = {'cs1-lock-limited', 'Free access subject to limited trial, subscription normally required'},
['subscription'] = {'cs1-lock-subscription', 'Paid subscription required'},
}
Line 217 ⟶ 223:
if args.url ~= '' then
args.contribution = '[' .. args.url .. ' ' .. args.contribution .. ']'; -- format external link
if args['url-access'] then
if lock_icons[args['url-access']] then
args.contribution = table.concat ({ -- add access icon markup to this item
'<span class="', -- open the opening span tag; icon classes are defined in Module:Citation/CS1/styles.css
lock_icons[args['url-access']][1], -- add the appropriate lock icon class
'" title="', -- and the title attribute
lock_icons[args['url-access']][2], -- for an appropriate tool tip
'">', -- close the opening span tag
args.contribution,
'</span>', -- and close the span
});
end
end
end
Line 342 ⟶ 365:
pframe.args['chapter-url'] or
pframe.args['contribution-url'] or '';
args['url-access'] = pframe.args['url-access'];
args.year = pframe.args.year or ''; -- required
Line 360 ⟶ 385:
end
return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src='Module:Citation/CS1/styles.css'})});
-- return table.concat ({core (args), frame:extensionTag ('templatestyles', '', {src=styles})});
end
|