Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
51a3db08
Commit
51a3db08
authored
May 03, 2021
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish the "What's new" UI
parent
f9b7a318
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
21 deletions
+34
-21
app/assets/javascripts/whats_new/components/feature.vue
app/assets/javascripts/whats_new/components/feature.vue
+33
-21
app/assets/stylesheets/components/whats_new.scss
app/assets/stylesheets/components/whats_new.scss
+1
-0
No files found.
app/assets/javascripts/whats_new/components/feature.vue
View file @
51a3db08
<
script
>
import
{
GlBadge
,
GlIcon
,
GlLink
,
GlSafeHtmlDirective
}
from
'
@gitlab/ui
'
;
import
{
GlBadge
,
GlIcon
,
GlLink
,
GlSafeHtmlDirective
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
export
default
{
components
:
{
GlBadge
,
GlIcon
,
GlLink
,
GlButton
,
},
directives
:
{
SafeHtml
:
GlSafeHtmlDirective
,
...
...
@@ -16,11 +18,32 @@ export default {
required
:
true
,
},
},
computed
:
{
releaseDate
()
{
const
{
published_at
}
=
this
.
feature
;
const
date
=
new
Date
(
published_at
);
return
dateInWords
(
date
);
},
},
};
</
script
>
<
template
>
<div
class=
"gl-pb-7 gl-pt-5 gl-px-5 gl-border-b-1 gl-border-b-solid gl-border-b-gray-100"
>
<div
class=
"gl-py-6 gl-px-5 gl-border-b-1 gl-border-b-solid gl-border-b-gray-100"
>
<gl-link
:href=
"feature.url"
target=
"_blank"
data-track-event=
"click_whats_new_item"
:data-track-label=
"feature.title"
:data-track-property=
"feature.url"
>
<div
class=
"whats-new-item-image gl-bg-size-cover"
:style=
"`background-image: url($
{feature.image_url});`"
>
<span
class=
"gl-sr-only"
>
{{
feature
.
title
}}
</span>
</div>
</gl-link>
<gl-link
:href=
"feature.url"
target=
"_blank"
...
...
@@ -29,39 +52,28 @@ export default {
:data-track-label=
"feature.title"
:data-track-property=
"feature.url"
>
<h5
class=
"gl-font-lg"
data-test-id=
"feature-title"
>
{{
feature
.
title
}}
</h5>
<h5
class=
"gl-font-lg
gl-mb-1
"
data-test-id=
"feature-title"
>
{{
feature
.
title
}}
</h5>
</gl-link>
<div
v-if=
"releaseDate"
class=
"gl-mb-3"
data-testid=
"release-date"
>
{{
releaseDate
}}
</div>
<div
v-if=
"feature.packages"
class=
"gl-mb-3"
>
<gl-badge
v-for=
"packageName in feature.packages"
:key=
"packageName"
size=
"
sm
"
class=
"whats-new-item-badge gl-mr-2
gl-py-1!
"
size=
"
md
"
class=
"whats-new-item-badge gl-mr-2"
>
<gl-icon
name=
"license"
/>
{{
packageName
}}
</gl-badge>
</div>
<gl-link
:href=
"feature.url"
target=
"_blank"
data-track-event=
"click_whats_new_item"
:data-track-label=
"feature.title"
:data-track-property=
"feature.url"
>
<img
:alt=
"feature.title"
:src=
"feature.image_url"
class=
"img-thumbnail gl-px-8 gl-py-3 whats-new-item-image"
/>
</gl-link>
<div
v-safe-html=
"feature.body"
class=
"gl-pt-3"
></div>
<gl-link
<div
v-safe-html=
"feature.body"
class=
"gl-pt-3 gl-line-height-20"
></div>
<gl-button
:href=
"feature.url"
target=
"_blank"
data-track-event=
"click_whats_new_item"
:data-track-label=
"feature.title"
:data-track-property=
"feature.url"
>
{{
__
(
'
Learn more
'
)
}}
</gl-link
>
{{
__
(
'
Learn more
'
)
}}
<gl-icon
name=
"arrow-right"
/>
</gl-button>
</div>
</
template
>
app/assets/stylesheets/components/whats_new.scss
View file @
51a3db08
...
...
@@ -54,6 +54,7 @@
.whats-new-item-image
{
border-color
:
$gray-50
;
height
:
250px
;
}
.whats-new-modal-backdrop
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment