|
| 1 | +{%- assign name = include.name | strip -%} |
| 2 | + |
| 3 | +{%- if include.link -%} |
| 4 | + {%- assign image_link = include.link -%} |
| 5 | +{%- else -%} |
| 6 | + {%- capture image_link -%} |
| 7 | + {%- case name -%} |
| 8 | + {%- when "Alida" -%} /software/alida |
| 9 | + {%- when "Android" -%} /platforms/android |
| 10 | + {%- when "Bio-Formats" -%} /formats/bio-formats |
| 11 | + {%- when "Bio7" -%} /software/bio7 |
| 12 | + {%- when "BoneJ" -%} /plugins/bonej |
| 13 | + {%- when "CellProfiler" -%} /software/cellprofiler |
| 14 | + {%- when "ClearVolume" -%} /plugins/clearvolume |
| 15 | + {%- when "Eclipse" -%} /develop/eclipse |
| 16 | + {%- when "Fiji" -%} /software/fiji |
| 17 | + {%- when "Git" -%} /develop/git |
| 18 | + {%- when "GitHub" -%} /develop/github |
| 19 | + {%- when "Icy" -%} /software/icy |
| 20 | + {%- when "ImageJ" -%} /about |
| 21 | + {%- when "ImageJ1" -%} /software/imagej1 |
| 22 | + {%- when "ImageJ2" -%} /software/imagej2 |
| 23 | + {%- when "ImgLib2" -%} /libs/imglib2 |
| 24 | + {%- when "KNIME" -%} /software/knime |
| 25 | + {%- when "Linux" -%} /platforms/linux |
| 26 | + {%- when "LOCI" -%} /orgs/loci |
| 27 | + {%- when "MacOS" -%} /platforms/macos |
| 28 | + {%- when "Maven" -%} /develop/maven |
| 29 | + {%- when "Micro-Manager" -%} /software/micro-manager |
| 30 | + {%- when "MiToBo" -%} /software/mitobo |
| 31 | + {%- when "OME" -%} /software/omero |
| 32 | + {%- when "OMERO" -%} /software/omero |
| 33 | + {%- when "Orbit" -%} /software/orbit |
| 34 | + {%- when "Pi" -%} /platforms/pi |
| 35 | + {%- when "Plugin" -%} /plugins |
| 36 | + {%- when "QuPath" -%} /software/qupath |
| 37 | + {%- when "SCIFIO" -%} /libs/scifio |
| 38 | + {%- when "SciJava" -%} /libs/scijava |
| 39 | + {%- when "SLIM Curve" -%} /plugins/slim-curve |
| 40 | + {%- when "StarDist" -%} /plugins/stardist |
| 41 | + {%- when "VCell" -%} /software/virtual-cell |
| 42 | + {%- when "Windows" -%} /platforms/windows |
| 43 | + {%- endcase -%} |
| 44 | + {%- endcapture -%} |
| 45 | +{%- endif -%} |
| 46 | + |
| 47 | +{%- if include.align -%} |
| 48 | + {%- assign image_align = 'style="float:' | append: include.align | append: ';"' -%} |
| 49 | +{%- else -%} |
| 50 | + {%- assign image_align = "" -%} |
| 51 | +{%- endif -%} |
| 52 | + |
| 53 | +{%- capture extension -%} |
| 54 | + {%- case name -%} |
| 55 | + {%- when "Alida" -%} .jpg |
| 56 | + {%- when "Android" -%} .svg |
| 57 | + {%- when "Linux" -%} .svg |
| 58 | + {%- when "Micro-Manager" -%} .jpg |
| 59 | + {%- when "Pi" -%} .svg |
| 60 | + {%- when "StarDist" -%} .jpg |
| 61 | + {%- when "Windows" -%} .svg |
| 62 | + {%- else -%} .png |
| 63 | + {%- endcase -%} |
| 64 | +{%- endcapture -%} |
| 65 | + |
| 66 | +{%- assign filename = name | slugify -%} |
| 67 | +{%- if filename == "imagej2" -%} |
| 68 | + {%- assign image_url = "/media/icons/imagej.png" -%} |
| 69 | +{%- else -%} |
| 70 | + {%- assign image_url = "/media/icons/" | append: filename | append: extension -%} |
| 71 | +{%- endif -%} |
| 72 | + |
| 73 | +{%- assign image_size = include["size"] | default: "48px" -%} |
| 74 | +{%- assign first = image_size | slice: 0 -%} |
| 75 | +{%- if first == "x" -%} |
| 76 | + {%- assign size = image_size | slice: 1, image_size.size -%} |
| 77 | + {%- assign image_size = 'height="' | append: size | append: '"' -%} |
| 78 | +{%- else -%} |
| 79 | + {%- assign image_size = 'width="' | append: image_size | append: '"' -%} |
| 80 | +{%- endif -%} |
| 81 | + |
| 82 | +<a href="{{image_link}}"><img {{image_align}} alt="{{name}}" src="{{image_url}}" {{image_size}}/></a> |
| 83 | + |
| 84 | +{%- comment -%} |
| 85 | +# vi:syntax=liquid |
| 86 | +{%- endcomment -%} |
0 commit comments