Skip to content

Instantly share code, notes, and snippets.

@Aristona
Created July 27, 2017 20:15
Show Gist options
  • Save Aristona/1b3d63941a04658804f7a64ac5a61ca1 to your computer and use it in GitHub Desktop.
Save Aristona/1b3d63941a04658804f7a64ac5a61ca1 to your computer and use it in GitHub Desktop.
@import 'app';
#app {
$authorized: true;
&.middlewares {
.succeeds {
// Middleware passed!
}
.fails {
@include view("Unauthorized");
}
}
&.router {
&.homepage {
&::before {
AuthenticationMiddleware();
}
@include view("welcome");
}
}
}
@function AuthenticationMiddleware() {
@return $authorized === true;
}
@mixin view($str) {
content: $str;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment