Skip to content

Commit

Permalink
Add new tab conf option for services
Browse files Browse the repository at this point in the history
  • Loading branch information
IRHM committed May 28, 2022
1 parent 3e98cb1 commit ac21159
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ services:
- name: GitHub
url: https://github.com/IRHM/appbord
icon: github
- name: Issues
url: https://github.com/IRHM/appbord/issues
new_tab: true
```

## Docker
Expand Down
2 changes: 1 addition & 1 deletion components/ServicesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function ServicesList({ services }: ServicesListProps) {
{services.map(
(s: Service) =>
s.name && (
<a href={s.url} className="upOnHover" key={s.name}>
<a href={s.url} target={s.new_tab ? "_blank" : "_self"} className="upOnHover" key={s.name}>
<i className={"si si-" + s.icon}></i>
<p>{s.name}</p>
</a>
Expand Down
4 changes: 4 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ services:
- name: GitHub
url: https://github.com/IRHM/appbord
icon: github

- name: Issues
url: https://github.com/IRHM/appbord/issues
new_tab: true
1 change: 1 addition & 0 deletions utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type Service = {
name: string;
url: string;
icon?: string;
new_tab?: boolean;
};

export type Weather = {
Expand Down

0 comments on commit ac21159

Please sign in to comment.