Skip to content

Commit

Permalink
Merge pull request #54 from KacperFKorban/progress-indicator
Browse files Browse the repository at this point in the history
Progress indicator
  • Loading branch information
KacperFKorban authored Jun 11, 2024
2 parents 3a3f519 + 6d67896 commit 0f00173
Show file tree
Hide file tree
Showing 5 changed files with 415 additions and 277 deletions.
5 changes: 5 additions & 0 deletions testcases/src/main/scala/main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ def printsWeirdGADT1(g: WeirdGADT1[Int]): String = g match
case SomeValue1(value) => s"SomeValue($value)"
case SomeOtherValue1(value, value2) => s"SomeOtherValue($value, $value2)"

def longRunningGetInt: Int =
Thread.sleep(5000)
42

@main
def run: Unit =
guinep.web
Expand Down Expand Up @@ -164,6 +168,7 @@ def run: Unit =
runTakesUnit,
printsWeirdGADT,
genericShow[String],
longRunningGetInt,
// isInTreeExt
// addManyParamLists
)
118 changes: 118 additions & 0 deletions web/src/main/resources/default.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
body {
font-family: Arial, sans-serif;
margin: 0;
display: flex;
height: 100vh;
}

.sidebar {
width: 20%;
background-color: #f0f0f0;
padding: 20px;
overflow-y: auto;
}

.sidebar a {
display: block;
padding: 10px;
margin-bottom: 10px;
background-color: #007bff;
color: white;
text-decoration: none;
text-align: center;
border-radius: 5px;
overflow-x: hidden;
text-overflow: ellipsis;
}

.sidebar a:hover {
background-color: #0056b3;
}

.main-content {
margin-left: 20%;
padding: 40px;
display: flex;
justify-content: center;
padding-top: 20px;
}

.form-container {
width: 600px;
}

label {
display: inline-block;
margin-right: 10px;
vertical-align: middle;
}

input:not([type=submit]) {
display: inline-block;
padding: 8px;
margin-bottom: 10px;
box-sizing: border-box;
}

input[type=submit] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}

input[type=submit]:hover {
background-color: #45a049;
}

select {
display: inline-block;
margin-bottom: 10px;
padding: 8px;
box-sizing: border-box;
}

.result {
margin-top: 20px;
font-weight: bold;
}

.add-button {
text-decoration: none;
background-color: #AAAAAA;
color: white;
padding: 5px 10px;
border: none;
border-radius: 4px;
cursor: pointer;
}

.add-button:hover {
background-color: #BBBBBB;
}

.progress-indicator {
display: inline-block;
margin-left: 10px;
vertical-align: middle;
}

.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #3498db;
border-radius: 50%;
width: 20px;
height: 20px;
animation: spin 2s linear infinite;
}

@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}

.hidden {
display: none;
}
Loading

0 comments on commit 0f00173

Please sign in to comment.