Last active
July 30, 2016 06:32
-
-
Save adriatic/326b30a5e035842c8c780aa487378888 to your computer and use it in GitHub Desktop.
Menu: images
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="./images.css"></require> | |
<div id="example"> | |
<div class="demo-section k-content"> | |
<h4>Menu with images</h4> | |
<ul id="menu-images" ak-menu="k-data-source.bind: dataSource"></ul> | |
</div> | |
<div class="demo-section k-content"> | |
<h4>Menu with sprites</h4> | |
<div id="menu-sprites" ak-menu="k-data-source.bind: spritesDS"></div> | |
</div> | |
</div> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Images { | |
dataSource = [ | |
{ | |
text: 'Baseball', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/sports/baseball.png', | |
items: [ | |
{ text: 'Top News', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/star.png' }, | |
{ text: 'Photo Galleries', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/photo.png' }, | |
{ text: 'Videos Records', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/video.png' }, | |
{ text: 'Radio Records', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/speaker.png' } | |
] | |
}, | |
{ | |
text: 'Golf', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/sports/golf.png', | |
items: [ | |
{ text: 'Top News', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/star.png' }, | |
{ text: 'Photo Galleries', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/photo.png' }, | |
{ text: 'Videos Records', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/video.png' }, | |
{ text: 'Radio Records', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/speaker.png' } | |
] | |
}, | |
{ | |
text: 'Swimming', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/sports/swimming.png', | |
items: [ | |
{ text: 'Top News', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/star.png' }, | |
{ text: 'Photo Galleries', imageUrl: 'http://demos.telerik.com/kendo-ui/content/shared/icons/16/photo.png' } | |
] | |
} | |
]; | |
spritesDS = [{ | |
text: 'Brazil', spriteCssClass: 'brazilFlag', items: [ | |
{ text: 'History', spriteCssClass: 'historyIcon' }, | |
{ text: 'Geography', spriteCssClass: 'geographyIcon' } | |
] | |
}, | |
{ | |
text: 'India', spriteCssClass: 'indiaFlag', items: [ | |
{ text: 'History', spriteCssClass: 'historyIcon' }, | |
{ text: 'Geography', spriteCssClass: 'geographyIcon' } | |
] | |
}, | |
{ | |
text: 'Netherlands', spriteCssClass: 'netherlandsFlag', items: [ | |
{ text: 'History', spriteCssClass: 'historyIcon' }, | |
{ text: 'Geography', spriteCssClass: 'geographyIcon' } | |
] | |
}]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#menu-sprites .k-sprite { | |
background-image: url("http://demos.telerik.com/kendo-ui/content/shared/styles/flags.png"); | |
} | |
.brazilFlag { | |
background-position: 0 0; | |
} | |
.indiaFlag { | |
background-position: 0 -32px; | |
} | |
.netherlandsFlag { | |
background-position: 0 -64px; | |
} | |
.historyIcon { | |
background-position: 0 -96px; | |
} | |
.geographyIcon { | |
background-position: 0 -128px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Aurelia KendoUI bridge</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.common.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.rtl.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.default.min.css"> | |
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2016.1.226/styles/kendo.mobile.all.min.css"> | |
<script src="https://kendo.cdn.telerik.com/2016.1.226/js/jszip.min.js"></script> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-kendoui-bundles/0.3.5/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-kendoui-bridge', kendo => kendo.pro()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment