Created
July 27, 2017 20:15
-
-
Save Aristona/1b3d63941a04658804f7a64ac5a61ca1 to your computer and use it in GitHub Desktop.
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
@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