Skip to content

Commit e31c2e2

Browse files
author
Ryan Miville
committed
works
0 parents  commit e31c2e2

File tree

12 files changed

+4115
-0
lines changed

12 files changed

+4115
-0
lines changed

Diff for: .github/workflows/test.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: erlef/setup-beam@v1
16+
with:
17+
otp-version: "27.1.2"
18+
gleam-version: "1.6.2"
19+
rebar3-version: "3"
20+
# elixir-version: "1.15.4"
21+
- run: gleam deps download
22+
- run: gleam test
23+
- run: gleam format --check src test

Diff for: .gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.beam
2+
*.ez
3+
/build
4+
erl_crash.dump

Diff for: README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# todomvc
2+
3+
[![Package Version](https://img.shields.io/hexpm/v/todomvc)](https://hex.pm/packages/todomvc)
4+
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/todomvc/)
5+
6+
```sh
7+
gleam add todomvc@1
8+
```
9+
```gleam
10+
import todomvc
11+
12+
pub fn main() {
13+
// TODO: An example of the project in use
14+
}
15+
```
16+
17+
Further documentation can be found at <https://hexdocs.pm/todomvc>.
18+
19+
## Development
20+
21+
```sh
22+
gleam run # Run the project
23+
gleam test # Run the tests
24+
```

Diff for: gleam.toml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name = "todomvc"
2+
version = "1.0.0"
3+
4+
target = "javascript"
5+
# Fill out these fields if you intend to generate HTML documentation or publish
6+
# your project to the Hex package manager.
7+
#
8+
# description = ""
9+
# licences = ["Apache-2.0"]
10+
# repository = { type = "github", user = "", repo = "" }
11+
# links = [{ title = "Website", href = "" }]
12+
#
13+
# For a full reference of all the available options, you can have a look at
14+
# https://gleam.run/writing-gleam/gleam-toml/.
15+
16+
[dependencies]
17+
gleam_stdlib = ">= 0.34.0 and < 2.0.0"
18+
lustre = ">= 4.6.3 and < 5.0.0"
19+
20+
[dev-dependencies]
21+
gleeunit = ">= 1.0.0 and < 2.0.0"
22+
lustre_dev_tools = ">= 1.6.2 and < 2.0.0"

Diff for: index.html

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
7+
<title>TodoMVC: Lustre</title>
8+
9+
<link rel="stylesheet" href="/priv/static/base.css" />
10+
<link rel="stylesheet" href="/priv/static/index.css" />
11+
<script type="module" src="/priv/static/todomvc.mjs"></script>
12+
</head>
13+
14+
<body>
15+
<div id="app"></div>
16+
</body>
17+
</html>

Diff for: manifest.toml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This file was generated by Gleam
2+
# You typically do not need to edit this file
3+
4+
packages = [
5+
{ name = "argv", version = "1.0.2", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "BA1FF0929525DEBA1CE67256E5ADF77A7CDDFE729E3E3F57A5BDCAA031DED09D" },
6+
{ name = "birl", version = "1.7.1", build_tools = ["gleam"], requirements = ["gleam_stdlib", "ranger"], otp_app = "birl", source = "hex", outer_checksum = "5C66647D62BCB11FE327E7A6024907C4A17954EF22865FE0940B54A852446D01" },
7+
{ name = "directories", version = "1.1.0", build_tools = ["gleam"], requirements = ["envoy", "gleam_stdlib", "platform", "simplifile"], otp_app = "directories", source = "hex", outer_checksum = "BDA521A4EB9EE3A7894F0DC863797878E91FF5C7826F7084B2E731E208BDB076" },
8+
{ name = "envoy", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "envoy", source = "hex", outer_checksum = "95FD059345AA982E89A0B6E2A3BF1CF43E17A7048DCD85B5B65D3B9E4E39D359" },
9+
{ name = "exception", version = "2.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "exception", source = "hex", outer_checksum = "F5580D584F16A20B7FCDCABF9E9BE9A2C1F6AC4F9176FA6DD0B63E3B20D450AA" },
10+
{ name = "filepath", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "filepath", source = "hex", outer_checksum = "67A6D15FB39EEB69DD31F8C145BB5A421790581BD6AA14B33D64D5A55DBD6587" },
11+
{ name = "fs", version = "8.6.1", build_tools = ["rebar3"], requirements = [], otp_app = "fs", source = "hex", outer_checksum = "61EA2BDAEDAE4E2024D0D25C63E44DCCF65622D4402DB4A2DF12868D1546503F" },
12+
{ name = "gleam_community_ansi", version = "1.4.1", build_tools = ["gleam"], requirements = ["gleam_community_colour", "gleam_stdlib"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "4CD513FC62523053E62ED7BAC2F36136EC17D6A8942728250A9A00A15E340E4B" },
13+
{ name = "gleam_community_colour", version = "1.4.1", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "386CB9B01B33371538672EEA8A6375A0A0ADEF41F17C86DDCB81C92AD00DA610" },
14+
{ name = "gleam_crypto", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_crypto", source = "hex", outer_checksum = "8AE56026B3E05EBB1F076778478A762E9EB62B31AEEB4285755452F397029D22" },
15+
{ name = "gleam_erlang", version = "0.33.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "A1D26B80F01901B59AABEE3475DD4C18D27D58FA5C897D922FCB9B099749C064" },
16+
{ name = "gleam_http", version = "3.7.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_http", source = "hex", outer_checksum = "8A70D2F70BB7CFEB5DF048A2183FFBA91AF6D4CF5798504841744A16999E33D2" },
17+
{ name = "gleam_httpc", version = "4.0.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_http", "gleam_stdlib"], otp_app = "gleam_httpc", source = "hex", outer_checksum = "76FEEC99473E568EBA34336A37CF3D54629ACE77712950DC9BB097B5FD664664" },
18+
{ name = "gleam_json", version = "2.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_json", source = "hex", outer_checksum = "0A57FB5666E695FD2BEE74C0428A98B0FC11A395D2C7B4CDF5E22C5DD32C74C6" },
19+
{ name = "gleam_otp", version = "0.16.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "FA0EB761339749B4E82D63016C6A18C4E6662DA05BAB6F1346F9AF2E679E301A" },
20+
{ name = "gleam_package_interface", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_json", "gleam_stdlib"], otp_app = "gleam_package_interface", source = "hex", outer_checksum = "80D8B1842ACC6CF50E53FF1B220FF57E2B3A60FAF19DD885EC683CDED64C2C52" },
21+
{ name = "gleam_regexp", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "A3655FDD288571E90EE9C4009B719FEF59FA16AFCDF3952A76A125AF23CF1592" },
22+
{ name = "gleam_stdlib", version = "0.47.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "3B22D46743C46498C8355365243327AC731ECD3959216344FA9CF9AD348620AC" },
23+
{ name = "glearray", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "glearray", source = "hex", outer_checksum = "B99767A9BC63EF9CC8809F66C7276042E5EFEACAA5B25188B552D3691B91AC6D" },
24+
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
25+
{ name = "glint", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_community_colour", "gleam_stdlib", "snag"], otp_app = "glint", source = "hex", outer_checksum = "5F6720081150AED8023131B0F3A35F9B0D6426A96CE02BEC52AD7018DF70566A" },
26+
{ name = "glisten", version = "6.0.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_otp", "gleam_stdlib", "logging", "telemetry"], otp_app = "glisten", source = "hex", outer_checksum = "912132751031473CB38F454120124FFC96AF6B0EA33D92C9C90DB16327A2A972" },
27+
{ name = "gramps", version = "2.0.3", build_tools = ["gleam"], requirements = ["gleam_crypto", "gleam_erlang", "gleam_http", "gleam_stdlib"], otp_app = "gramps", source = "hex", outer_checksum = "3CCAA6E081225180D95C79679D383BBF51C8D1FDC1B84DA1DA444F628C373793" },
28+
{ name = "hpack_erl", version = "0.3.0", build_tools = ["rebar3"], requirements = [], otp_app = "hpack", source = "hex", outer_checksum = "D6137D7079169D8C485C6962DFE261AF5B9EF60FBC557344511C1E65E3D95FB0" },
29+
{ name = "logging", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "logging", source = "hex", outer_checksum = "1098FBF10B54B44C2C7FDF0B01C1253CAFACDACABEFB4B0D027803246753E06D" },
30+
{ name = "lustre", version = "4.6.3", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_json", "gleam_otp", "gleam_stdlib"], otp_app = "lustre", source = "hex", outer_checksum = "BDF833368F6C8F152F948D5B6A79866E9881CB80CB66C0685B3327E7DCBFB12F" },
31+
{ name = "lustre_dev_tools", version = "1.6.2", build_tools = ["gleam"], requirements = ["argv", "filepath", "fs", "gleam_community_ansi", "gleam_crypto", "gleam_erlang", "gleam_http", "gleam_httpc", "gleam_json", "gleam_otp", "gleam_package_interface", "gleam_regexp", "gleam_stdlib", "glint", "glisten", "lustre", "mist", "simplifile", "spinner", "term_size", "tom", "wisp"], otp_app = "lustre_dev_tools", source = "hex", outer_checksum = "A0CBC323AA7E03EC91D785CEB644776082D76BE46F1624FB920BB92BD79853F7" },
32+
{ name = "marceau", version = "1.3.0", build_tools = ["gleam"], requirements = [], otp_app = "marceau", source = "hex", outer_checksum = "2D1C27504BEF45005F5DFB18591F8610FB4BFA91744878210BDC464412EC44E9" },
33+
{ name = "mist", version = "3.0.0", build_tools = ["gleam"], requirements = ["birl", "gleam_erlang", "gleam_http", "gleam_otp", "gleam_stdlib", "glisten", "gramps", "hpack_erl", "logging"], otp_app = "mist", source = "hex", outer_checksum = "CDA1A74E768419235E16886463EC4722EFF4AB3F8D820A76EAD45D7C167D7282" },
34+
{ name = "platform", version = "1.0.0", build_tools = ["gleam"], requirements = [], otp_app = "platform", source = "hex", outer_checksum = "8339420A95AD89AAC0F82F4C3DB8DD401041742D6C3F46132A8739F6AEB75391" },
35+
{ name = "ranger", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "ranger", source = "hex", outer_checksum = "B8F3AFF23A3A5B5D9526B8D18E7C43A7DFD3902B151B97EC65397FE29192B695" },
36+
{ name = "repeatedly", version = "2.1.2", build_tools = ["gleam"], requirements = [], otp_app = "repeatedly", source = "hex", outer_checksum = "93AE1938DDE0DC0F7034F32C1BF0D4E89ACEBA82198A1FE21F604E849DA5F589" },
37+
{ name = "simplifile", version = "2.2.0", build_tools = ["gleam"], requirements = ["filepath", "gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "0DFABEF7DC7A9E2FF4BB27B108034E60C81BEBFCB7AB816B9E7E18ED4503ACD8" },
38+
{ name = "snag", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "snag", source = "hex", outer_checksum = "08E9EB87C413457DB1DD66CD704C6878DACC9C93B418600F63873D0CD224E756" },
39+
{ name = "spinner", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_stdlib", "glearray", "repeatedly"], otp_app = "spinner", source = "hex", outer_checksum = "B824C4CFDA6AC912D14365BF365F2A52C4DA63EF2D768D2A1C46D9BF7AF669E7" },
40+
{ name = "telemetry", version = "1.3.0", build_tools = ["rebar3"], requirements = [], otp_app = "telemetry", source = "hex", outer_checksum = "7015FC8919DBE63764F4B4B87A95B7C0996BD539E0D499BE6EC9D7F3875B79E6" },
41+
{ name = "term_size", version = "1.0.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "term_size", source = "hex", outer_checksum = "D00BD2BC8FB3EBB7E6AE076F3F1FF2AC9D5ED1805F004D0896C784D06C6645F1" },
42+
{ name = "tom", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "tom", source = "hex", outer_checksum = "228E667239504B57AD05EC3C332C930391592F6C974D0EFECF32FFD0F3629A27" },
43+
{ name = "wisp", version = "1.3.0", build_tools = ["gleam"], requirements = ["directories", "exception", "gleam_crypto", "gleam_erlang", "gleam_http", "gleam_json", "gleam_stdlib", "logging", "marceau", "mist", "simplifile"], otp_app = "wisp", source = "hex", outer_checksum = "D12384EE63ADEE833B40A6D26EF8014A6E4BFC10EC2CDC8B57D325DD4B52740E" },
44+
]
45+
46+
[requirements]
47+
gleam_stdlib = { version = ">= 0.34.0 and < 2.0.0" }
48+
gleeunit = { version = ">= 1.0.0 and < 2.0.0" }
49+
lustre = { version = ">= 4.6.3 and < 5.0.0" }
50+
lustre_dev_tools = { version = ">= 1.6.2 and < 2.0.0" }

Diff for: priv/static/base.css

+141
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
hr {
2+
margin: 20px 0;
3+
border: 0;
4+
border-top: 1px dashed #c5c5c5;
5+
border-bottom: 1px dashed #f7f7f7;
6+
}
7+
8+
.learn a {
9+
font-weight: normal;
10+
text-decoration: none;
11+
color: #b83f45;
12+
}
13+
14+
.learn a:hover {
15+
text-decoration: underline;
16+
color: #787e7e;
17+
}
18+
19+
.learn h3,
20+
.learn h4,
21+
.learn h5 {
22+
margin: 10px 0;
23+
font-weight: 500;
24+
line-height: 1.2;
25+
color: #000;
26+
}
27+
28+
.learn h3 {
29+
font-size: 24px;
30+
}
31+
32+
.learn h4 {
33+
font-size: 18px;
34+
}
35+
36+
.learn h5 {
37+
margin-bottom: 0;
38+
font-size: 14px;
39+
}
40+
41+
.learn ul {
42+
padding: 0;
43+
margin: 0 0 30px 25px;
44+
}
45+
46+
.learn li {
47+
line-height: 20px;
48+
}
49+
50+
.learn p {
51+
font-size: 15px;
52+
font-weight: 300;
53+
line-height: 1.3;
54+
margin-top: 0;
55+
margin-bottom: 0;
56+
}
57+
58+
#issue-count {
59+
display: none;
60+
}
61+
62+
.quote {
63+
border: none;
64+
margin: 20px 0 60px 0;
65+
}
66+
67+
.quote p {
68+
font-style: italic;
69+
}
70+
71+
.quote p:before {
72+
content: '“';
73+
font-size: 50px;
74+
opacity: .15;
75+
position: absolute;
76+
top: -20px;
77+
left: 3px;
78+
}
79+
80+
.quote p:after {
81+
content: '”';
82+
font-size: 50px;
83+
opacity: .15;
84+
position: absolute;
85+
bottom: -42px;
86+
right: 3px;
87+
}
88+
89+
.quote footer {
90+
position: absolute;
91+
bottom: -40px;
92+
right: 0;
93+
}
94+
95+
.quote footer img {
96+
border-radius: 3px;
97+
}
98+
99+
.quote footer a {
100+
margin-left: 5px;
101+
vertical-align: middle;
102+
}
103+
104+
.speech-bubble {
105+
position: relative;
106+
padding: 10px;
107+
background: rgba(0, 0, 0, .04);
108+
border-radius: 5px;
109+
}
110+
111+
.speech-bubble:after {
112+
content: '';
113+
position: absolute;
114+
top: 100%;
115+
right: 30px;
116+
border: 13px solid transparent;
117+
border-top-color: rgba(0, 0, 0, .04);
118+
}
119+
120+
.learn-bar > .learn {
121+
position: absolute;
122+
width: 272px;
123+
top: 8px;
124+
left: -300px;
125+
padding: 10px;
126+
border-radius: 5px;
127+
background-color: rgba(255, 255, 255, .6);
128+
transition-property: left;
129+
transition-duration: 500ms;
130+
}
131+
132+
@media (min-width: 899px) {
133+
.learn-bar {
134+
width: auto;
135+
padding-left: 300px;
136+
}
137+
138+
.learn-bar > .learn {
139+
left: 8px;
140+
}
141+
}

0 commit comments

Comments
 (0)