模板:Infobox settlement:修订间差异
来自Blockland Wiki
更多操作
无编辑摘要 |
无编辑摘要 标签:已被回退 |
||
| 第1行: | 第1行: | ||
<includeonly>{{Infobox | <noinclude> | ||
{{#cargo_declare: | |||
_table = Countries | |||
|Name = Page | |||
|FullName = String | |||
|Capital = Page | |||
|MajorCity = Page | |||
|OfficialLanguage = String | |||
|GovType = String | |||
|HeadOfState = String | |||
|HeadOfGov = String | |||
|Area = Float | |||
|Population = Float | |||
|GDP_Nominal = Float | |||
|GDP_PerCapita = Float | |||
|Currency = String | |||
|Continent = String | |||
|Lat = Float | |||
|Lng = Float | |||
}} | |||
</noinclude><includeonly>{{Infobox | |||
| bodyclass = geography vcard ve-infobox-country | | bodyclass = geography vcard ve-infobox-country | ||
| bodystyle = width:23em; font-size:88%; line-height:1.5em; background:#fff; border:1px solid #a2a9b1; border-spacing:0; | | bodystyle = width:23em; font-size:88%; line-height:1.5em; background:#fff; border:1px solid #a2a9b1; border-spacing:0; | ||
| abovestyle = background-color:# | | abovestyle = background-color:#CCEEFF; padding:0.5em; text-align:center; border-bottom:1px solid #a2a9b1; | ||
| aboveclass = fn org | | aboveclass = fn org | ||
| above = {{ | | above = <div style="font-size:1.25em; font-weight:bold;">{{{国名全称|}}}</div><div style="font-size:1.1em; font-weight:bold;">{{{国名|{{PAGENAME}}}}}</div><div style="font-size:0.9em; font-weight:normal; margin-top:0.2em; line-height:1.3em;">{{#if:{{{格言|}}}|<div style="font-style:italic;">“{{{格言}}}”</div>}}{{#if:{{{国歌|}}}|<div style="margin-top:0.1em;">《{{{国歌}}}》</div>}}</div> | ||
| | | headerstyle = background-color:#f0f0f0; font-weight:bold; text-align:center; padding:4px; border-top:1px solid #a2a9b1; border-bottom:1px solid #a2a9b1; | ||
| labelstyle = width:6.5em; white-space:nowrap; vertical-align:top; text-align:left; padding:3px 0.5em; border:none; color:#000000; | |||
| | | datastyle = vertical-align:top; text-align:left; padding:3px 0.5em; border:none; | ||
| image1 = {{#if:{{{ | | image1 = {{#if:{{{国旗图片|}}}|[[File:{{{国旗图片}}}|300px|alt={{{国旗释义|}}}]]}} | ||
| caption1 = {{{ | | caption1 = {{{国旗释义|}}} | ||
| caption1style = padding:0.3em 0 0.6em 0; text-align:center; font-size:smaller; | | caption1style = padding:0.3em 0 0.6em 0; text-align:center; font-size:smaller; | ||
| | | header10 = 基本信息 | ||
| label11 = 首都 | |||
| data11 = {{{首都|}}} | |||
| label12 = 最大城市 | |||
| data12 = {{{最大城市|}}} | |||
| label13 = 官方语言 | |||
| data13 = {{{官方语言|}}} | |||
| label14 = 官方文字 | |||
| data14 = {{{官方文字|}}} | |||
| label15 = 族群 | |||
| data15 = {{{族群|}}} | |||
| label16 = 国名释义 | |||
| data16 = {{{国名释义|}}} | |||
| | | header20 = 政治体制 | ||
| label21 = 政府形式 | |||
| data21 = {{{政府形式|}}} | |||
| label22 = {{{元首称谓|总统}}} | |||
| data22 = {{{元首|}}} | |||
| label23 = {{{政府首脑称谓|总理}}} | |||
| data23 = {{{政府首脑|}}} | |||
| label24 = 立法机构 | |||
| data24 = {{{立法机构|}}} | |||
| | | header30 = 历史沿革 | ||
| label31 = {{{历史事件1名称|建立}}} | |||
| data31 = {{{历史事件1日期|}}} | |||
| | | label32 = {{{历史事件2名称|独立}}} | ||
| | | data32 = {{{历史事件2日期|}}} | ||
| | |||
| | |||
| | | header35 = 地图标注 | ||
| data36 = {{#if:{{{纬度|}}}{{{经度|}}}| | |||
<div id="country-map-{{{国名|{{PAGENAME}}}}}" style="width:100%; height:200px; background:#ddd; border:1px solid #ccc; margin:5px 0;"></div> | |||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | |||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | |||
<script> | |||
(function() { | |||
var lat = parseFloat("{{{纬度|0}}}"); | |||
var lng = parseFloat("{{{经度|0}}}"); | |||
var zoom = parseInt("{{{缩放|4}}}"); | |||
var tiles = "http://blkl.fun//wp-content/uploads/arcgis_tiles/_alllayers0408"; | |||
var map = L.map("country-map-{{{国名|{{PAGENAME}}}}}" , { | |||
zoomControl: false, | |||
attributionControl: false, | |||
maxZoom: 9, | |||
minZoom: 1 | |||
}).setView([lat, lng], zoom); | |||
L.TileLayer.ArcGISLocal = L.TileLayer.extend({ | |||
getTileUrl: function(coords) { | |||
var z = coords.z; | |||
var x = coords.x; | |||
var y = coords.y; | |||
// 补零逻辑适配你提供的 ArcGIS 路径格式 | |||
var sz = z.toString().padStart(2, '0'); | |||
var sy = y.toString(16).padStart(8, '0'); | |||
var sx = x.toString(16).padStart(8, '0'); | |||
return tiles + "/L" + sz + "/R" + sy + "/C" + sx + ".png"; | |||
} | |||
}); | |||
new L.TileLayer.ArcGISLocal().addTo(map); | |||
var icon = L.divIcon({ | |||
html: '<div style="color:#ff3b30;"><span style="font-size:24px;">📍</span></div>', | |||
className: '', | |||
iconSize: [24, 24], | |||
iconAnchor: [12, 24] | |||
}); | |||
L.marker([lat, lng], {icon: icon}).addTo(map); | |||
})(); | |||
| | </script> | ||
| {{#if:{{{地图图片|}}}|[[File:{{{地图图片}}}|250px]]<br/><small>{{{地图说明|}}}</small>}} }} | |||
| | |||
| | | header40 = 地理与人口 | ||
| | | label41 = 总面积 | ||
| data41 = {{#if:{{{总面积|}}}|约{{{总面积}}} km²}} | |||
| | | label42 = 总人口 | ||
| data42 = {{#if:{{{总人口|}}}|{{{总人口}}} 万人 {{#if:{{{人口年份|}}}|({{{人口年份}}})}}}} | |||
| label43 = 人口密度 | |||
| data43 = {{#ifexpr: {{{总面积|0}}} > 0 and {{{总人口|0}}} > 0 | {{#expr: {{{总人口}}} * 10000 / {{{总面积}}} round 1}} 人/km² | 不适用 }} | |||
| | |||
| | | header50 = 经济 | ||
| | | label51 = 总GDP | ||
| | | data51 = {{#if:{{{GDP (名义)|}}}|{{{GDP (名义)}}}({{{经济年份|}}}年)[[世界币]]}} | ||
| label52 = 人均GDP | |||
| data52 = {{#if:{{{人均GDP|}}}|{{{人均GDP}}}({{{经济年份|}}}年)[[世界币]]}} | |||
| | | label53 = 法定货币 | ||
| data53 = {{{货币|}}} | |||
| | |||
| | |||
| | | header60 = 其他信息 | ||
| | | label61 = 时区 | ||
| | | data61 = {{{时区|}}} | ||
| | | label62 = 国际电话区号 | ||
| data62 = {{{国际电话区号|}}} | |||
| label63 = 国家代码 | |||
| | | data63 = {{{国家代码|}}} | ||
| | | label64 = 域名后缀 | ||
| | | data64 = {{{网站域名后缀|}}} | ||
| | |||
| | |||
| belowstyle = border-top:1px solid #a2a9b1; background-color:#f9f9f9; padding:0.4em; text-align:left; font-size:85%; line-height:1.2em; color:#555; | | belowstyle = border-top:1px solid #a2a9b1; background-color:#f9f9f9; padding:0.4em; text-align:left; font-size:85%; line-height:1.2em; color:#555; | ||
| below = {{{脚注|}}} | | below = {{{脚注|}}} | ||
}}[[分类: | }} | ||
{{#cargo_store: | |||
_table = Countries | |||
|Name = {{PAGENAME}} | |||
|FullName = {{{国名全称|}}} | |||
|Capital = {{{首都|}}} | |||
|MajorCity = {{{最大城市|}}} | |||
|OfficialLanguage = {{{官方语言|}}} | |||
|GovType = {{{政府形式|}}} | |||
|HeadOfState = {{{元首|}}} | |||
|HeadOfGov = {{{政府首脑|}}} | |||
|Area = {{{总面积|}}} | |||
|Population = {{{总人口|}}} | |||
|GDP_Nominal = {{{GDP (名义)|}}} | |||
|GDP_PerCapita = {{{人均GDP|}}} | |||
|Currency = {{{货币|}}} | |||
|Lat = {{{纬度|}}} | |||
|Lng = {{{经度|}}} | |||
}}[[分类:国家]]</includeonly> | |||
2026年5月10日 (日) 12:20的版本
此模板定义表格“Countries”。 查看表格.