Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/ lookups - start page [WTEL-4740] #129

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions src/modules/start-page/assets/configuration-section-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions src/modules/start-page/assets/configuration-section-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions src/modules/start-page/assets/contacts-section-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions src/modules/start-page/assets/contacts-section-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/modules/start-page/assets/start-page-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/modules/start-page/assets/start-page-logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions src/modules/start-page/components/start-page-card.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<template>
<article class="start-page-card">
<header class="start-page-card__header">
<wt-icon v-if="card.disabled" icon="lock"/>
{{ card.name }}
</header>
<section class="start-page-card__main-section">
<img :src="card.image" :alt="card.name">
<p class="start-page-card__description">
{{ card.text }}
</p>
</section>
<footer>
<wt-button
:disabled="card.disabled"
wide
color="secondary"
@click="open"
class="start-page-card__button"
>
{{ $t('reusable.open') }}
</wt-button>
</footer>
</article>
</template>

<script>

export default {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в црмці пишемо на композішенс апі -- під то заточено все

name: 'start-page-card',
props: {
card: {
type: Object,
required: true,
},
},
methods: {
open() {
this.$router.push(this.card.route);
},
},
};
</script>

<style lang="scss" scoped>
.start-page-card {
box-sizing: border-box;
width: 264px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а це з Женею аппрували?
зазвичай коли треба вказати конкртений розмір в пікселях, то це помилка в макеті

padding: var(--spacing-xs);
color: var(--text-main-color);
border-radius: var(--border-radius);
background-color: var(--content-wrapper-color);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

display: flex;
flex-direction: column;
gap: var(--spacing-xs);

&__header {
@extend %typo-heading-4;
display: flex;
align-items: center;
justify-content: center;
}
&__description {
@extend %typo-body-1;
height: 78px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

писав вище

//in order to cut text after 3rd line:
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
&__button.wt-button.secondary{
&:hover{
background-color: var(--btn-primary-color);
}
}
Comment on lines +74 to +78
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут шото теж не те, якщо треба лізти в компонент, значить, проблема з макетом
хіба що, можливо, треба робити це джаваскриптом, і міняти атрибут компонента, щоб не лізти в його внутрощі

}

</style>
31 changes: 31 additions & 0 deletions src/modules/start-page/components/start-page-logo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<template>
<div class="start-page-logo">
<img :src="image.src" :alt="image.name">
</div>
</template>

<script>
export default {
name: 'start-page-card',
Comment on lines +8 to +9
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

композішенс апі

props: {
image: {
type: Object,
required: true,
},
},
methods: {
open() {
this.$router.push(this.card.route);
},
},
};
</script>

<style lang="scss" scoped>
.start-page-logo{
min-height: 200px;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

фікс розмір

display: flex;
align-items: center;
justify-content: center;
}
</style>
Loading
Loading