Skip to content

Instantly share code, notes, and snippets.

View Scapal's full-sized avatar

Pascal Fautré Scapal

  • Alt-Tab
  • Belgium
View GitHub Profile
@Scapal
Scapal / f7.js
Last active April 25, 2016 14:24
Modal Service for Framework 7 integration with Aurelia
import 'framework7';
// import 'framework7-3d-panels/dist/framework7.3dpanels';
export const F7 = new Framework7({
ios: true
});
@Scapal
Scapal / animate.css
Last active April 21, 2016 13:32
Aurelia navigation-view Demo
/* animate page transitions */
div.page {
position: absolute;
left: 0;
top: 0;
right: 0;
/*width: 100%;*/
height: 100%;
@Scapal
Scapal / paginate.js
Last active April 21, 2016 13:33
Aurelia pagination components
export class PaginateValueConverter {
toView(array, pageSize, currentPage) {
if(array === undefined || pageSize === undefined || pageSize == '0')
return array;
if(currentPage === undefined || currentPage == '')
currentPage = 0;
let first = parseInt(currentPage) * parseInt(pageSize);
let end = Math.min(first + parseInt(pageSize), array.length);
@Scapal
Scapal / calendar.js
Last active June 18, 2019 08:08
Aurelia FullCalendar integration
import {
inject, noView, bindable, bindingMode,
customElement, BindingEngine, inlineView
} from 'aurelia-framework';
import 'jquery';
import moment from 'moment';
import {fullCalendar} from 'fullcalendar';
@customElement('calendar')
@Scapal
Scapal / navigation-view.js
Last active April 21, 2016 13:34
Aurelia navigation-view
import {
inject, Container, ViewSlot, ViewLocator,
customElement, noView, CompositionTransaction,
CompositionEngine, bindable
} from 'aurelia-framework';
@noView()
@customElement('navigation-view')
@inject(Element, Container, ViewSlot, ViewLocator, CompositionEngine, CompositionTransaction)
export class NavigationView {
@Scapal
Scapal / tree-node.css
Created March 16, 2016 21:23
Aurelia Bootstrap Tree
.treeview .list-group-item {
cursor: pointer;
}
.treeview span.indent {
margin-left: 10px;
margin-right: 10px;
}
.treeview span.icon {
import {inject, customAttribute, children} from 'aurelia-framework';
function calcOuterHeight(element){
var height;
height = element.getBoundingClientRect().height;
height += getStyleValue(element, 'marginTop');
height += getStyleValue(element, 'marginBottom');
return height;
}