Skip to content

Commit

Permalink
feat: improve style
Browse files Browse the repository at this point in the history
  • Loading branch information
PolThm committed Aug 8, 2023
1 parent 32f1b29 commit 9b5842a
Show file tree
Hide file tree
Showing 16 changed files with 237 additions and 31 deletions.
21 changes: 20 additions & 1 deletion src/assets/style/_libs.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
@import "primevue/resources/primevue.min.css"; //core css
@import "primeicons/primeicons.css"; //icons
@import "primevue/resources/themes/vela-blue/theme.css"; //theme
@import "primevue/resources/themes/vela-orange/theme.css"; //theme

.p-speeddial-action{
background: var(--surface-d);
color: var(--text-color);

&:hover{
background: var(--surface-f);
}
}

.p-dialog .p-dialog-content {
.p-confirm-dialog-message {
margin-left: 0;
margin-right: 0.5rem;
}
&:has(.pi) .p-confirm-dialog-message{
margin-left: 1rem;
}
}
14 changes: 7 additions & 7 deletions src/assets/style/_reset.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
del, dfn, img, ins, kbd, q, s, samp, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
dl, dt, dd,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
Expand All @@ -15,6 +14,7 @@ time, mark, audio, video {
padding: 0;
border: 0;
font: inherit;
font-family: var(--font-family);
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
Expand All @@ -25,9 +25,7 @@ footer, header, hgroup, menu, nav, section {
body {
line-height: 1;
}
ol, ul {
list-style: none;
}

blockquote, q {
quotes: none;
}
Expand All @@ -42,6 +40,7 @@ table {

*, *::before, *::after {
box-sizing: border-box;
word-break: break-word;
}
* {
margin: 0;
Expand All @@ -50,7 +49,8 @@ html, body {
min-height: 100%;
}
body {
min-height: 100vh;
min-height: 100vh; // Fallback to the line below
min-height: 100dvh;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down
Binary file removed src/assets/style/fonts/segoesc.ttf
Binary file not shown.
File renamed without changes.
89 changes: 89 additions & 0 deletions src/assets/style/global/_keyframes.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
@keyframes chouquettes-falling {
from {
top: -64px
}
to {
top: calc(100% - 26px)
}
}

@keyframes chouquette-mode-rolling {
from {
transform: rotate(0deg);
overflow: hidden;
}
99.9% {
overflow: hidden;
}
to {
transform: rotate(360deg);
background-image: url(/src/assets/images/chouquette.png);
background-blend-mode: difference;
background-repeat: space;
}
}

@keyframes chouquette-mode-rolling-reverse {
from {
transform: rotate(360deg);
background-image: url(/src/assets/images/chouquette.png);
background-blend-mode: difference;
background-repeat: space;
overflow: hidden;
}
99.9% {
overflow: hidden;
}
to {
transform: rotate(0deg);
}
}

@keyframes bounce-in {
0% {
transform: scale(0);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1);
}
}

@keyframes bounce-in-delay {
0% {
opacity: 0;
}
33% {
opacity: 0;
transform: scale(0);
}
50% {
opacity: 1;
transform: scale(1.1);
}
90% {
transform: scale(1);
}
}

@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

@keyframes shake-animation {
0% { transform:translate(0,0) }
2.5% { transform:translate(5px,0) }
5% { transform:translate(0,0) }
7.5% { transform:translate(5px,0) }
10% { transform:translate(0,0) }
12.5% { transform:translate(5px,0) }
15% { transform:translate(0,0) }
100% { transform:translate(0,0) }
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "@/assets/style/_breakpoints.scss";
@import "@/assets/style/global/_breakpoints";

// Small devices
@mixin sm {
Expand Down
3 changes: 3 additions & 0 deletions src/assets/style/global/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$ch-box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03), 0 0 2px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.12);

$ch-font-family: 'Dancing Script', cursive;
4 changes: 4 additions & 0 deletions src/assets/style/global/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import "_breakpoints";
@import "_keyframes";
@import "_mixins";
@import "_variables";
83 changes: 63 additions & 20 deletions src/assets/style/main.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
@import "@/assets/style/_reset";
@import "@/assets/style/_libs";
@import "@/assets/style/_breakpoints.scss";
@import "@/assets/style/_mixins";
@import "@/assets/style/global";
@import "@/assets/style/transitions";

* {
font-family: Montserrat, sans-serif !important;
--font-family: 'Montserrat', sans-serif;
}

html {
font-size: 13px;
scroll-behavior: smooth;
}

body {
Expand All @@ -18,18 +19,56 @@ body {
}

#app {
min-height: 100vh; // Fallback to the line below
min-height: 100dvh;
position: relative;
padding-bottom: 4rem;
}

.main-layout {
padding: 5vh 5vw;
margin: 0 auto;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
}

.chouquette-mode {
$bg-overlay-opacity: 0.3;

animation: chouquette-mode-rolling .8s both;

background-size: 8.375rem auto;

&::before {
content: '';
position: absolute;
inset: 0;
background: var(--surface-b);
opacity: $bg-overlay-opacity;
box-shadow: var(--surface-b) 0 0 0 100rem;
}

& .p-menubar,
& footer {
background: rgba(31, 45, 64, $bg-overlay-opacity);
}
}

.remove-chouquette-mode {
animation: chouquette-mode-rolling-reverse .8s both;
}

.pi {
font-family: PrimeIcons !important;
}

h1 {
font-family: $ch-font-family;
font-size: 2.75rem;
font-weight: 500;
font-weight: 700;
text-align: center;
}

Expand Down Expand Up @@ -65,36 +104,40 @@ p {

a {
color: var(--primary-color) !important;

&:hover,
&:focus{
text-decoration: underline !important;
}
cursor: pointer;
}

.p-button:focus {
.p-button:focus-visible {
transform: scale(1.05);
}

.p-button-label {
font-weight: 500;
}

.skeleton-list {
display: flex;
flex-direction: column;
gap: 5vh;
}

$main-layout-extra-space: 1.3rem;

@include sm {
html {
font-size: 14px;
}

#app {
width: $screen-sm-min;
.main-layout {
width: calc($screen-sm-min - $main-layout-extra-space);
}

h1 {
font-size: 3rem;
font-size: 4rem;
}

h2 {
font-size: 2rem;
font-size: 2rem;
}
}

Expand All @@ -103,8 +146,8 @@ a {
font-size: 15px;
}

#app {
width: $screen-md-min;
.main-layout {
width: calc($screen-md-min - $main-layout-extra-space);
}
}

Expand All @@ -113,13 +156,13 @@ a {
font-size: 16px;
}

#app {
width: $screen-lg-min;
.main-layout {
width: calc($screen-lg-min - $main-layout-extra-space);
}
}

@include xl {
#app {
width: $screen-xl-min;
.main-layout {
width: calc($screen-xl-min - $main-layout-extra-space);
}
}
6 changes: 6 additions & 0 deletions src/assets/style/transitions/_bounce-small.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.bounce-small-enter-active {
animation: bounce-in .3s;
}
.bounce-small-leave-active {
animation: bounce-in .3s reverse;
}
6 changes: 6 additions & 0 deletions src/assets/style/transitions/_bounce.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.bounce-enter-active {
animation: bounce-in .4s;
}
.bounce-leave-active {
animation: bounce-in .4s reverse;
}
9 changes: 9 additions & 0 deletions src/assets/style/transitions/_fade-fast.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.fade-fast-enter-active,
.fade-fast-leave-active {
transition: opacity 0.1s ease;
}

.fade-fast-enter-from,
.fade-fast-leave-to {
opacity: 0;
}
9 changes: 9 additions & 0 deletions src/assets/style/transitions/_fade.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
opacity: 0;
}
13 changes: 13 additions & 0 deletions src/assets/style/transitions/_slide-fade.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.slide-fade-enter-active {
transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
transform: translateX(20px);
opacity: 0;
}
Loading

0 comments on commit 9b5842a

Please sign in to comment.