主题插件示例。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
978 B

6 years ago
package com.fr.plugin.theme.original;
6 years ago
import com.fr.decision.config.AppearanceConfig;
import com.fr.web.struct.Component;
import com.fr.web.struct.category.ScriptPath;
import com.fr.web.struct.category.StylePath;
import com.fr.web.struct.Filter;
/**
* Created by Zed on 2018/10/12.
*/
public class OriginalComponent extends Component {
public static final OriginalComponent KEY = new OriginalComponent();
private OriginalComponent() {
}
@Override
public ScriptPath script() {
6 years ago
return ScriptPath.build("com/fr/plugin/theme/original/web/theme.js");
6 years ago
}
@Override
public StylePath style() {
6 years ago
return StylePath.build("com/fr/plugin/theme/original/web/style.css");
6 years ago
}
@Override
public Filter filter() {
return new Filter() {
public boolean accept() {
return "com.fr.plugin.decision.theme.original".equals(AppearanceConfig.getInstance().getThemeId());
}
};
}
}