Skip to content

Commit

Permalink
feat: add husky + prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperwyczawski committed Feb 3, 2024
1 parent c4ee61f commit e7cde20
Show file tree
Hide file tree
Showing 47 changed files with 1,150 additions and 915 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: [ kacperwyczawski ]
github: [kacperwyczawski]
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bunx prettier . --write
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
24 changes: 12 additions & 12 deletions AutoCut.Frontend/Layouts/MainLayout.razor.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
.color-provider {
--background: #0d0d0d;
--card-background: #1c1c1e;
--bright-background: #2a2a2c;
--bright-border: #4b4b4c;
--card-border: #252527;
--background: #0d0d0d;
--card-background: #1c1c1e;
--bright-background: #2a2a2c;
--bright-border: #4b4b4c;
--card-border: #252527;

--primary: #a3e635;
--primary-alt: #32cd32;
--error: hsl(5, 78%, 55%);
--error-alt: hsl(5, 78%, 45%);
--primary: #a3e635;
--primary-alt: #32cd32;
--error: hsl(5, 78%, 55%);
--error-alt: hsl(5, 78%, 45%);

--text: white;
--text-gray: #767676;
}
--text: white;
--text-gray: #767676;
}
31 changes: 18 additions & 13 deletions AutoCut.Frontend/Pages/Index/Components/ActionButtons.razor.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
section {
grid-area: action-buttons;
display: flex;
gap: 10px;
grid-area: action-buttons;
display: flex;
gap: 10px;
}

button {
color: var(--text);
height: 100%;
color: var(--text);
height: 100%;
}

button.optimize {
background-image: linear-gradient(to right, var(--primary) 0%, var(--primary-alt) 50%, var(--primary) 100%);
background-size: 200% auto;
transition: background-position 0.2s;
background-image: linear-gradient(
to right,
var(--primary) 0%,
var(--primary-alt) 50%,
var(--primary) 100%
);
background-size: 200% auto;
transition: background-position 0.2s;
}

button.optimize:hover {
background-position: right center;
background-position: right center;
}

button.optimize:active {
transform: scale(0.95);
transform: scale(0.95);
}

button.reset {
background-color: var(--error);
background-color: var(--error);
}

button.reset:active {
transform: scale(0.95);
}
transform: scale(0.95);
}
75 changes: 40 additions & 35 deletions AutoCut.Frontend/Pages/Index/Components/AddPanel.razor.css
Original file line number Diff line number Diff line change
@@ -1,72 +1,77 @@
section {
grid-area: add-panel;
background-color: var(--card-background);
border: 1px solid var(--card-border);
border-radius: 10px;
display: flex;
justify-content: space-between;
padding: 15px;
gap: 5px;
grid-area: add-panel;
background-color: var(--card-background);
border: 1px solid var(--card-border);
border-radius: 10px;
display: flex;
justify-content: space-between;
padding: 15px;
gap: 5px;
}

.edge-buttons {
display: grid;
grid-template: 1fr 1fr / 1fr 1fr;
gap: 15px;
display: grid;
grid-template: 1fr 1fr / 1fr 1fr;
gap: 15px;
}

.edge-buttons button {
background-color: inherit;
color: var(--text);
padding: 0;
aspect-ratio: 1 / 1;
background-color: inherit;
color: var(--text);
padding: 0;
aspect-ratio: 1 / 1;
}

::deep .edge-buttons svg {
height: 1.7rem;
width: 1.7rem;
height: 1.7rem;
width: 1.7rem;
}

.buttons {
display: flex;
align-items: center;
gap: 5px;
display: flex;
align-items: center;
gap: 5px;
}

.buttons button {
display: flex;
align-items: center;
gap: 5px;
color: var(--text);
display: flex;
align-items: center;
gap: 5px;
color: var(--text);
}

button[type="submit"] {
background-image: linear-gradient(to right, var(--primary) 0%, var(--primary-alt) 50%, var(--primary) 100%);
background-size: 200% auto;
transition: background-position 0.2s;
background-image: linear-gradient(
to right,
var(--primary) 0%,
var(--primary-alt) 50%,
var(--primary) 100%
);
background-size: 200% auto;
transition: background-position 0.2s;
}

button[type="submit"]:hover {
background-position: right center;
background-position: right center;
}

button[type="submit"]:active {
transform: scale(0.95);
transform: scale(0.95);
}

button[type="reset"] {
background-color: var(--error);
background-color: var(--error);
}

button[type="reset"]:active {
transform: scale(0.95);
transform: scale(0.95);
}

svg {
height: 1.4rem;
height: 1.4rem;
}

.input-fields {
display: flex;
gap: 5px;
}
display: flex;
gap: 5px;
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
section {
grid-area: current-visualization;
background-color: var(--card-background);
border-radius: 10px;
border: 1px solid var(--card-border);
padding: 15px;
overflow-x: scroll;
overflow-y: hidden;
grid-area: current-visualization;
background-color: var(--card-background);
border-radius: 10px;
border: 1px solid var(--card-border);
padding: 15px;
overflow-x: scroll;
overflow-y: hidden;
}

::deep rect:hover {
cursor: pointer;
fill-opacity: .2;
cursor: pointer;
fill-opacity: 0.2;
}

::deep svg {
height: 100%;
}
height: 100%;
}
46 changes: 23 additions & 23 deletions AutoCut.Frontend/Pages/Index/Components/Input.razor.css
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
label {
display: flex;
flex-direction: column;
color: var(--text-gray);
font-size: 1rem;
gap: 5px;
display: flex;
flex-direction: column;
color: var(--text-gray);
font-size: 1rem;
gap: 5px;
}

.input-wrapper {
display: flex;
background-color: var(--bright-background);
border: 1px solid var(--bright-border);
border-radius: 10px;
color: var(--text);
padding: 10px;
width: 6rem;
gap: 0.2rem;
align-items: center;
display: flex;
background-color: var(--bright-background);
border: 1px solid var(--bright-border);
border-radius: 10px;
color: var(--text);
padding: 10px;
width: 6rem;
gap: 0.2rem;
align-items: center;
}

.input-wrapper:focus-within {
border-color: var(--primary);
border-color: var(--primary);
}

input {
background: transparent;
border: none;
width: 100%;
color: white;
background: transparent;
border: none;
width: 100%;
color: white;
}

input:focus {
outline: none;
outline: none;
}

.units {
color: var(--text-gray);
flex-shrink: 0;
}
color: var(--text-gray);
flex-shrink: 0;
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
svg {
background-color: var(--bright-background);
border: 1px solid var(--bright-border);
background-color: var(--bright-background);
border: 1px solid var(--bright-border);
}

rect {
fill: var(--primary);
fill-opacity: .1;
stroke: var(--primary);
stroke-width: 4px;
}
fill: var(--primary);
fill-opacity: 0.1;
stroke: var(--primary);
stroke-width: 4px;
}
48 changes: 24 additions & 24 deletions AutoCut.Frontend/Pages/Index/Components/Tables.razor.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
section {
grid-area: tables;
background-color: var(--card-background);
border-radius: 10px;
border: 1px solid var(--card-border);
padding: 15px;
grid-area: tables;
background-color: var(--card-background);
border-radius: 10px;
border: 1px solid var(--card-border);
padding: 15px;

/* TODO: scroll only table */
overflow-x: scroll;
/* TODO: scroll only table */
overflow-x: scroll;
}

hr {
height: 1px;
border: none;
background-color: var(--text-gray);
margin: 15px 0;
height: 1px;
border: none;
background-color: var(--text-gray);
margin: 15px 0;
}

.buttons {
display: flex;
gap: 15px;
padding: 0 10px;
display: flex;
gap: 15px;
padding: 0 10px;
}

button {
border: none;
background: none;
text-transform: none;
font-size: 1.5rem;
padding: 0;
color: var(--text-gray);
font-weight: normal;
border: none;
background: none;
text-transform: none;
font-size: 1.5rem;
padding: 0;
color: var(--text-gray);
font-weight: normal;
}

button.active {
color: var(--text);
font-weight: bold;
}
color: var(--text);
font-weight: bold;
}
Loading

0 comments on commit e7cde20

Please sign in to comment.