User:Psephomancy/Sandbox: Difference between revisions

 
(16 intermediate revisions by the same user not shown)
Line 192:
"cornerRadius": {"signal": "cornerRadius"}
}
}
}
]
}
</graph>
 
== Interactive ==
 
<graph>
{
// We want to use Vega 2, and specify image size
"version": 2, "width": 300, "height": 80,
// Set padding to the same value on all sides
"padding": 12,
// By default the background is transparent
"background": "#edf1f7",
 
"signals": [
{
"name": "isDragging",
"init": false,
"streams": [
{"type": "@handle:mousedown","expr": "true"},
{"type": "mouseup","expr": "false"}
]
},
{
"name": "scaledHandlePosition",
"streams": [
{
"type": "mousemove[isDragging]",
"expr": "eventX()",
"scale": {"name": "yearsScale","invert": true}
}
]
},
{
"name": "currentYear",
"init": 2000,
"expr": "clamp(parseInt(scaledHandlePosition),1960,2013)"
}
],
 
"scales": [
{
"name": "yearsScale",
"type": "linear",
"zero": false,
"domain": [1960, 2013],
"range": "width"
}
],
 
"marks": [
{
// draw the year label in the upper left corner
"name": "yearLabel",
"type": "text",
"properties": {
"enter": {
"x": {"value": 0},
"y": {"value": 25},
"fontSize": {"value": 32},
"fontWeight": {"value": "bold"},
"fill": {"value": "steelblue"}
},
"update": {"text": {"signal": "currentYear"} }
}
},
{
// Draw a horizontal line
"name": "scrollLine",
"type": "rule",
"properties": {
"enter": {
"x": {"value": 0},
"y": {"value": 40},
"x2": {"value": 300},
"stroke": {"value": "#000"},
"strokeWidth": {"value": 2}
}
}
},
{
// Draw a triangle shape with a hover effect
// naming objects allows us to reference them later
"name": "handle",
"type": "path",
"properties": {
"enter": {
"y": {"value": 40},
// path syntax is the same as SVG's path tag
"path": {"value": "m-5.5,-10l0,20l11.5,-10l-11.5,-10z"},
"stroke": {"value": "#880"},
"strokeWidth": {"value": 2.5}
},
"update": {
"x": {"scale": "yearsScale","signal": "currentYear"},
"fill": {"value": "#fff"}
},
// Change fill color of the object on mouse hover
"hover": {"fill": {"value": "#f00"} }
}
}
Line 225 ⟶ 327:
<code><nowiki>[[w:test]]</nowiki></code>
 
Blah blah [[w:test]] blah blah.
 
<code><nowiki>[[w:test|test]]</nowiki></code>
 
Blah blah [[w:test|test]] blah blah.
 
<code><nowiki>{{wp|test}}</nowiki></code>
 
Blah blah {{wp|test}} blah blah.
 
<code><nowiki>[[wikt:test|test]]</nowiki></code>
 
Blah blah [[wikt:test|test]] blah blah.
 
== Scary transclusion ==
Line 325 ⟶ 427:
== Argh ==
{{raw:w:CIA}}
 
== YouTube ==
 
Can embed YouTube videos!
 
<youtube>JtKAScORevQ</youtube>
 
<youtube>orybDrUj4vA</youtube>
 
== Metadata ==
Is cached and not updated until I edit page?
 
== Image annotations ==
 
"The gadget will work for files uploaded locally on your Wiki exactly as it does for files here at the Commons."
 
[[File:Voting system Euler diagram.svg|500px]]
 
"For non-local files (files hosted here at the Commons, but viewed on your Wiki), the script will enable viewing of the notes (if there are any), but will not allow modifying them."
 
[[File:Chicago.jpg|500px]]
 
== Automatic category lists ==
Using [[mw:Extension:DynamicPageList3]]
=== (old?) DynamicPageList format ===
 
Cardinal voting methods:
<DynamicPageList>
category = Cardinal voting methods
</DynamicPageList>
 
Proportional cardinal voting methods:
<DynamicPageList>
category = Cardinal voting methods
category = Proportional voting methods
</DynamicPageList>
 
=== (new?) DPL format ===
 
Cardinal voting methods:
<DPL>
category = Cardinal voting methods
</DPL>
 
 
Cardinal voting methods (including sub-categories of Approval methods:
<DPL>
category = **Cardinal voting methods
</DPL>
 
Only two layers deep are supported, though. :/
 
 
Proportional cardinal voting methods:
<DPL>
category = Cardinal voting methods
category = Proportional voting methods
</DPL>
 
Proportional cardinal voting methods (including subcats):
<pre><DPL>
category = **Cardinal voting methods
category = **Proportional voting methods
</DPL>></pre>
 
<DPL>
category = **Cardinal voting methods
category = **Proportional voting methods
</DPL>
 
== Templates ==
 
Text that needs a reference.{{cite arXiv |last= |first= |author-link= |eprint=1008.1501 |title= |class= |date= }}
 
Cows are vegetables.{{dubious}}
 
Cows agitate.{{clarify}}
 
Some say cows are non-corporeal.{{who}}
 
== Citer test ==
Citer: https://tools.wmflabs.org/citer/citer.fcgi?input_type=url-doi-isbn&user_input=+10.1007%2F978-3-642-20441-8&dateformat=%25Y-%25m-%25d
 
Some stuff<ref name="Electoral Systems 2012 p.">{{cite book | editor-last=Felsenthal | editor-first=Dan S. | editor-last2=Machover | editor-first2=Moshé | title=Studies in Choice and Welfare | chapter=Electoral Systems | publisher=Springer Berlin Heidelberg | publication-place=Berlin, Heidelberg | year=2012 | isbn=978-3-642-20440-1 | issn=1614-0311 | doi=10.1007/978-3-642-20441-8 | page=}}</ref>
 
=== References ===
<references/>
 
== Citoid test ==
PMID<ref>{{Cite journal|last=Lee|first=J.|last2=Hahn|first2=S.|last3=Kim|first3=D.-W.|last4=Kim|first4=J.|last5=Kang|first5=S. N.|last6=Rha|first6=S. Y.|last7=Lee|first7=K. B.|last8=Kang|first8=J.-H.|last9=Park|first9=B.-J.|date=2013-01-15|title=Evaluation of survival benefits by platinums and taxanes for an unfavourable subset of carcinoma of unknown primary: a systematic review and meta-analysis|url=https://www.ncbi.nlm.nih.gov/pubmed/23175147|journal=British Journal of Cancer|volume=108|issue=1|pages=39–48|doi=10.1038/bjc.2012.516|issn=1532-1827|pmc=3553519|pmid=23175147}}</ref>
 
PMC<ref>{{Cite journal|last=Lee|first=J|last2=Hahn|first2=S|last3=Kim|first3=D-W|last4=Kim|first4=J|last5=Kang|first5=S N|last6=Rha|first6=S Y|last7=Lee|first7=K B|last8=Kang|first8=J-H|last9=Park|first9=B-J|date=2013-01-15|title=Evaluation of survival benefits by platinums and taxanes for an unfavourable subset of carcinoma of unknown primary: a systematic review and meta-analysis|url=https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3553519/|journal=British Journal of Cancer|volume=108|issue=1|pages=39–48|doi=10.1038/bjc.2012.516|issn=0007-0920|pmc=3553519|pmid=23175147}}</ref>
 
ISSN<ref>{{Cite journal|last=Lindheimer|first=M. D.|date=1975-11|title=Hypertension in pregnancy: an invitational symposium|url=https://www.ncbi.nlm.nih.gov/pubmed/1532|journal=The Journal of Reproductive Medicine|volume=15|issue=5|pages=171–172|issn=0024-7758|pmid=1532}}</ref>
 
=== References ===
<references/>