Skip to content

Commit

Permalink
Crafter searchable with '@', avatar styling, icon in avatar and in ch…
Browse files Browse the repository at this point in the history
…ip styling
  • Loading branch information
dmstern committed Sep 8, 2018
1 parent c1cf1b2 commit 7aeed6b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@
<span class="search--key grey--text text--darken-1">
{{
isCrafter(data.item)
? `crafter:${data.item.name}`
? `@`
: `#`
}}
</span>
<span v-html="data.item.value"></span>
<span v-html="isCrafter(data.item) ? data.item.name : data.item.value"></span>
</v-list-tile-title>
</v-list-tile-content>
<v-spacer></v-spacer>
Expand Down Expand Up @@ -408,6 +408,11 @@ a {
font-size: inherit;
transform: none;
}
.v-chip &,
.v-avatar & {
opacity: .8;
}
}
code,
Expand Down
2 changes: 2 additions & 0 deletions src/assets/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ $grid-breakpoints: (
);

$mdi2faScaleFactor: 20/24;

$shadow-focused: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
5 changes: 5 additions & 0 deletions src/components/PackageDetailItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export default class PackageDetailItem extends Vue {
a:not([href="#"]),
.v-avatar {
margin-right: .5em;
transition: $transition-smooth;
&:hover {
box-shadow: $shadow-focused;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions types/Crafter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default class Crafter extends Searchable {
text.push(
this.name,
`author:${this.name}`,
`@${this.name}`,
`crafter:${this.name}`,
`contributor:${this.name}`,
`collaborator:${this.name}`,
Expand Down

0 comments on commit 7aeed6b

Please sign in to comment.