Skip to content

Instantly share code, notes, and snippets.

View radiegtya's full-sized avatar

Ega Wachid Radiegtya radiegtya

View GitHub Profile
Using worker: worker-linux-docker-dbc4b072.prod.travis-ci.com:travis-linux-16
travis_fold:start:system_info
Build system information
Build language: android
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
<template name="meteoris_themeAdmin_hookNavbar">
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
{{#if currentUser}}
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<img src="/images/user.png" class="user-image" alt="User Image">
<span class="hidden-xs">{{currentUser.profile.name}}</span>
</a>
@radiegtya
radiegtya / root>client>hook>navbar.js
Last active October 27, 2015 15:16
Meteoris Quickstart
var ctrl = new Meteoris.UserController();
Template.meteoris_themeAdmin_hookNavbar.events = {
'click #btnLogout': function(){
ctrl.logout();
}
};
@radiegtya
radiegtya / root>client>hook>sidebar.html
Last active October 27, 2015 15:16
Meteoris Quickstart
<template name="meteoris_themeAdmin_hookSidebar">
<!-- Left side column. contains the logo and sidebar -->
<aside class="main-sidebar">
<!-- sidebar: style can be found in sidebar.less -->
<section class="sidebar">
{{#if currentUser}}
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<img src="/images/user.png" class="img-circle" alt="User Image">
@radiegtya
radiegtya / root>radiegtya:site>lib>router.js
Last active October 27, 2015 15:24
Meteoris Quickstart
/**
create group routes, so every router has prefix radiegtya
*/
var groupRoutes = FlowRouter.group({
prefix: '/radiegtya',
name: 'radiegtya',
});
/**
create the main router called site, and use BlazeLayout render "meteoris_themeAdminMain" from metoris:theme-admin package, and accessing template called "radiegtya_siteIndex"
/*
create a namespace called Radiegtya.SiteController
*/
Namespace('Radiegtya.SiteController');
/**
Create controller which extends Meteoris Controller
*/
Radiegtya.SiteController = Meteoris.Controller.extend({
/* set default counter at constructor */
<template name="radiegtya_siteIndex">
<div class="content">
<div class="box">
<div class="box-body">
<button>Click Me</button>
<p>
You've pressed the button {{counter}} times.
</p>
</div>
</div>
var ctrl = new Radiegtya.SiteController();
/**
In the template helper section we are using index() method to get object return value from controller. It's because index was the action and also the file name suffix. This structure will make You easier to get jobs done, when your team getting bigger and the code getting bigger.
*/
Template.radiegtya_siteIndex.helpers({
myName: function () {
return ctrl.index().myName;
},
myHobby: function () {
//routing as home page (/), rendering meteoris_themeAdminMain as the template and radiegtya_chatIndex as the content
FlowRouter.route('/', {
action: function() {
BlazeLayout.render('meteoris_themeAdminMain', {content:"radiegtya_chatIndex"});
}
});
<template name="radiegtya_chatIndex">
<div class="content">
<div class="box">
<div class="box-body">
<h1>Welcome to Meteoris Chat</h1>
</div>
</div>
</div>
</template>