Skip to content

Commit

Permalink
Implement linkflair changes as requested in #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Mustek committed May 2, 2015
1 parent f4fa0ee commit a24bcee
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 91 deletions.
88 changes: 11 additions & 77 deletions flair/_link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,84 +43,18 @@
background-position: #{- ($x * 32px)} 50% !important;
}

// Individual Styling
// Flair - Announcements
.linkflair-announcement .title .linkflairlabel {
@include pos(0, 0);
}

.thing.linkflair.linkflair-announcement, .flairselector .linkflair-announcement {
border-right: 10px solid #DC322F;
}

// Flair - Survival
.linkflair-survival .title .linkflairlabel {
@include pos(1, 0);
}

.thing.linkflair.linkflair-survival, .flairselector .linkflair-survival {
border-right: 10px solid #859900;
}

// Flair - Creative
.linkflair-creative .title .linkflairlabel {
@include pos(2, 0);
}

.thing.linkflair.linkflair-creative, .flairselector .linkflair-creative {
border-right: 10px solid #B58900;
}

// Flair - Command Blocks
.linkflair-command .title .linkflairlabel {
@include pos(3, 0);
}

.thing.linkflair.linkflair-command, .flairselector .linkflair-command {
border-right: 10px solid #D33682;
}
// Order by appearance in the spritesheet. Pairs: (name, border-color, ...)
$linkflair: (announcement: #DC322F, survival: #859900, creative: #6C71C4, command: #D33682, redstone: #CB4B16, help: #268BD2, tutorial: #2AA198, lp: #073642, art: #6C71C4, news: #DC322F, maps: #1CB900);
$counter: 0;

// Flair - Redstone
.linkflair-redstone .title .linkflairlabel {
@include pos(4, 0);
}
@each $type, $color in $linkflair {

.thing.linkflair.linkflair-redstone, .flairselector .linkflair-redstone {
border-right: 10px solid #CB4B16;
}

// Flair - Help
.linkflair-help .title .linkflairlabel {
@include pos(5, 0);
}

.thing.linkflair.linkflair-help, .flairselector .linkflair-help {
border-right: 10px solid #268BD2;
}

// Flair - Tutorials
.linkflair-tutorial .title .linkflairlabel {
@include pos(6, 0);
}

.thing.linkflair.linkflair-tutorial, .flairselector .linkflair-tutorial {
border-right: 10px solid #2AA198;
}

// Flair Let's Plays
.linkflair-lp .title .linkflairlabel {
@include pos(7, 0);
}

.thing.linkflair.linkflair-lp, .flairselector .linkflair-lp {
border-right: 10px solid #073642;
}

// Flair - Art
.linkflair-art .title .linkflairlabel {
@include pos(8, 0);
}
.linkflair-#{$type} .title .linkflairlabel {
@include pos($counter, 0);
}

.thing.linkflair.linkflair-art, .flairselector .linkflair-art {
border-right: 10px solid #6C71C4;
.thing.linkflair.linkflair-#{$type}, .flairselector .linkflair-#{$type} {
border-right: 10px solid #{$color};
}
$counter: $counter+1;
}
14 changes: 7 additions & 7 deletions layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -516,16 +516,20 @@ a[href*="flair:"] {
font-size: 1.1em !important;
}

a[href*="flair:Survival"] {
a[href*="flair:News"] {
background-position: -288px 0;
}

a[href*="flair:Builds"] {
background-position: -32px 0;
}

a[href*="flair:Creative"] {
background-position: -64px 0;
}

a[href*="flair:Help"] {
background-position: -160px 0;
a[href*="flair:Maps"] {
background-position: -320px 0;
}

a[href*="flair:Tutorial"] {
Expand All @@ -542,8 +546,4 @@ a[href*="flair:CommandBlock"] {

a[href*="flair:Art"] {
background-position: -256px 0;
}

a[href*="flair:LetsPlay"] {
background-position: -224px 0;
}
20 changes: 14 additions & 6 deletions style-compact.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion style.css

Large diffs are not rendered by default.

0 comments on commit a24bcee

Please sign in to comment.