-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'css-split-out-icons' of github.com:candela97/AugmentedS…
…team into candela97-css-split-out-icons
- Loading branch information
Showing
7 changed files
with
110 additions
and
90 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
<script lang="ts"> | ||
import Settings from "@Options/Data/Settings"; | ||
import external from "@Content/externalLink"; | ||
import ProfileLinkIcon from "@Options/Modules/Icons/ProfileLinkIcon.svelte"; | ||
export let id: string; | ||
export let href: string; | ||
export let iconUrl: string|undefined = undefined; | ||
const iconType: string = Settings.show_profile_link_images; | ||
const mainType = iconUrl ? "none" : iconType; | ||
const iconType: "gray"|"color"|"none" = Settings.show_profile_link_images; | ||
</script> | ||
|
||
|
||
<div class="es_profile_link profile_count_link"> | ||
<a class="es_sites_icons es_{id}_icon es_{mainType}" {href} use:external> | ||
|
||
{#if iconType !== "none" && iconUrl} | ||
<i class="es_sites_custom_icon es_{iconType}" style="background-image: url({iconUrl});"></i> | ||
<div class="profile_count_link"> | ||
<a class="link" {href} use:external> | ||
{#if iconType !== "none"} | ||
<ProfileLinkIcon {id} {iconType} {iconUrl} /> | ||
{/if} | ||
|
||
<span class="count_link_label"><slot></slot></span> | ||
<span class="profile_count_link_total"> </span> <!-- Steam spacing --> | ||
</a> | ||
</div> | ||
|
||
|
||
<style> | ||
.link { | ||
display: inline-flex; | ||
align-items: center; | ||
} | ||
</style> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<script lang="ts"> | ||
export let id: string; | ||
export let iconType: string; | ||
export let iconUrl: string|undefined = undefined; | ||
</script> | ||
|
||
|
||
{#if id === "custom" && iconUrl} | ||
<i class="es_sites_icons es_{iconType}" style="background-image: url({iconUrl});"></i> | ||
{:else} | ||
<i class="es_sites_icons es_{id}_icon es_{iconType}"></i> | ||
{/if} | ||
|
||
|
||
<style> | ||
.es_sites_icons { | ||
display: inline-block; | ||
width: 16px; | ||
height: 16px; | ||
margin: 0 5px 0 0; | ||
background-color: #222222; | ||
background-repeat: no-repeat; | ||
background-size: 16px !important; | ||
background-position: 2px 2px !important; | ||
padding: 2px; | ||
border-radius: 3px; | ||
box-shadow: inset 0 0 1px 1px rgb(0, 0, 0), 0 0 0 1px rgba(193, 193, 193, 0.17); | ||
vertical-align: top; | ||
} | ||
.es_sites_icons.es_gray { | ||
filter: grayscale(100%); | ||
} | ||
.es_sites_icons.es_steamrepcn_icon { | ||
background-image: url("extension://img/ico/srcn.png"); | ||
} | ||
.es_sites_icons.es_steamrep_icon { | ||
background-image: url("extension://img/ico/steamrep.png"); | ||
background-color: rgb(235, 235, 235); | ||
} | ||
.es_sites_icons.es_steamdbcalc_icon { | ||
background-image: url("extension://img/ico/steamdb.png"); | ||
} | ||
.es_sites_icons.es_steamgifts_icon { | ||
background-image: url("extension://img/ico/steamgifts.png"); | ||
} | ||
.es_sites_icons.es_steamtrades_icon { | ||
background-image: url("extension://img/ico/steamtrades.png"); | ||
} | ||
.es_sites_icons.es_bartervg_icon { | ||
background-image: url("extension://img/ico/bartervg.png"); | ||
} | ||
.es_sites_icons.es_astats_icon { | ||
background-image: url("extension://img/ico/achievementstats.png"); | ||
} | ||
.es_sites_icons.es_backpacktf_icon { | ||
background-image: url("extension://img/ico/backpacktf.png"); | ||
} | ||
.es_sites_icons.es_astatsnl_icon { | ||
background-image: url("extension://img/ico/astatsnl.png"); | ||
} | ||
</style> |
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
18 changes: 18 additions & 0 deletions
18
src/js/Options/Modules/Options/Components/ProfileLink.svelte
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts"> | ||
import ProfileLinkIcon from "../../Icons/ProfileLinkIcon.svelte"; | ||
export let id: string; | ||
</script> | ||
|
||
|
||
<span class="link"> | ||
<ProfileLinkIcon {id} iconType="color" /><slot></slot> | ||
</span> | ||
|
||
|
||
<style> | ||
.link { | ||
display: inline-flex; | ||
align-items: center; | ||
} | ||
</style> |