Изменения

Перейти к навигации Перейти к поиску
м
Нет описания правки
Строка 92: Строка 92:  
-- Call example:  
 
-- Call example:  
 
-- {{#invoke: CTD | info  
 
-- {{#invoke: CTD | info  
--  | type        = Type of term: понятие (по умолчанию), личность, выражение, литература, периодика
+
--  | type        = Type of term: понятие (по умолчанию), личность, выражение, литература, периодика / conception, person, expression, literature, periodical
--  | type        = Type of term: conception, person, expression, literature, periodical  
+
--  | style        = серый / gray 
 
--  | term        = Term, that is word or phrase  
 
--  | term        = Term, that is word or phrase  
 
--  | term_to_show = Term with accent or diacritic marks  
 
--  | term_to_show = Term with accent or diacritic marks  
Строка 167: Строка 167:  
-- considering type of view
 
-- considering type of view
 
if view == 'подсказка' or view == 'сноска и подсказка' or view == 'подсказка и сноска' then
 
if view == 'подсказка' or view == 'сноска и подсказка' or view == 'подсказка и сноска' then
text = '{{#tag:span|' .. text .. '|style=border-bottom:1px dotted gray; cursor:help;|title=' .. description .. ' (БТС, ' .. term .. ')|}}'  
+
text = '<span style=border-bottom: 1px dotted gray; cursor:help; title="' .. description ..' (БТС, ' .. term .. ')">' .. text .. '</span>'
 
end
 
end
 
if view == 'сноска' or view == 'сноска и подсказка' or view == 'подсказка и сноска' then
 
if view == 'сноска' or view == 'сноска и подсказка' or view == 'подсказка и сноска' then
reference = '<ref>' .. term_to_show .. origin .. ' – ' .. description .. ' ('.. bts ..').</ref>'
+
reference = term_to_show .. origin .. ' – ' .. description .. ' ('.. bts ..')'
 +
if not isempty(frame.args['style']) then  -- there is only one additional style for now, so ignore the value
 +
reference = '<span style="color: gray;">' .. reference ..'</span>'
 +
end
 +
reference = '<ref>' .. reference ..'</ref>'
 
end
 
end
 
if view == 'скобки' then
 
if view == 'скобки' then
Строка 178: Строка 182:  
-- DEBUG
 
-- DEBUG
 
--text = '<p>DEBUG: view: '.. view .."; term: ".. term .."; term to show: ".. term_to_show .."; description: ".. description .."; origin: ".. origin ..'</p>'.. text
 
--text = '<p>DEBUG: view: '.. view .."; term: ".. term .."; term to show: ".. term_to_show .."; description: ".. description .."; origin: ".. origin ..'</p>'.. text
--return  text .. reference  
+
return  text .. reference  
 
 
     return frame:preprocess( text .. reference )
+
     --return frame:preprocess( text .. reference )
 
end
 
end
  

Навигация