模板:Ahnentafel-compact5
(重定向自Template:Ahnentafel)
| {{{1}}} | ||||||||||||||||
File:Test Template Info-Icon - Version (2).svg 模板文档[查看] [编辑] [历史] [清除缓存]
| File:Lua-Logo.svg | 此模板使用Lua语言: |
{{Ahnentafel}}是一个家谱模板。 对于人来说,图表通常涵盖5代。 虽然支持任意数量的级别,但在特殊情况下需要时,建议将图表扩展到最多6个级别(63个节点),不再需要将内容放入流行的屏幕分辨率。
该模板以图形种族谱系图祖先树的形式呈现家谱数据(实现为HTML table)。 ahnentafel中的条目作为模板的编号参数给出,并且可以包含任意wikimarkup。
参数及使用方法[编辑]
{{ahnentafel
|collapsible=yes
|collapsed=yes
|ref=
|float=
|align=
|boxstyle_1=
|boxstyle_2=
|boxstyle_3=
|boxstyle_4=
|boxstyle_5=
|1=
|2=
...
|31=
}}
模板接受以下命名参数:
style- 要应用于整个表的CSS 样式属性。
boxstyle- 要应用于包含条目的框的CSS样式属性。
border- 框周围边框的粗细(以像素为单位)(默认值:2)。
boxstyle_1,boxstyle_2, ...- 应用于给定列中的框的CSS样式属性。
border_1,border_2, ...- 给定列中框周围的边框厚度。
align- 图表的对齐方式:左,右,中心
headnotes- 在图表上方添加可选文本(在可折叠模式下最有用)
footnotes- 在图表下方添加可选文本(在可折叠模式下最有用)
可折叠外部容器的选项(如果已激活)
collapsible- set to
yesto make the table collapsible collapsed- set to
noto expand by default, andyesto collapse by default title- overrides the default container title when collapsible
ref- adds an optional reference to the end of the title
float- float the outer container:
left,right,none, orcenter(default) width- overrides the default outer container width
The column-specific style attributes are included after (and thus override) the generic ones, which are included after the default styles and the border thickness specified by the border parameter(s).
示例[编辑]
Blank template for five generations:
{{ahnentafel
|collapsible=yes
|collapsed=yes
|align=center
|ref=
|boxstyle_1=background-color: #fcc; color: #000;
|boxstyle_2=background-color: #fb9; color: #000;
|boxstyle_3=background-color: #ffc; color: #000;
|boxstyle_4=background-color: #bfc; color: #000;
|boxstyle_5=background-color: #9fe; color: #000;
|1=1.
|2=2.
|3=3.
|4=4.
|5=5.
|6=6.
|7=7.
|8=8.
|9=9.
|10=10.
|11=11.
|12=12.
|13=13.
|14=14.
|15=15.
|16=16.
|17=17.
|18=18.
|19=19.
|20=20.
|21=21.
|22=22.
|23=23.
|24=24.
|25=25.
|26=26.
|27=27.
|28=28.
|29=29.
|30=30.
|31=31.
}}
| 16. | ||||||||||||||||
| 8. | ||||||||||||||||
| 17. | ||||||||||||||||
| 4. | ||||||||||||||||
| 18. | ||||||||||||||||
| 9. | ||||||||||||||||
| 19. | ||||||||||||||||
| 2. | ||||||||||||||||
| 20. | ||||||||||||||||
| 10. | ||||||||||||||||
| 21. | ||||||||||||||||
| 5. | ||||||||||||||||
| 22. | ||||||||||||||||
| 11. | ||||||||||||||||
| 23. | ||||||||||||||||
| 1. | ||||||||||||||||
| 24. | ||||||||||||||||
| 12. | ||||||||||||||||
| 25. | ||||||||||||||||
| 6. | ||||||||||||||||
| 26. | ||||||||||||||||
| 13. | ||||||||||||||||
| 27. | ||||||||||||||||
| 3. | ||||||||||||||||
| 28. | ||||||||||||||||
| 14. | ||||||||||||||||
| 29. | ||||||||||||||||
| 7. | ||||||||||||||||
| 30. | ||||||||||||||||
| 15. | ||||||||||||||||
| 31. | ||||||||||||||||
参见[编辑]
- Wikipedia:Family trees — for alternatives
{{ahnentafel-tree}}uses{{Tree list}}and will handle up to an ahnentafel of 511 places (9 generations), but will also display as little as one generation.{{Tree chart}}– can be used to build a bottom up, top down or right to left ahnentafel chart see Family trees § Tree chart template