⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roller.vm

📁 这个weblogging 设计得比较精巧
💻 VM
字号:
#**
 * Date formatting, theme image and theme paths.
 * @author  Lance Lavandowska (conversion to Velocimacros)
 *#

#**
 * General purpose date formatter. Need to be careful of whitespace.
 * @param dateFormat Date format to be used (see java.text.SimpleDateFormat).
 * @param date Date object to be formatted (see java.util.Date).
 *#
#macro( formatDate $dateFormat $date )$dateFormatter.applyPattern($dateFormat)#if ($date)$dateFormatter.format( $date )#else$dateFormat#end#end

#**
 * Show Roller version number string.
 *#
#macro( showVersion )$rollerVersion#end

#**
 * Show path to common images directory.
 *#
#macro( showImagePath )$ctxPath/images#end

#**
 * Show path to a theme directory.
 * @param theme Name of the theme.
 *#
#macro( showThemePath $theme )$ctxPath/themes/$theme#end

#**
 * Show path to a theme image.
 * @param theme Name of the theme.
 * @param imageName Name of the image.
 *#
#macro( showThemeImagePath $theme $imageName )#showThemePath($theme)/images/$imageName#end

#**
 * Shows an IMG tag for a theme image.
 * @param theme Name of the theme.
 * @param imageName Name of the image.
 *#
#macro( showThemeImage $theme $imageName )
<img alt="$imageName" src="#showThemeImagePath($theme $imageName)" />#end

#**
 * Shows path to a file in a theme's style directory.
 * @param theme Name of the theme.
 * @param stylesheet Name of the file.
 *#
#macro( showThemeStylePath $theme $stylesheet )#showThemePath($theme)/styles/$stylesheet#end

#**
 * Shows a STYLE or LINK REL tag for a file in a theme's style directory.
 * @param theme Name of the theme.
 * @param stylesheet Name of the file.
 * @param useImport true to use STYLE tag, otherwhise uses LINK REL
 *#
#macro( showThemeStyle $theme $stylesheet $useImport )
#if ($useImport)
<style type="text/css">
@import url(#showThemeStylePath($theme $stylesheet));
</style>
#else
<link rel="stylesheet" type="text/css" href="#showThemeStylePath($theme $stylesheet)" />
#end
#end

#**
 * Shows a STYLE tag a file in a theme's style directory.
 * @param theme Name of the theme.
 * @param stylesheet Name of the file.
 * @param useImport true to use STYLE tag, otherwhise uses LINK REL
 *#
#macro( showThemeStyleImport $theme $stylesheet )#showThemeStyle($theme $stylesheet true)#end

#**
 * Shows path to a file in a theme's scripts directory.
 * @param theme Name of the theme.
 * @param scriptFile Name of the file.
 *#
#macro( showThemeScriptPath $theme $scriptFile )#showThemePath($theme)/scripts/$scriptFile#end

#**
 * Shows SCRIPT tag for a file in a theme's scripts directory.
 * @param theme Name of the theme.
 * @param scriptFile Name of the file.
 *#
#macro( showThemeScript $theme $scriptFile )
<script type="text/javascript" src="#showThemeScriptPath($theme $scriptFile)"></script>
#end

#**
 * Evaluate string as a Velocity template.
 * @param str String to be evaluated.
 *#
#macro( evaluateString $str )$pageHelper.evaluateString( $str )#end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -