Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
minor stylings & cleanup, use png instead svg for page background
Browse files Browse the repository at this point in the history
  • Loading branch information
mort3za committed Jun 28, 2019
1 parent 9f1f759 commit c2f0af0
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 45 deletions.
10 changes: 2 additions & 8 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@ body,
}
#app {
// border-top: rem(4px) solid $brand-6;
// border-bottom: rem(4px) solid $brand-6;
background-color: $sky;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 900'%3E%3Cpolygon fill='%23cc7847' points='957 450 539 900 1396 900'/%3E%3Cpolygon fill='%23aa3e13' points='957 450 872.9 900 1396 900'/%3E%3Cpolygon fill='%23c58134' points='-60 900 398 662 816 900'/%3E%3Cpolygon fill='%239c5200' points='337 900 398 662 816 900'/%3E%3Cpolygon fill='%23b88b21' points='1203 546 1552 900 876 900'/%3E%3Cpolygon fill='%23876400' points='1203 546 1552 900 1162 900'/%3E%3Cpolygon fill='%23a5960f' points='641 695 886 900 367 900'/%3E%3Cpolygon fill='%236e7200' points='587 900 641 695 886 900'/%3E%3Cpolygon fill='%238ca00a' points='1710 900 1401 632 1096 900'/%3E%3Cpolygon fill='%234f7e00' points='1710 900 1401 632 1365 900'/%3E%3Cpolygon fill='%236baa1d' points='1210 900 971 687 725 900'/%3E%3Cpolygon fill='%2316882a' points='943 900 1210 900 971 687'/%3E%3C/svg%3E");
background: url("./assets/img/bg-mountains.png") bottom center $sky no-repeat;
background-attachment: fixed;
background-size: cover;
background-size: auto 48vh;
}
</style>

<template>
<div id="app">
<!-- <Navigation/> -->
<router-view/>
</div>
</template>
Expand All @@ -29,6 +24,5 @@ body,
import Navigation from "@/components/Navigation.vue";
export default {
name: "app",
// components: { Navigation }
};
</script>
1 change: 1 addition & 0 deletions src/assets/img/bg-diamond.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/img/bg-mountains.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/img/bg-mountains.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 5 additions & 14 deletions src/components/Board.vue
Original file line number Diff line number Diff line change
Expand Up @@ -360,15 +360,12 @@ export default class BoardComponent extends Vue {
}
.board {
background: $light;
// box-shadow: 1px 1px 3px $gray-60;
border-radius: $border-radius-sm;
max-width: 100%;
height: 100%;
// width: rem($board-width) + $grid-gutter-width * 2;
// height: rem($board-width) + $grid-gutter-width * 2;
background-color: white;
background-image: url("data:image/svg+xml,%3Csvg width='180' height='180' viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M81.28 88H68.413l19.298 19.298L81.28 88zm2.107 0h13.226L90 107.838 83.387 88zm15.334 0h12.866l-19.298 19.298L98.72 88zm-32.927-2.207L73.586 78h32.827l.5.5 7.294 7.293L115.414 87l-24.707 24.707-.707.707L64.586 87l1.207-1.207zm2.62.207L74 80.414 79.586 86H68.414zm16 0L90 80.414 95.586 86H84.414zm16 0L106 80.414 111.586 86h-11.172zm-8-6h11.173L98 85.586 92.414 80zM82 85.586L87.586 80H76.414L82 85.586zM17.414 0L.707 16.707 0 17.414V0h17.414zM4.28 0L0 12.838V0h4.28zm10.306 0L2.288 12.298 6.388 0h8.198zM180 17.414L162.586 0H180v17.414zM165.414 0l12.298 12.298L173.612 0h-8.198zM180 12.838L175.72 0H180v12.838zM0 163h16.413l.5.5 7.294 7.293L25.414 172l-8 8H0v-17zm0 10h6.613l-2.334 7H0v-7zm14.586 7l7-7H8.72l-2.333 7h8.2zM0 165.414L5.586 171H0v-5.586zM10.414 171L16 165.414 21.586 171H10.414zm-8-6h11.172L8 170.586 2.414 165zM180 163h-16.413l-7.794 7.793-1.207 1.207 8 8H180v-17zm-14.586 17l-7-7h12.865l2.333 7h-8.2zM180 173h-6.613l2.334 7H180v-7zm-21.586-2l5.586-5.586 5.586 5.586h-11.172zM180 165.414L174.414 171H180v-5.586zm-8 5.172l5.586-5.586h-11.172l5.586 5.586zM152.933 25.653l1.414 1.414-33.94 33.942-1.416-1.416 33.943-33.94zm1.414 127.28l-1.414 1.414-33.942-33.94 1.416-1.416 33.94 33.943zm-127.28 1.414l-1.414-1.414 33.94-33.942 1.416 1.416-33.943 33.94zm-1.414-127.28l1.414-1.414 33.942 33.94-1.416 1.416-33.94-33.943zM0 85c2.21 0 4 1.79 4 4s-1.79 4-4 4v-8zm180 0c-2.21 0-4 1.79-4 4s1.79 4 4 4v-8zM94 0c0 2.21-1.79 4-4 4s-4-1.79-4-4h8zm0 180c0-2.21-1.79-4-4-4s-4 1.79-4 4h8z' fill='%23d6e6ec' fill-opacity='0.2' fill-rule='evenodd'/%3E%3C/svg%3E");
background-image: url("../assets/img/bg-diamond.svg");
}
.board-inner {
position: relative;
Expand All @@ -377,13 +374,7 @@ export default class BoardComponent extends Vue {
.road {
max-width: 100%;
height: 100%;
// width: rem($board-width);
// height: rem($board-width);
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
@include absolute-cover;
}
.aspect-ratio-box {
Expand Down Expand Up @@ -412,7 +403,7 @@ export default class BoardComponent extends Vue {
height: rem(32px);
}
.menu-icon {
transition: all 300ms ease 75ms;
transition: all 300ms ease;
position: absolute;
background-size: rem(32px);
Expand All @@ -423,13 +414,13 @@ export default class BoardComponent extends Vue {
.menu-open {
background: url("../assets/img/menu.svg") no-repeat center;
&.fade-enter-to {
transition-delay: 200ms;
transition-delay: 150ms;
}
}
.menu-close {
background: url("../assets/img/close.svg") no-repeat center;
&.fade-enter-to {
transition-delay: 200ms;
transition-delay: 150ms;
}
}
Expand Down
6 changes: 1 addition & 5 deletions src/components/Marbles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ export default class MarblesComponent extends Vue {

<style lang="scss" scoped>
.marbles {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
@include absolute-cover;
}
</style>
3 changes: 3 additions & 0 deletions src/components/MenuBoard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,7 @@ export default class BoardComponent extends Vue {
border-radius: $border-radius;
@include absolute-cover;
}
.btn {
text-transform: uppercase;
}
</style>
6 changes: 1 addition & 5 deletions src/components/Step.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ export default class StepComponent extends Vue {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
@include absolute-cover;
}
&.side-1 {
&::before {
Expand Down
4 changes: 0 additions & 4 deletions src/styles/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,3 @@
.text-rtl {
direction: rtl;
}

body {

}
31 changes: 22 additions & 9 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<template>
<div class="page-home d-flex flex-column justify-content-center align-items-center p-3">
<h1 class="h1 title d-flex align-items-center"><img class="logo d-block mr-2" src="../assets/img/ludo.svg" alt="ludo"><span>Ludo Game</span></h1>
<div class="main-menu w-100 mt-3">
<router-link class="btn btn-primary w-100 mb-3" to="/play">Play</router-link>
<router-link class="btn btn-secondary w-100 mb-3" to="/about">About</router-link>
<!-- TODO: <router-link class="btn btn-secondary w-100 mb-3" to="/software-licenses">Software Licenses</router-link> -->
<div class="wrapper d-flex justify-content-center align-items-center overflow-auto">
<div class="inner w-100 rounded mx-auto d-flex h-75 justify-content-center align-items-center">
<div class="d-flex flex-column justify-content-center align-items-center p-3 w-100">
<h1 class="h1 title d-flex align-items-center"><img class="logo d-block mr-2" src="../assets/img/ludo.svg" alt="ludo"><span>Ludo Game</span></h1>
<div class="nav d-flex flex-column justify-content-center align-items-center w-100 mt-4">
<router-link class="btn btn-lg w-75 btn-primary mb-3 font-weight-bolder rounded-pill shadow-sm" to="/play">Play</router-link>
<router-link class="btn btn-lg w-75 btn-secondary mb-3 font-weight-normal rounded-pill shadow-sm" to="/about">About</router-link>
<!-- TODO: <router-link class="btn btn-secondary w-100 mb-3" to="/software-licenses">Software Licenses</router-link> -->
</div>
</div>
</div>
</div>
</template>
Expand All @@ -18,6 +22,15 @@ export default {

<style lang="scss" scoped>
$logo-width: rem(48px);
.wrapper {
max-width: rem($board-width);
height: 100vh;
margin: auto;
}
.inner {
background: rgba(white, 0.8);
min-height: rem(300px);
}
.title {
margin-left: rem(-$logo-width);
color: $dark-less;
Expand All @@ -27,9 +40,9 @@ $logo-width: rem(48px);
height: rem($logo-width);
border-radius: $border-radius;
}
.main-menu {
max-width: rem(480px);
margin: auto;
.btn {
text-transform: uppercase;
}
</style>

0 comments on commit c2f0af0

Please sign in to comment.