Skip to content

Commit

Permalink
Add Prettier Code Formatter (#55)
Browse files Browse the repository at this point in the history
* Add prettier as a dev dependency

* Add correct formatting to existing code

* Update deploy workflow to CD

* Add continuous integration workflow for Prettier checks

---------

Co-authored-by: Nick Spaargaren <[email protected]>
  • Loading branch information
nickspaargaren and nickspaargaren authored Apr 14, 2024
1 parent a5e7a17 commit 1622e55
Show file tree
Hide file tree
Showing 35 changed files with 8,278 additions and 7,148 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI

on: push

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install requirements
run: yarn

- name: Run Prettier
run: yarn prettier . --check
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: CD

on:
workflow_dispatch:
Expand Down
5 changes: 2 additions & 3 deletions THIRDPARTY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Third Party Notices

Homebrew Hub Virens software incorporates third party material from the projects listed below. The original copyright notice and the license under which such third party material is received are set forth below.
Homebrew Hub Virens software incorporates third party material from the projects listed below. The original copyright notice and the license under which such third party material is received are set forth below.

Third Party Code Components:

Expand Down Expand Up @@ -94,7 +94,7 @@ Mozilla Public License Version 2.0
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
Expand Down Expand Up @@ -432,4 +432,3 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
defined by the Mozilla Public License, v. 2.0.
```

4 changes: 2 additions & 2 deletions assets/styles/_overrides.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Suggested location to add your overrides so that migration would be easy by just updating the SASS folder in the future

.p-dataview .p-dataview-content {
// FIXME: !important shouldn't be required here..
background: transparent !important;
// FIXME: !important shouldn't be required here..
background: transparent !important;
}
6 changes: 3 additions & 3 deletions assets/styles/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* General */
$fontSize:14px;
$borderRadius:12px;
$transitionDuration:.2s;
$fontSize: 14px;
$borderRadius: 12px;
$transitionDuration: 0.2s;
27 changes: 12 additions & 15 deletions assets/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@
@import "./sass/_layout";
@import "./_overrides";




@font-face {
font-family: 'Eudoxus Sans';
src: url('/fonts/EudoxusSans-Medium.woff2') format('woff2');
font-weight: 500;
}
font-family: "Eudoxus Sans";
src: url("/fonts/EudoxusSans-Medium.woff2") format("woff2");
font-weight: 500;
}
@font-face {
font-family: 'Eudoxus Sans';
src: url('/fonts/EudoxusSans-Regular.woff2') format('woff2');
font-weight: 400;
}
font-family: "Eudoxus Sans";
src: url("/fonts/EudoxusSans-Regular.woff2") format("woff2");
font-weight: 400;
}
@font-face {
font-family: 'Eudoxus Sans';
src: url('/fonts/EudoxusSans-Light.woff2') format('woff2');
font-weight: 300;
}
font-family: "Eudoxus Sans";
src: url("/fonts/EudoxusSans-Light.woff2") format("woff2");
font-weight: 300;
}
175 changes: 90 additions & 85 deletions assets/styles/sass/_config.scss
Original file line number Diff line number Diff line change
@@ -1,100 +1,105 @@
.layout-config {
position: fixed;
top: 0;
padding: 0;
right: 0;
width: 20rem;
z-index: 999;
height: 100vh;
transform: translateX(100%);
transition: transform $transitionDuration;
backface-visibility: hidden;
box-shadow: 0px 3px 5px rgba(0,0,0,.02), 0px 0px 2px rgba(0,0,0,.05), 0px 1px 4px rgba(0,0,0,.08) !important;
color: var(--text-color);
background-color: var(--surface-overlay);
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;
position: fixed;
top: 0;
padding: 0;
right: 0;
width: 20rem;
z-index: 999;
height: 100vh;
transform: translateX(100%);
transition: transform $transitionDuration;
backface-visibility: hidden;
box-shadow:
0px 3px 5px rgba(0, 0, 0, 0.02),
0px 0px 2px rgba(0, 0, 0, 0.05),
0px 1px 4px rgba(0, 0, 0, 0.08) !important;
color: var(--text-color);
background-color: var(--surface-overlay);
border-top-left-radius: 12px;
border-bottom-left-radius: 12px;

&.layout-config-active {
transform: translateX(0);
}
&.layout-config-active {
transform: translateX(0);
}

.layout-config-button {
display: block;
position: absolute;
width: 52px;
height: 52px;
line-height: 52px;
background-color: var(--primary-color);
color: var(--primary-color-text);
text-align: center;
top: 230px;
left: -52px;
z-index: -1;
overflow: hidden;
cursor: pointer;
border-top-left-radius: $borderRadius;
border-bottom-left-radius: $borderRadius;
transition: background-color $transitionDuration;
.layout-config-button {
display: block;
position: absolute;
width: 52px;
height: 52px;
line-height: 52px;
background-color: var(--primary-color);
color: var(--primary-color-text);
text-align: center;
top: 230px;
left: -52px;
z-index: -1;
overflow: hidden;
cursor: pointer;
border-top-left-radius: $borderRadius;
border-bottom-left-radius: $borderRadius;
transition: background-color $transitionDuration;

i {
font-size: 32px;
line-height: inherit;
cursor: pointer;
transform: rotate(0deg);
transition: color $transitionDuration, transform 1s;
}
}
i {
font-size: 32px;
line-height: inherit;
cursor: pointer;
transform: rotate(0deg);
transition:
color $transitionDuration,
transform 1s;
}
}

.layout-config-close {
position: absolute;
right: 1rem;
top: 1rem;
z-index: 1;
}
.layout-config-close {
position: absolute;
right: 1rem;
top: 1rem;
z-index: 1;
}

.layout-config-content {
position: relative;
overflow: auto;
height: 100vh;
padding: 2rem;
}
.layout-config-content {
position: relative;
overflow: auto;
height: 100vh;
padding: 2rem;
}

.config-scale {
display: flex;
align-items: center;
margin: 1rem 0 2rem 0;
.config-scale {
display: flex;
align-items: center;
margin: 1rem 0 2rem 0;

.p-button {
margin-right: .5rem;
}
.p-button {
margin-right: 0.5rem;
}

i {
margin-right: .5rem;
font-size: .75rem;
color: var(--text-color-secondary);
i {
margin-right: 0.5rem;
font-size: 0.75rem;
color: var(--text-color-secondary);

&.scale-active {
font-size: 1.25rem;
color: var(--primary-color);
}
}
}
&.scale-active {
font-size: 1.25rem;
color: var(--primary-color);
}
}
}

.free-themes {
img {
width: 2rem;
border-radius: 4px;
transition: transform .2s;
.free-themes {
img {
width: 2rem;
border-radius: 4px;
transition: transform 0.2s;

&:hover {
transform: scale(1.1);
}
}
&:hover {
transform: scale(1.1);
}
}

span {
font-size: .75rem;
margin-top: .25rem;
}
span {
font-size: 0.75rem;
margin-top: 0.25rem;
}
}
}
14 changes: 7 additions & 7 deletions assets/styles/sass/_content.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.layout-main-container {
display: flex;
flex-direction: column;
min-height: 100vh;
justify-content: space-between;
padding: 7rem 2rem 2rem 4rem;
transition: margin-left $transitionDuration;
display: flex;
flex-direction: column;
min-height: 100vh;
justify-content: space-between;
padding: 7rem 2rem 2rem 4rem;
transition: margin-left $transitionDuration;
}

.layout-main {
flex: 1 1 auto;
flex: 1 1 auto;
}
12 changes: 6 additions & 6 deletions assets/styles/sass/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.layout-footer {
transition: margin-left $transitionDuration;
display: flex;
align-items: center;
justify-content: center;
padding-top: 1rem;
border-top: 1px solid var(--surface-border);
transition: margin-left $transitionDuration;
display: flex;
align-items: center;
justify-content: center;
padding-top: 1rem;
border-top: 1px solid var(--surface-border);
}
28 changes: 14 additions & 14 deletions assets/styles/sass/_main.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
* {
box-sizing: border-box;
box-sizing: border-box;
}

html {
height: 100%;
font-size: $fontSize;
height: 100%;
font-size: $fontSize;
}

body {
font-family: var(--font-family);
color: var(--text-color);
background-color: var(--surface-ground);
margin: 0;
padding: 0;
min-height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: var(--font-family);
color: var(--text-color);
background-color: var(--surface-ground);
margin: 0;
padding: 0;
min-height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

a {
text-decoration: none;
color: var(--primary-color);
text-decoration: none;
color: var(--primary-color);
}

.layout-theme-light {
background-color: #edf1f5;
background-color: #edf1f5;
}
Loading

0 comments on commit 1622e55

Please sign in to comment.