Difference between revisions of "Template:Fit-image"

From Moegirlpedia
Jump to: navigation, search
(Created page with "<includeonly><!-- --><templatestyles src="Fit-image/style.css" /><!-- -->{{#if: {{#var: fit-mode }} ||{{#vardefine: fit-mode | cover }} }}<!-- -->{{#if: {{{模式|{{{mode|}}}...")
 
(Translated text (by SublimeText.Mediawiker))
 
Line 3: Line 3:
  
 
-->{{#if: {{#var: fit-mode }} ||{{#vardefine: fit-mode | cover }} }}<!--
 
-->{{#if: {{#var: fit-mode }} ||{{#vardefine: fit-mode | cover }} }}<!--
-->{{#if: {{{模式|{{{mode|}}}}}} | {{#vardefine: fit-mode | {{{模式|{{{mode|}}}}}} }} |}}<!--
+
-->{{#if: {{{mode|}}} | {{#vardefine: fit-mode | {{{mode|}}} }} |}}<!--
-->{{#if: {{{宽|{{{宽度|{{{width|}}}}}}}}} | {{#vardefine: fit-width | {{{宽|{{{宽度|{{{width|}}}}}}}}} }} |}}<!--
+
-->{{#if: {{{width|}}} | {{#vardefine: fit-width | {{{width|}}} }} |}}<!--
-->{{#if: {{{高|{{{高度|{{{height|}}}}}}}}} | {{#vardefine: fit-height | {{{高|{{{高度|{{{height|}}}}}}}}} }} |}}<!--
+
-->{{#if: {{{height|}}} | {{#vardefine: fit-height | {{{height|}}} }} |}}<!--
-->{{#vardefine: fit-outer | {{#expr: {{#switch: 外部图片 | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} or {{#switch: 外部图像 | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} or {{#switch: 外部 | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} }} }}<!--
+
-->{{#vardefine: fit-outer | {{#expr: {{#switch: external link | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} or {{#switch: external image | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} or {{#switch: extimage | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} }} }}<!--
-->{{#vardefine: fit-outer-link | {{#expr: {{#switch: 外部链接 | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} or {{#switch: 外链 | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} }} }}<!--
+
-->{{#vardefine: fit-outer-link | {{#expr: {{#switch: external link | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} or {{#switch: extlink | {{{2|}}} | {{{3|}}} | {{{4|}}} | {{{5|}}} = 1 | #default = 0 }} }} }}<!--
--><!--变量声明
+
--><!--Declaring variables
  
 
--><div class="fit-image {{{class|}}}" id="{{{id|}}}"
 
--><div class="fit-image {{{class|}}}" id="{{{id|}}}"
Line 22: Line 22:
 
     --><div class="fit-image-{{#var: fit-mode }}" style="width: {{#var: fit-width}}; height: {{#var: fit-height}};"><!--
 
     --><div class="fit-image-{{#var: fit-mode }}" style="width: {{#var: fit-width}}; height: {{#var: fit-height}};"><!--
 
         -->{{#ifeq: {{#var: fit-outer }} | 1  
 
         -->{{#ifeq: {{#var: fit-outer }} | 1  
                 |<img alt="{{{1|}}}" src="{{path|{{{1|}}}}}"/>{{#ifeq: {{path|{{{1|}}}}} | {{filepath:{{{1|}}}}} |<div style="display: none;">[[file:{{{1|}}}]]</div>|}}<!--此处有在使用外部图片形式调用内部图片时保证链入的隐藏图片-->
+
                 |<img alt="{{{1|}}}" src="{{path|{{{1|}}}}}"/>{{#ifeq: {{path|{{{1|}}}}} | {{filepath:{{{1|}}}}} |<div style="display: none;">[[file:{{{1|}}}]]</div>|}}<!--Here are hidden images that are guaranteed to be linked when using external images to call internal images-->
 
                 |[[file:{{{1|}}}{{#if: {{#var: fit-height}} |{{!}}x{{#var: fit-height}}}}{{#if: {{#var: fit-width}} |{{!}}{{#var: fit-width}}}}{{#ifeq: {{{link|0}}} | 0 ||{{!}}link={{{link|}}}|}}]]
 
                 |[[file:{{{1|}}}{{#if: {{#var: fit-height}} |{{!}}x{{#var: fit-height}}}}{{#if: {{#var: fit-width}} |{{!}}{{#var: fit-width}}}}{{#ifeq: {{{link|0}}} | 0 ||{{!}}link={{{link|}}}|}}]]
 
             }}<!--
 
             }}<!--
 
     --></div><!--
 
     --></div><!--
     --><!--图片本体
+
     --><!--Image body
  
 
     -->{{#ifexpr: {{#if: {{{link|}}} |1|0}} and {{#var: fit-outer }} |
 
     -->{{#ifexpr: {{#if: {{{link|}}} |1|0}} and {{#var: fit-outer }} |
Line 32: Line 32:
 
             -->{{#ifeq:{{#var: fit-outer-link}}|1|[{{{link|}}}]|[[{{{link|}}}]]}}<!--
 
             -->{{#ifeq:{{#var: fit-outer-link}}|1|[{{{link|}}}]|[[{{{link|}}}]]}}<!--
 
         --></div><!--
 
         --></div><!--
     -->|}}<!--使用外部图片时的mask
+
     -->|}}<!--Mask when using external images
  
 
--></div><!--
 
--></div><!--
Line 38: Line 38:
  
 
--></includeonly><!--
 
--></includeonly><!--
--><noinclude>{{doc}}[[Category:Image templates]][[分类:使用模板样式的模板]]</noinclude>
+
--><noinclude>{{doc}}[[Category:Image templates]][[Category:Templates using template styles]]</noinclude>

Latest revision as of 19:08, 8 July 2024

Template-info.svg Template Documentation  [Create] [Refresh]