Skip to content

Commit 0a8beb8

Browse files
author
Sami Kolari
committed
ui fixes
1 parent c3798ae commit 0a8beb8

File tree

9 files changed

+77
-24
lines changed

9 files changed

+77
-24
lines changed

src/App.vue

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</template>
88

99
<script>
10+
1011
export default {
1112
created() {
1213
document.documentElement.lang = this.$i18n.locale

src/components/NavMobile.vue

+13-7
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,16 @@
3434
</button>
3535
<div
3636
v-for="{ name, url, description } in $tm('navbar.dropdown')"
37-
:key="name"
38-
class="">
39-
<a
40-
:href="url">
41-
{{ name }}
42-
</a>
37+
:key="name">
38+
<div class="flex middle">
39+
<a
40+
:href="url"
41+
target="_blank"
42+
rel="noopener noreferrer">
43+
{{ name }}
44+
</a>
45+
<new-tab-icon color="theme" class="ml-2xsmall" />
46+
</div>
4347
<p class="type-small color-white mt-none">
4448
{{ description }}
4549
</p>
@@ -79,11 +83,13 @@
7983

8084
<script>
8185
import ChevronIcon from './icons/ChevronIcon.vue'
86+
import NewTabIcon from './icons/NewTabIcon.vue'
8287
8388
export default {
8489
name: 'NavMobile',
8590
components: {
86-
ChevronIcon
91+
ChevronIcon,
92+
NewTabIcon
8793
},
8894
data: () => ({
8995
isOpen: false,

src/components/Navbar.vue

+13-8
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,20 @@
2323
<transition name="fade">
2424
<div
2525
v-if="linkDropdownOpen"
26-
class="dropdown-container bg-black color-white p-small type-right card">
26+
class="dropdown-container bg-black color-white p-small card">
2727
<div
2828
v-for="{ name, url, description } in $tm('navbar.dropdown')"
2929
:key="name">
30-
<a
31-
:href="url">
32-
{{ name }}
33-
</a>
34-
<p class="type-small mt-none">
30+
<div class="flex end">
31+
<a
32+
:href="url"
33+
target="_blank"
34+
rel="noopener noreferrer">
35+
{{ name }}
36+
</a>
37+
<new-tab-icon color="theme" class="ml-2xsmall" />
38+
</div>
39+
<p class="type-small mt-none type-right">
3540
{{ description }}
3641
</p>
3742
</div>
@@ -82,12 +87,12 @@
8287
</template>
8388

8489
<script>
85-
// import GlobeIcon from './icons/GlobeIcon.vue'
90+
import NewTabIcon from './icons/NewTabIcon.vue'
8691
8792
export default {
8893
name: 'Navbar',
8994
components: {
90-
// GlobeIcon
95+
NewTabIcon
9196
},
9297
data: () => ({
9398
navSticky: false,

src/components/ResourceBox.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@
107107
v-for="(tag, i) in item.tags"
108108
:key="tag"
109109
:style="`color: ${getTagColor(tag)}`"
110-
class="type-nowrap type-uppercase type-small">
110+
class="type-nowrap type-uppercase type-small cursor-pointer"
111+
@click="filterInput = tag.toUpperCase()">
111112
{{ `${tag}${i !== item.tags.length - 1 ? ', ' : ''}` }}
112113
</span>
113114
</td>
@@ -322,7 +323,7 @@ tr:nth-child(even) {
322323
.input-suggestions {
323324
position: absolute;
324325
z-index: 2;
325-
max-height: 20rem;
326+
max-height: 13.5rem;
326327
overflow-y: scroll;
327328
}
328329
</style>

src/components/icons/NewTabIcon.vue

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<template>
2+
<svg
3+
xmlns="http://www.w3.org/2000/svg"
4+
height="16px"
5+
viewBox="0 0 24 24"
6+
width="16px"
7+
:class="{
8+
['fill-white']: color === 'white',
9+
['fill-theme']: color === 'theme'
10+
}">
11+
<path
12+
d="M0 0h24v24H0V0z"
13+
fill="none" />
14+
<path
15+
d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z" />
16+
</svg>
17+
</template>
18+
19+
<script>
20+
export default {
21+
name: 'NewTabIcon',
22+
props: {
23+
color: {
24+
type: String,
25+
default: 'white'
26+
}
27+
}
28+
}
29+
</script>
30+
31+
<style scoped>
32+
.fill-white {
33+
fill: var(--color-white);
34+
}
35+
.fill-theme {
36+
fill: var(--color-theme);
37+
}
38+
</style>

src/components/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import RobotCode from './RobotCode.vue'
1414

1515
import GlobeIcon from './icons/GlobeIcon.vue'
1616
import ChevronIcon from './icons/ChevronIcon.vue'
17+
import NewTabIcon from './icons/NewTabIcon.vue'
1718

1819
export {
1920
NewsBanner,
@@ -31,5 +32,6 @@ export {
3132
RobotCode,
3233

3334
GlobeIcon,
34-
ChevronIcon
35+
ChevronIcon,
36+
NewTabIcon
3537
}

src/content/english.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default () => ({
22
langName: 'English',
3-
newsBanner: '🎉 New website has been released!',
3+
newsBanner: '🎉 New website has been released! If you have feedback, feel free to post it in <a href="https://github.com/robotframework/robotframework.github.com">GitHub</a>.',
44
navbar: {
55
items: [
66
{

src/content/resources/stars.js

+1-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/get-repo-stars.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const getRepoName = (url) => {
2525
return `${parts[0]}/${parts[1]}`
2626
}
2727

28+
const functionize = (list) => `/* eslint-disable */ export default () => (${list})`
29+
2830
export const getStars = () => {
2931
const repos = [...libraries(), ...tools()]
3032
.filter((item) => item.href.includes('github.com'))
@@ -38,9 +40,9 @@ export const getStars = () => {
3840
stars: repo.stargazers_count
3941
}))
4042
const a = document.createElement('a')
41-
const file = new Blob([JSON.stringify(list)], { type: 'text/plain' })
43+
const file = new Blob([functionize(JSON.stringify(list))], { type: 'text/plain' })
4244
a.href = URL.createObjectURL(file)
43-
a.download = 'stars.json'
45+
a.download = 'stars.js'
4446
a.click()
4547
})
4648
}

0 commit comments

Comments
 (0)