Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snails
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Louis
snails
Commits
7fcb7371
Verified
Commit
7fcb7371
authored
1 year ago
by
Louis
Browse files
Options
Downloads
Patches
Plain Diff
Remove race route
parent
9341be9b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#506
failed with stage
Stage:
in 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/routes/race/+page.svelte
+0
-69
0 additions, 69 deletions
src/routes/race/+page.svelte
with
0 additions
and
69 deletions
src/routes/race/+page.svelte
deleted
100644 → 0
+
0
−
69
View file @
9341be9b
<script>
import
log
from
'
$lib/assets/SNAIL.png
'
// let snails = null;
let
snails
=
[
{
color
:
Math
.
floor
(
Math
.
random
()
*
360
),
title
:
'
foo
'
,
progress
:
0
},
{
color
:
Math
.
floor
(
Math
.
random
()
*
360
),
title
:
'
bar
'
,
progress
:
0
},
{
color
:
Math
.
floor
(
Math
.
random
()
*
360
),
title
:
'
baz
'
,
progress
:
0
},
{
color
:
Math
.
floor
(
Math
.
random
()
*
360
),
title
:
'
flfofo
'
,
progress
:
0
},
]
function
randoSnail
()
{
snails
=
snails
.
map
(
snail
=>
({
...
snail
,
color
:
Math
.
floor
(
Math
.
random
()
*
360
)
}))
}
function
chuggachuggachuggachuggachoochoo
()
{
snails
=
snails
.
map
(
snail
=>
({
...
snail
,
progress
:
Math
.
min
(
100
,
snail
.
progress
+
Math
.
random
()
*
10
)
}))
}
let
interval
=
setInterval
(
chuggachuggachuggachuggachoochoo
,
1000
)
</script>
<h1>
SNAIL
</h1>
<div>
</div>
<div
class=
"snail-list"
>
{
#each
snails
as
snail
}
<div
class=
"snail-track"
>
<img
class=
"snailboi"
alt=
"Snail representing {snail.title}"
style=
"filter: hue-rotate({snail.color}deg); margin-left: {snail.progress}%;"
title=
"
{
snail
.
title
}
"
src=
"
{
log
}
"
/>
</div>
{
/each
}
</div>
<button
on:click=
"
{
randoSnail
}
"
>
Rando Snail
</button>
<style>
.snailboi
{
width
:
250px
;
height
:
auto
;
transition
:
margin
1s
linear
;
}
.snail-list
{
display
:
flex
;
flex-direction
:
column
;
width
:
100%
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.snail-track
{
width
:
100%
;
padding-left
:
10%
;
}
</style>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment