Created
August 18, 2014 05:43
-
-
Save wikimatze/5bb78d9226bcdc6505ef 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
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.0.rc.1) | |
// ---- | |
// Create a global map of users | |
$users: (); | |
// Add a new user to the global map | |
@mixin user($name, $availability, $infos) { | |
$users: append($users, ( | |
'name': $name, | |
'availability': $availability, | |
'infos': $infos | |
)) !global; | |
} | |
// Display all users | |
@mixin display-users { | |
@each $user in $users { | |
#{'.' + map-get($user, 'name')} { | |
twitter: #{'@' + map-get($user, 'name')}; | |
infos: map-get($user, 'infos'); | |
.availability { | |
@each $key, $value in map-get($user, 'availability') { | |
#{$key}: unquote($value); | |
} | |
} | |
} | |
} | |
} | |
// Display informations | |
@mixin display-informations { | |
.beer.scss { | |
location: "Bierhof Rüdersdorf"; | |
infos: url("http://www.bierhof.info"); | |
} | |
} | |
// Add a new user | |
@include user( | |
"HugoGiraudel", | |
( "Monday": "18:00+", "Thursday": "18:00+" ), | |
"Can't guide himself in Berlin. Is mostly lost anywhere." | |
); | |
// Add a new user | |
@include user( | |
"Hagenburger", | |
( "Monday": "18:00+", "Thursday": "18:00+" ), | |
"Je ne parle pas français." | |
); | |
// Add a new user | |
@include user( | |
"PascalDuez", | |
( "Monday": "18:00+", "Tuesday": "18:00+", "Wednesday": "18:00+", "Thursday": "18:00+" ), | |
"Ick spreche'n bisschen Deutsch." | |
); | |
// Display meet up informations | |
@include display-informations; | |
// Display all users | |
@include display-users; |
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
@charset "UTF-8"; | |
.beer.scss { | |
location: "Bierhof Rüdersdorf"; | |
infos: url("http://www.bierhof.info"); | |
} | |
.HugoGiraudel { | |
twitter: @HugoGiraudel; | |
infos: "Can't guide himself in Berlin. Is mostly lost anywhere."; | |
} | |
.HugoGiraudel .availability { | |
Monday: 18:00+; | |
Thursday: 18:00+; | |
} | |
.Hagenburger { | |
twitter: @Hagenburger; | |
infos: "Je ne parle pas français."; | |
} | |
.Hagenburger .availability { | |
Monday: 18:00+; | |
Thursday: 18:00+; | |
} | |
.PascalDuez { | |
twitter: @PascalDuez; | |
infos: "Ick spreche'n bisschen Deutsch."; | |
} | |
.PascalDuez .availability { | |
Monday: 18:00+; | |
Tuesday: 18:00+; | |
Wednesday: 18:00+; | |
Thursday: 18:00+; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment