Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/scala/gsoc/contributors/all.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ val allContributors = NonEmptyList.of(
ap44444,
saifk16,
`alokkumardalei-wq`,
etvinh,
`nvshinde`,
lucasdu2,
boss6825,
Expand Down
75 changes: 75 additions & 0 deletions src/main/scala/gsoc/contributors/etvinh.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package gsoc
package contributors

import cats.effect.*
import cats.effect.syntax.all.*
import fs2.concurrent.*
import fs2.dom.HtmlElement
import calico.html.io.{*, given}
import calico.syntax.*
import scala.concurrent.duration.*

val etvinh: Contributor = Contributor("etvinh"):
SignallingRef[IO].of(0).toResource.flatMap { frame =>
val smallHeart = Vector(
" ### ### ",
" ##### ##### ",
" ########### ",
" ######### ",
" ####### ",
" ##### ",
" ### ",
" # "
)

val bigHeart = Vector(
" #### #### ",
"###### ######",
"#############",
" ########### ",
" ######### ",
" ####### ",
" ##### ",
" ### ",
" # "
)

// lub, deflate, dub, deflate, pause
val frames = Vector(bigHeart, smallHeart, bigHeart, smallHeart, smallHeart)
val delays = Vector(120, 120, 120, 120, 800)

val ticker = frame
.get
.flatMap { f => IO.sleep(delays(f).millis) >> frame.update(f => (f + 1) % frames.size) }
.foreverM
.background

ticker.flatMap { _ =>
div(
styleAttr := """
font-family: arial;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
padding: 20px;
""",
frame.map(f => frames(f)).changes.map { lines =>
pre(
styleAttr := """
font-size: 20px;
line-height: 1.3;
margin: 0;
color: rgb(219, 12, 84);
transition: font-size 0.1s;
""",
lines.mkString("\n")
)
},
p(
"Hello, I'm @etvinh on GitHub. I agree to follow the Typelevel CoC and GSoC AI policy."
),
p("Excited to start building <3")
)
}
}