Skip to content

Commit

Permalink
Feature/New design (#56)
Browse files Browse the repository at this point in the history
* updated home-page

* updated .env.example

* updated og image

* added planets of design

* updated Oz positions on home-page

* fix a timing of transitions for fields and noscript

* fix app-tabs overflow-x

* fix ethereum planet of design

* added mobile-adaptation for home-page

* added resizing vh variable and transitions for height

* updated bg of home-page

* added nav links to stats-preview of home-page

* updated app-colors

* updated bg-small img of home-page

* added links to planets and changed planets names

---------

Co-authored-by: Yehor Podporinov <[email protected]>
  • Loading branch information
yehor-podporinov and Yehor Podporinov authored Dec 2, 2023
1 parent a3891b9 commit 662939a
Show file tree
Hide file tree
Showing 33 changed files with 492 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ VITE_ENVIRONMENT=development
VITE_PORT=8095
VITE_APP_NAME='Solarity'
VITE_APP_COMPANY_URL='https://distributedlab.com'
VITE_APP_DOCUMENTATION_URL='https://docs.google.com'
VITE_APP_DOCUMENTATION_URL='https://docs.stage.solarity.dev'
VITE_APP_GITHUB_URL='https://github.com/dl-solarity'
9 changes: 8 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@

<script lang="ts" setup>
import { useViewportSizes } from '@/composables'
import { onMounted } from 'vue'
import { debounce } from 'lodash-es'
import { onBeforeUnmount, onMounted } from 'vue'
import 'virtual:svg-icons-register'
const { assignVhCssVariable } = useViewportSizes()
const assignVhCssVariableDebounced = debounce(assignVhCssVariable, 200)
onMounted(() => {
assignVhCssVariable()
window.addEventListener('resize', assignVhCssVariableDebounced)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', assignVhCssVariableDebounced)
})
</script>
8 changes: 5 additions & 3 deletions assets/styles/_app-colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ $black: #000000;
$black-rgb: hexToRGB($black);

$background-primary-light: #252627;
$background-primary-main: #1B191A;
$background-primary-dark: #151314;
$background-primary-main: #151419;
$background-primary-dark: #0C0D10;

$background-secondary-main: #181819;

/* status colors */
$success-light: #5EDDB7;
Expand Down Expand Up @@ -48,7 +50,7 @@ $text-primary-invert-dark: #0F141E;
/* border colors */
$border-primary-light: #FCFCFC;
$border-primary-main: #595758;
$border-primary-dark: #2E2E2E;
$border-primary-dark: #322F33;

/* backdrop colors */
$backdrop-modal: rgba(#000000, 0.5);
9 changes: 7 additions & 2 deletions assets/styles/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@ main {

h1 {
font-family: var(--app-font-family-secondary);
font-size: toRem(56);
font-size: toRem(64);
font-weight: 400;
line-height: toRem(72);
line-height: toRem(78);
letter-spacing: 0;

@include respond-to(medium) {
font-size: toRem(40);
line-height: toRem(48);
}
}

h2 {
Expand Down
2 changes: 1 addition & 1 deletion assets/styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ $media-breakpoints: (
flex-direction: column;
padding: toRem(40);
border-radius: 0 0 var(--border-radius-main) var(--border-radius-main);
background: var(--background-primary-main);
background: var(--background-secondary-main);

@include respond-to(medium) {
padding: toRem(24) toRem(16) toRem(24) toRem(16);
Expand Down
5 changes: 4 additions & 1 deletion assets/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
--background-primary-main: #{$background-primary-main};
--background-primary-dark: #{$background-primary-dark};

--background-secondary-main: #{$background-secondary-main};

/* status colors */
--success-light: #{$success-light};
--success-main: #{$success-main};
Expand Down Expand Up @@ -69,7 +71,7 @@
--app-padding-right: #{toRem(32)};
--app-padding-left: #{toRem(32)};
--app-padding-top: #{toRem(48)};
--app-padding-bottom: #{toRem(48)};
--app-padding-bottom: #{toRem(72)};
--app-height-header: #{toRem(80)};

@include respond-to(medium) {
Expand Down Expand Up @@ -129,6 +131,7 @@

/* transition */
--transition-duration-fast: 0.2s;
--transition-duration-medium: 0.5s;
--transition-timing-default: cubic-bezier(0.08, 0.52, 0.52, 1);

/* paddings */
Expand Down
13 changes: 13 additions & 0 deletions components/AppButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ const buttonType = computed<ButtonType>(
--app-button-none-text-hover: var(--primary-main);
--app-button-none-text-focused: var(--primary-light);
--app-button-none-text-active: var(--primary-light);
&.app-button--text {
--app-button-text: var(--primary-main);
--app-button-text-hover: var(--primary-light);
--app-button-text-focused: var(--primary-dark);
--app-button-text-active: var(--primary-dark);
}
}
&--secondary {
Expand Down Expand Up @@ -391,6 +398,12 @@ const buttonType = computed<ButtonType>(
display: inline;
padding: 0;
&:not([disabled]):hover,
&:not([disabled]):focus,
&:not([disabled]):active {
text-decoration: underline;
}
}
.app-button__icon-left,
Expand Down
5 changes: 5 additions & 0 deletions components/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,15 @@
</template>

<style lang="scss" scoped>
$z-index: 100;
.app-footer {
position: relative;
z-index: $z-index;
display: flex;
gap: toRem(24);
padding: toRem(24) toRem(80);
background: var(--background-primary-main);
box-shadow: 0 toRem(-1) var(--background-primary-light);
@include respond-to(medium) {
Expand Down
2 changes: 2 additions & 0 deletions components/AppModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ $z-index: 1300;
background: var(--backdrop-modal);
overflow-y: auto;
padding: var(--app-padding);
transition: height var(--transition-duration-medium)
var(--transition-timing-default);
&-enter-active,
&-leave-active {
Expand Down
10 changes: 9 additions & 1 deletion components/AppNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ $gap-burger-btn-line: toRem(8);
.app-navbar .app-navbar__nav-link {
font-family: var(--app-font-family-secondary);
font-weight: 400;
&:not([disabled]):hover,
&:not([disabled]):focus,
&:not([disabled]):active {
text-decoration: none;
}
}
.app-navbar__burger-btn {
Expand All @@ -111,13 +117,15 @@ $gap-burger-btn-line: toRem(8);
&,
&:before,
&:after {
$timing: var(--transition-timing-default);
display: block;
position: absolute;
width: 100%;
height: $height-burger-btn-line;
background-color: var(--primary-light);
border-radius: var(--border-primary-main);
transition: var(--transition-duration-fast);
transition: var(--transition-duration-fast) $timing;
}
.app-navbar__burger-btn--active & {
Expand Down
2 changes: 1 addition & 1 deletion components/AppTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const updateTab = (tab: Tab) => {
<style lang="scss" scoped>
.app-tabs {
display: flex;
overflow-x: scroll;
overflow-x: auto;
overflow-y: hidden;
border-radius: var(--border-radius-main) var(--border-radius-main) 0 0;
background: var(--background-primary-light);
Expand Down
2 changes: 1 addition & 1 deletion components/AuditsCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defineProps<{

<style lang="scss" scoped>
.audits-card {
background: var(--background-primary-light);
background: var(--background-primary-dark);
padding: toRem(24);
display: flex;
flex-direction: column;
Expand Down
6 changes: 5 additions & 1 deletion components/ProjectsInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ const cards: ProjectInfoCard[] = [
</script>

<style lang="scss" scoped>
$z-index: 2;
.projects-info {
position: relative;
z-index: $z-index;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: toRem(24);
padding: var(--app-padding-top) toRem(96) var(--app-padding-bottom);
padding: 0 toRem(96) var(--app-padding-bottom);
@include respond-to(medium) {
grid-template-columns: 1fr;
Expand Down
2 changes: 1 addition & 1 deletion components/ProjectsInfoCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ defineProps<{
.projects-info-card {
padding: toRem(32);
border-radius: var(--border-radius-main);
background: var(--background-primary-light);
background: var(--background-primary-dark);
}
.projects-info-card__message {
Expand Down
116 changes: 101 additions & 15 deletions components/StatsPreview.vue
Original file line number Diff line number Diff line change
@@ -1,48 +1,134 @@
<template>
<div class="stats-preview">
<div class="stats-preview__header">
<h1 class="stats-preview__header-main-title">
{{ $t('stats-preview.main-title') }}
</h1>
<div class="stats-preview__header-main-title-wrp">
<h1 class="stats-preview__header-main-title">
{{ $t('stats-preview.main-title-part-1') }}
</h1>
<h1 class="stats-preview__header-main-title">
{{
!isSmallBreakpoint
? $t('stats-preview.main-title-part-2')
: $t('stats-preview.main-title-part-2--short')
}}
</h1>
</div>
<p class="stats-preview__header-secondary-title">
{{ $t('stats-preview.secondary-title') }}
</p>
<div class="stats-preview__btn-wrp">
<app-button
class="stats-preview__btn"
:text="$t('stats-preview.tools-link-text')"
:route="ROUTE_PATH.abiEncoder"
/>
<app-button
class="stats-preview__btn"
modification="text"
:text="$t('stats-preview.docs-link-text')"
:href="config.DOCUMENTATION_URL"
/>
</div>
</div>
</div>
</template>

<script lang="ts" setup>
import { AppButton } from '#components'
import { useViewportSizes } from '@/composables'
import { config } from '@/config'
import { ROUTE_PATH } from '@/constants'
const { isSmallBreakpoint } = useViewportSizes()
</script>

<style lang="scss" scoped>
$z-index: 2;
.stats-preview {
aspect-ratio: 1512 / 1126;
display: flex;
flex-direction: column;
justify-content: center;
gap: toRem(60);
background-image: url('/branding/bg.png');
background-size: 100% 100%;
width: 100%;
min-height: vh(100);
transition: min-height var(--transition-duration-fast);
padding: calc(var(--app-height-header) + var(--app-padding-top)) toRem(80)
var(--app-padding-bottom);
padding: var(--app-padding-top) toRem(96) 0;
@include respond-to(medium) {
padding-right: var(--app-padding-right);
padding-left: var(--app-padding-left);
}
@include respond-to(small) {
aspect-ratio: 375 / 658;
}
}
.stats-preview__header {
display: flex;
flex-direction: column;
gap: toRem(24);
gap: toRem(16);
@include respond-to(medium) {
gap: toRem(8);
}
}
.stats-preview__header-main-title-wrp {
max-width: toRem(1024);
@include respond-to(medium) {
max-width: toRem(600);
}
}
.stats-preview__header-main-title {
max-width: toRem(800);
position: relative;
z-index: $z-index;
display: inline;
&:first-child {
color: var(--primary-main);
}
&:last-child {
@include respond-to(small) {
font-size: toRem(38);
max-width: toRem(375);
}
}
@include respond-to(small) {
display: block;
}
}
.stats-preview__header-secondary-title {
max-width: toRem(440);
color: var(--text-primary-main);
position: relative;
z-index: $z-index;
max-width: max-content;
@include respond-to(small) {
font-size: toRem(14);
}
}
.stats-preview__btn-wrp {
display: flex;
gap: toRem(24);
margin-top: toRem(8);
}
.stats-preview__btn {
position: relative;
z-index: $z-index;
display: grid;
min-width: toRem(210);
@include respond-to(medium) {
min-width: toRem(170);
}
@include respond-to(small) {
min-width: toRem(120);
}
}
</style>
6 changes: 4 additions & 2 deletions components/ToolsSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,12 @@ $aside-max-width: toRem(280);
width: 100%;
height: $aside-height;
max-width: $aside-max-width;
background: var(--background-secondary-main);
overflow-y: auto;
padding: 0 var(--app-padding-right) var(--app-padding-bottom)
var(--app-padding-left);
background: var(--background-primary-main);
overflow-y: auto;
transition: height var(--transition-duration-medium)
var(--transition-timing-default);
@include respond-to(xsmall) {
max-width: 100%;
Expand Down
Loading

0 comments on commit 662939a

Please sign in to comment.