user.vm
来自「这个weblogging 设计得比较精巧」· VM 代码 · 共 37 行
VM
37 行
#**
* Uploaded image display and resource paths.
* @author Lance Lavandowska (conversion to Velocimacros)
*#
#**
* Show an image IMG tag, optionally surrounded with an 'A HREF' link tag
* @param imageUrl URL for the image.
* @param linkUrl URL for the link or empty string if none.
* @param alt ALT text for the IMG tag.
* @param border BORDER for the IMG tag.
* @param halign HALIGN horizontal alignment for the IMG tag.
* @pram valign VALIGN vertical ailignment for the IMG tag.
*#
#macro( showImage $imageUrl $linkUrl $alt $border $halign $valign )
#if ($utilities.isNotEmpty($linkUrl))
<a href="$linkUrl"/><img src="$imageUrl" alt="$alt"
border="$border" halign="$halign" valign="$valign" /></a>
#else
<img src="$imageUrl" alt="$alt" border="$border"
halign="$halign" valign="$valign" />
#end
#end
#**
* Show an image IMG tag for an image you have uploaded to Roller,
* optionally surrounded with an 'A HREF' link tag
*#
#macro( showResourceImage $fileName $linkUrl $alt $border $halign $valign )
#set( $imageUrl = $uploadPath/$userName/$fileName )
#showImage( $imageUrl $linkUrl $alt $border $halign $valign )
#end
#**
* Show path to your file upload directory, for use in building URLs.
*#
#macro( showResourcePath )$uploadPath/$userName#end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?