Skip to content

Commit

Permalink
remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
locks committed Oct 27, 2024
1 parent c456bab commit 94b54e0
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 95 deletions.
1 change: 0 additions & 1 deletion app/components/box-link.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { LinkTo } from '@ember/routing';
import { service } from '@ember/service';
import Icon from './icon';

export default class CardListsComponent extends Component {
@service store;
Expand Down
1 change: 0 additions & 1 deletion app/components/decklist-box-link.gjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Component from '@glimmer/component';
import { computed, set } from '@ember/object';
import { LinkTo } from '@ember/routing';
import { service } from '@ember/service';
import { Hyphenate } from '../helpers/hyphenate';
Expand Down
1 change: 0 additions & 1 deletion app/components/decklist-box.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { tracked } from '@glimmer/tracking';
import { LinkTo } from '@ember/routing';
import { service } from '@ember/service';
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
import { Hyphenate } from '../helpers/hyphenate';
import {
GetIdentityTitle,
GetIdentitySubtitle,
Expand Down
19 changes: 7 additions & 12 deletions app/components/fancy-header.gjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import Component from '@glimmer/component';

export default class FancyHeader extends Component {
<template>
<div class="fancy-header d-flex mt-4 mb-3">
<span class="flex-grow-1"></span>
<h2 class="fancy-title font-size-24">{{yield}}</h2>
<span class="flex-grow-1"></span>
</div>
</template>
}

<template>
<div class='fancy-header d-flex mt-4 mb-3'>
<span class='flex-grow-1'></span>
<h2 class='fancy-title font-size-24'>{{yield}}</h2>
<span class='flex-grow-1'></span>
</div>
</template>
17 changes: 7 additions & 10 deletions app/components/icon.gjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import Component from '@glimmer/component';
import { svgJar } from 'ember-svg-jar/helpers/svg-jar';
import { Hyphenate } from '../helpers/hyphenate';

export default class Icon extends Component {
<template>
{{svgJar
(Hyphenate @icon)
height='1em'
style='max-width: 100%; transform: translateY(-2px)'
}}
</template>
}
<template>
{{svgJar
(Hyphenate @icon)
height='1em'
style='max-width: 100%; transform: translateY(-2px)'
}}
</template>
1 change: 0 additions & 1 deletion app/components/navbar.gjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { LinkTo } from '@ember/routing';
import { on } from '@ember/modifier';
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
import Collapse from 'ember-bootstrap/components/bs-collapse';
import Dropdown from 'ember-bootstrap/components/bs-dropdown';

class Navbar extends Component {
@tracked showDropdown = false;
Expand Down
3 changes: 0 additions & 3 deletions app/components/review.gjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import Component from '@glimmer/component';
import { service } from '@ember/service';
import MarkdownToHtml from 'ember-cli-showdown/components/markdown-to-html';
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
import { FormatDate } from 'netrunnerdb/helpers/format-date';
import CardImage from 'netrunnerdb/components/card/image';
import Comment from 'netrunnerdb/components/review/comment';
import Icon from './icon';

export default class ReviewComponent extends Component {
@service store;
Expand Down
31 changes: 12 additions & 19 deletions app/components/review/comment.gjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
import Component from '@glimmer/component';
import MarkdownToHtml from 'ember-cli-showdown/components/markdown-to-html';
import FaIcon from '@fortawesome/ember-fontawesome/components/fa-icon';
import { FormatDate } from 'netrunnerdb/helpers/format-date';

export default class ReviewCommentComponent extends Component {
<template>
<div class='comment secondary'>
<div class='comment-content'>
<div class='user-content'>
Review sucks.
</div>
</div>
<div class='comment-meta'>
<span class='anarch'>AntiAms</span>
31 Jul 2022
<template>
<div class='comment secondary'>
<div class='comment-content'>
<div class='user-content'>
Review sucks.
</div>
</div>
</template>
}
<div class='comment-meta'>
<span class='anarch'>AntiAms</span>
31 Jul 2022
</div>
</div>
</template>
52 changes: 24 additions & 28 deletions app/components/ruling.gjs
Original file line number Diff line number Diff line change
@@ -1,34 +1,30 @@
import Component from '@glimmer/component';
import Icon from './icon';
import MarkdownToHtml from 'ember-cli-showdown/components/markdown-to-html';
import { FormatDate } from 'netrunnerdb/helpers/format-date';

export default class RulingComponent extends Component {
<template>
<div class='ruling'>
<div class='ruling-header'>
{{#if @ruling.nsgRulesTeamVerified}}
<span class='legality-verified'></span>
{{else}}
<span class='legality-unverified'></span>
{{/if}}
<span class='fst-italic ms-1 font-size-14'>
Updated
{{FormatDate @ruling.updatedAt}}
</span>
</div>
{{#if @ruling.question}}
<div class='ruling-question'>
<MarkdownToHtml @markdown={{@ruling.question}} />
</div>
<div class='ruling-answer mt-2'>
<MarkdownToHtml @markdown={{@ruling.answer}} />
</div>
<template>
<div class='ruling'>
<div class='ruling-header'>
{{#if @ruling.nsgRulesTeamVerified}}
<span class='legality-verified'></span>
{{else}}
<div class='ruling-text'>
<MarkdownToHtml @markdown={{@ruling.textRuling}} />
</div>
<span class='legality-unverified'></span>
{{/if}}
<span class='fst-italic ms-1 font-size-14'>
Updated
{{FormatDate @ruling.updatedAt}}
</span>
</div>
</template>
}
{{#if @ruling.question}}
<div class='ruling-question'>
<MarkdownToHtml @markdown={{@ruling.question}} />
</div>
<div class='ruling-answer mt-2'>
<MarkdownToHtml @markdown={{@ruling.answer}} />
</div>
{{else}}
<div class='ruling-text'>
<MarkdownToHtml @markdown={{@ruling.textRuling}} />
</div>
{{/if}}
</div>
</template>
33 changes: 14 additions & 19 deletions app/components/titlebar.gjs
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
import Component from '@glimmer/component';
import Icon from './icon';

class Titlebar extends Component {
<template>
<div class='titlebar'>
<div class='container'>
<div class='row'>
<div class='col-5'>
<div class='title font-size-16'>{{@title}}</div>
<div class='subtitle font-size-28 fw-600'>
{{@subtitle}}
{{#if @icon}}<Icon @icon={{@icon}} />{{/if}}
</div>
</div>
<div class='col-7 position-relative'>
{{yield}}
<template>
<div class='titlebar'>
<div class='container'>
<div class='row'>
<div class='col-5'>
<div class='title font-size-16'>{{@title}}</div>
<div class='subtitle font-size-28 fw-600'>
{{@subtitle}}
{{#if @icon}}<Icon @icon={{@icon}} />{{/if}}
</div>
</div>
<div class='col-7 position-relative'>
{{yield}}
</div>
</div>
</div>
</template>
}

export default Titlebar;
</div>
</template>

0 comments on commit 94b54e0

Please sign in to comment.