Skip to content

themeteorites/route-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

meteor add themeteorites:route-class

client/lib/router.js

Router.route('/', {name:'index'})
Router.route('/other')
Router.route('/other/sub')

client/main.html

<body>
  <div class="el">Different styles applied according to currently active route.</div>
</body>

styles.css

.el {
  border: 1px solid black;
}
.index .el {
  border-color: red;
}
.other .el {
  border-color: green;
  background-color: yellow;
}
.other.sub .el {
  border-color: blue;
  /* background-color is also active! */
}

About

adds a css class to the body element for easy styling according to current route

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published