Difference between revisions of "Template:Sandbox/doc"

From WikiCorporates
Jump to navigation Jump to search
m (→‎Example)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Template:Sandbox|Template]] Template for testing out new templates.
 
[[Template:Sandbox|Template]] Template for testing out new templates.
 +
 +
I want to combine the best of this template: https://www.mediawiki.org/wiki/Template:Image<br/>
 +
with this one: https://en.wikipedia.org/wiki/Template:Plain_image_with_caption
 +
 +
Things to note:
 +
* class=thumbinner: font-size:94%; text-align:center;
 +
* class=thumbcaption: text-align:left; border:none; line-height:1.4em; padding:3px; font-size:94%;
 +
 +
Goals:
 +
* It would be nice if it could deal with both uploaded images as well as ones in the filesystem.
 +
* I want to be able to use the image as a link.
 +
 +
==== Current format ====
 +
{{Sandbox|James Webb Space Telescope Mirror37.jpg|This is a picture of the [[James Webb Space Telescope]].|200|right|top|triangle|#9f1f34}}
 +
<tt><nowiki>
 +
{{Sandbox|James Webb Space Telescope Mirror37.jpg|This is a picture of the [[James Webb Space Telescope]].|200|right|top|triangle|#9f1f34}}
 +
</nowiki></tt>
 +
 +
 +
==== Pref. format: ====
 
<pre>
 
<pre>
−
Path is set to http://wikipolitiks.local/Images/
+
{{Sandbox|OpenCorporates.svg|80|13|caption=Data courtesy of|link=OpenCorporates|align=right|link=OpenCorporates}}
 
</pre>
 
</pre>
  
−
=== Example ===
+
 
−
<pre>{{img|Financial-Weapons-of-Mass-Destruction.png|100|100|border=#808080}}</pre>
+
Standard Mediawiki "File:..." output:
 +
[[File:OpenCorporates.svg|right|80px|thumb|<small>Data courtesy of</small>|link=OpenCorporates]]
 +
 
 +
=== WIP Example ===
 +
<pre>
 +
{{Sandbox|OpenCorporates.svg|Data thanks to:|100|right|top}}
 +
</pre>
 
Gives:
 
Gives:
−
{{Sandbox|James Webb Space Telescope Mirror37.jpg|This is a picture of the [[James Webb Space Telescope]]. Note the small triangle next to this caption.|350|left|top|triangle|rgba(0,110,255,1)}}
+
{{Sandbox|OpenCorporates.svg|Data thanks to:|100|right|top}}
−
<tt><nowiki>{{plain image with caption|James Webb Space Telescope Mirror37.jpg|This is a picture of the [[James Webb Space Telescope]].|350|left|top|triangle|rgba(0,110,255,1)}}</nowiki></tt>
+
 
−
<includeonly>[[Category:WikiPolitiks templates]]</includeonly>
+
<includeonly>[[Category:WikiCorporates templates]]</includeonly>

Latest revision as of 14:05, 30 May 2020

Template Template for testing out new templates.

I want to combine the best of this template: https://www.mediawiki.org/wiki/Template:Image
with this one: https://en.wikipedia.org/wiki/Template:Plain_image_with_caption

Things to note:

  • class=thumbinner: font-size:94%; text-align:center;
  • class=thumbcaption: text-align:left; border:none; line-height:1.4em; padding:3px; font-size:94%;

Goals:

  • It would be nice if it could deal with both uploaded images as well as ones in the filesystem.
  • I want to be able to use the image as a link.

Current format

This is a picture of the James Webb Space Telescope.
This is a picture of the James Webb Space Telescope.

{{Sandbox|James Webb Space Telescope Mirror37.jpg|This is a picture of the [[James Webb Space Telescope]].|200|right|top|triangle|#9f1f34}}


Pref. format:

{{Sandbox|OpenCorporates.svg|80|13|caption=Data courtesy of|link=OpenCorporates|align=right|link=OpenCorporates}}


Standard Mediawiki "File:..." output:

Data courtesy of

WIP Example

{{Sandbox|OpenCorporates.svg|Data thanks to:|100|right|top}}

Gives:

Data thanks to:
Data thanks to: