Skip to content

Commit

Permalink
fix(styles): improve styles structure + fix some css
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed Jan 29, 2021
1 parent 9b4bbfd commit 554a7ea
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 35 deletions.
6 changes: 4 additions & 2 deletions src/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<div id="layout">
<div class="platform-layout">
<PlatformHeader />
<router-view></router-view>
<div class="view-container">
<router-view></router-view>
</div>
</div>
</template>

Expand Down
4 changes: 3 additions & 1 deletion src/components/platform-header/PlatformHeader.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
.platform-header {
display: flex;
align-items: center;
padding: $spacing-unit/2 $spacing-unit*2;
height: $platform-header-height;
padding: 0 $spacing-unit*2;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.1);
background-color: $color-white;

&__logo {
cursor: pointer;
height: $platform-header-height - $spacing-unit;
}

&__user-menu {
Expand Down
2 changes: 0 additions & 2 deletions src/components/platform-header/PlatformHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
class="platform-header__logo"
alt="BIMData Platform logo"
src="@/assets/header-logo.svg"
width="110"
height="50"
@click="goToDashboard"
/>
<UserMenu
Expand Down
3 changes: 2 additions & 1 deletion src/components/project-card/ProjectCard.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.project-card {
// TODO
width: $platform-project-card-width;
height: $platform-project-card-height;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.project-creation-card {
// TODO
width: $platform-project-card-width;
height: $platform-project-card-height;
}
5 changes: 4 additions & 1 deletion src/components/recent-spaces-list/RecentSpacesList.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
.recent-spaces-list {

&__title {
padding: $spacing-unit/2 $spacing-unit;
}

&__content {
display: flex;
gap: $spacing-unit*2;
padding: $spacing-unit;
overflow-x: auto;
}
}
4 changes: 2 additions & 2 deletions src/components/space-card/SpaceCard.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.space-card {
width: 215px;
height: 275px;
width: $platform-space-card-width;
height: $platform-space-card-height;
transition-duration: 0.35s;

&:deep() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/space-creation-card/SpaceCreationCard.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.space-creation-card {
width: 215px;
height: 275px;
width: $platform-project-card-width;
height: $platform-space-card-height;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.3);
color: $color-primary;

Expand Down
10 changes: 8 additions & 2 deletions src/styles/layout.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#layout {
.platform-layout {
width: 100%;
min-height: 100vh;
height: 100vh;
background-color: $color-tertiary-lightest;

.view-container {
height: calc(100% - #{$platform-header-height});
padding: $spacing-unit*2;
overflow-y: auto;
}
}
6 changes: 6 additions & 0 deletions src/styles/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Sizing variables
$platform-header-height: 62px;
$platform-space-card-width: 215px;
$platform-space-card-height: 275px;
$platform-project-card-width: 215px;
$platform-project-card-height: 275px;
4 changes: 0 additions & 4 deletions src/views/dashboard/Dashboard.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
.dashboard-view {
height: calc(100% - 62px);
padding: $spacing-unit*2;

&__head {
display: grid;
// grid-template-rows: repeat( auto-fill, 220px );
grid-template-columns: repeat( auto-fit, minmax(300px, 1fr) );
gap: $spacing-unit*2;
}
Expand Down
30 changes: 23 additions & 7 deletions src/views/projects/Projects.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.projects-view {
padding: 0 $spacing-unit*2;

.loader {
position: absolute;
top: calc(50% - 6px);
Expand All @@ -11,15 +9,33 @@
.sub-header {
display: flex;
align-items: center;
padding: $spacing-unit/2 $spacing-unit*2;

> * {
margin: 0 $spacing-unit/2;
&--left {
margin-right: auto;
display: flex;
}

&--center {
margin: 0 auto;
display: flex;

.bimdata-search-bar {
background-color: $color-white;
}
}

&--right {
margin-left: auto;
display: flex;
gap: $spacing-unit;
}
}

.projects-list {
display: flex;
flex-wrap: wrap;
display: grid;
grid-template-columns: repeat(auto-fill, $platform-project-card-width);
justify-content: space-between;
gap: $spacing-unit*3 $spacing-unit*2;
padding: $spacing-unit*2 0;
}
}
11 changes: 9 additions & 2 deletions src/views/projects/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
<template v-else>

<div class="sub-header">
<GoBackButton />
<!-- TODO -->
<div class="sub-header--left">
<GoBackButton />
</div>
<div class="sub-header--center">
<!-- TODO -->
</div>
<div class="sub-header-right">
<!-- TODO -->
</div>
</div>

<transition name="fade" appear>
Expand Down
10 changes: 2 additions & 8 deletions src/views/spaces/Spaces.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.spaces-view {
padding: $spacing-unit*2;

.loader {
position: absolute;
top: calc(50% - 6px);
Expand Down Expand Up @@ -29,17 +27,13 @@
&--right {
margin-left: auto;
display: flex;

.bimdata-btn {
margin-left: $spacing-unit;
}
gap: $spacing-unit;
}

}

.spaces-list {
display: grid;
grid-template-columns: repeat(auto-fit, 215px);
grid-template-columns: repeat(auto-fill, $platform-space-card-width);
justify-content: space-between;
gap: $spacing-unit*3 $spacing-unit*2;
padding: $spacing-unit*2 0;
Expand Down
1 change: 1 addition & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
sass: {
prependData: `
@import '~@bimdata/design-system/dist/scss/BIMDataVariables.scss';
@import '@/styles/variables.scss';
`
}
}
Expand Down

0 comments on commit 554a7ea

Please sign in to comment.