Skip to content

Commit 412c9a0

Browse files
shailee-mbrylie
authored andcommitted
[#366] making componen embedded by default. Resizing link icon
1 parent 61018ea commit 412c9a0

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"test": "vue-cli-service test:unit --coverage && npm run test:cypress",
1616
"test-component": "vue-cli-service test:unit --coverage && cd dist && live-server --port=8080 --entry-file=./demo.html & npm run test:cypress",
1717
"test:unit": "vue-cli-service test:unit",
18-
"build-component": "rm -rf dist && vue-cli-service build --target wc --name license-chooser src/main.js",
18+
"build-component": "rm -rf dist && VUE_APP_CC_OUTPUT=embedded vue-cli-service build --target wc --name license-chooser src/main.js",
1919
"test:cypress": "node_modules/.bin/cypress open",
2020
"lint": "vue-cli-service lint src/**/*.{vue,js} --fix && npx stylelint ./src/**/*.{vue,css} --fix",
2121
"i18n:report": "vue-cli-service i18n:report -v --src src/**/*.vue --locales src/locales/**.json -o output.json"

src/components/LicenseDetailsCard.vue

+22-17
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
<h3>{{ cardHeading }}</h3>
44
<div class="license-short-name">
55
<span class="license-icons">
6-
<license-icons
7-
v-for="icon in ['logo', ...iconsList]" :icons-arr="[icon]"
6+
<license-icons
7+
v-for="icon in ['logo', ...iconsList]"
88
:key="icon"
9+
:icons-arr="[icon]"
910
:size="50"
1011
:class="['icon']"
1112
/>
@@ -29,11 +30,7 @@
2930
:class="['license-list-item', item]"
3031
>
3132
<span class="readable-string">
32-
<license-icons
33-
:icons-arr="[item]"
34-
:size="30"
35-
:class="['icon']"
36-
/>
33+
<license-icons :icons-arr="[item]" :size="30" :class="['icon']" />
3734
<span>
3835
<b>{{ item === 'zero' ? 'CC0' : item.toUpperCase() }}:</b>
3936
{{ $t(`license-details-card.item-description.${item}`) }}
@@ -46,22 +43,27 @@
4643
</transition-group>
4744
</ul>
4845
</section>
49-
<a
50-
class="license-deed-link"
51-
:href="licenseUrl()"
52-
target="_blank"
53-
rel="noopener noreferrer"
54-
>
55-
{{ $t(textKey) }}
56-
<font-awesome-icon class="icon" icon="fa-solid fa-external-link-alt" />
57-
</a>
46+
<div>
47+
<a
48+
class="license-deed-link"
49+
:href="licenseUrl()"
50+
target="_blank"
51+
rel="noopener noreferrer"
52+
>
53+
{{ $t(textKey) }}
54+
<font-awesome-icon
55+
class="icon icon-size"
56+
icon="fa-solid fa-external-link-alt"
57+
/>
58+
</a>
59+
</div>
5860
</div>
5961
</template>
6062
<script>
6163
import LicenseIcons from './LicenseIcons';
6264
import { LICENSES, licenseSlug } from '../utils/license-utilities';
6365
import { mapGetters } from 'vuex';
64-
import { library } from '@fortawesome/fontawesome-svg-core'
66+
import { library } from '@fortawesome/fontawesome-svg-core';
6567
import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons';
6668
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
6769
library.add(faExternalLinkAlt);
@@ -150,4 +152,7 @@ export default {
150152
padding-left: 3.1875rem;
151153
font-weight: 600;
152154
}
155+
.icon-size {
156+
height: 1em;
157+
}
153158
</style>

0 commit comments

Comments
 (0)