Skip to content

Commit

Permalink
feat: add logo (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaringe authored Feb 15, 2024
1 parent eeb8e56 commit cf9cdd6
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: erlef/setup-beam@v1
with:
otp-version: "26.0.2"
gleam-version: "0.34.0-rc2"
gleam-version: "1.0.0-rc2"
rebar3-version: "3"
- run: gleam format --check src test
- run: gleam test
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/gleam-lang/gleam:v0.34.0-rc2-erlang-alpine
FROM ghcr.io/gleam-lang/gleam:v1.0.0-rc2-erlang-alpine

# Add LiteFS binary, to replicate the SQLite database.
COPY --from=flyio/litefs:0.5 /usr/local/bin/litefs /usr/local/bin/litefs
Expand Down
4 changes: 2 additions & 2 deletions gleam.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ gleam_http = "~> 3.1"
gleam_otp = "~> 0.5"
gleam_hexpm = "~> 1.0"
sqlight = "~> 0.8"
simplifile = "~> 0.1"
wisp = "~> 0.5"
simplifile = "~> 1.4"
wisp = "~> 0.11.0"
birl = "~> 1.0"
lustre = "~> 3.0"
argv = "~> 1.0"
Expand Down
32 changes: 16 additions & 16 deletions manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,43 @@

packages = [
{ name = "argv", version = "1.0.1", build_tools = ["gleam"], requirements = [], otp_app = "argv", source = "hex", outer_checksum = "A6E9009E50BBE863EB37D963E4315398D41A3D87D0075480FC244125808F964A" },
{ name = "birl", version = "1.3.2", build_tools = ["gleam"], requirements = ["ranger", "gleam_stdlib"], otp_app = "birl", source = "hex", outer_checksum = "82C09FD40A7273E530E545D997265699C7F748360FC860BD07CD352E0BD049D4" },
{ name = "birl", version = "1.5.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "ranger"], otp_app = "birl", source = "hex", outer_checksum = "23BFE5AB0D7D9E4ECC5BB89B7ABDDF8E976D98C65D2E173D116E6AAFBF24E633" },
{ name = "certifi", version = "2.12.0", build_tools = ["rebar3"], requirements = [], otp_app = "certifi", source = "hex", outer_checksum = "EE68D85DF22E554040CDB4BE100F33873AC6051387BAF6A8F6CE82272340FF1C" },
{ name = "esqlite", version = "0.8.6", build_tools = ["rebar3"], requirements = [], otp_app = "esqlite", source = "hex", outer_checksum = "607E45F4DA42601D8F530979417F57A4CD629AB49085891849302057E68EA188" },
{ name = "exception", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "exception", source = "hex", outer_checksum = "5122A559032E971E060F0EB68FDCE5961506917D64612B4F7DD958B699BE4425" },
{ name = "exception", version = "1.1.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "exception", source = "hex", outer_checksum = "984401CFC95BCA87C391E36194D2B9E5B946467D44893FADB1CA4ACD4B7A29CE" },
{ name = "gleam_community_ansi", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_community_colour", "gleam_stdlib"], otp_app = "gleam_community_ansi", source = "hex", outer_checksum = "FE79E08BF97009729259B6357EC058315B6FBB916FAD1C2FF9355115FEB0D3A4" },
{ name = "gleam_community_colour", version = "1.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_community_colour", source = "hex", outer_checksum = "A49A5E3AE8B637A5ACBA80ECB9B1AFE89FD3D5351FF6410A42B84F666D40D7D5" },
{ name = "gleam_crypto", version = "0.5.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_crypto", source = "hex", outer_checksum = "8DACF0294E82A49ACD755E68EA3C118FD9F71DEF741E049E49E79993A257B698" },
{ name = "gleam_crypto", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_crypto", source = "hex", outer_checksum = "DE1FC4E631CA374AB29CCAEAC043EE171B86114D7DC66DD483F0A93BF0C4C6FF" },
{ name = "gleam_erlang", version = "0.24.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_erlang", source = "hex", outer_checksum = "26BDB52E61889F56A291CB34167315780EE4AA20961917314446542C90D1C1A0" },
{ name = "gleam_hackney", version = "1.2.0", build_tools = ["gleam"], requirements = ["hackney", "gleam_stdlib", "gleam_http"], otp_app = "gleam_hackney", source = "hex", outer_checksum = "066B1A55D37DBD61CC72A1C4EDE43C6015B1797FAF3818C16FE476534C7B6505" },
{ name = "gleam_hexpm", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "birl"], otp_app = "gleam_hexpm", source = "hex", outer_checksum = "A5DF5D32BFDE84003B2C2183700D98E106A969C6C6EDE0363A50BB421AFF50B7" },
{ name = "gleam_hackney", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_http", "gleam_stdlib", "hackney"], otp_app = "gleam_hackney", source = "hex", outer_checksum = "066B1A55D37DBD61CC72A1C4EDE43C6015B1797FAF3818C16FE476534C7B6505" },
{ name = "gleam_hexpm", version = "1.0.0", build_tools = ["gleam"], requirements = ["birl", "gleam_stdlib"], otp_app = "gleam_hexpm", source = "hex", outer_checksum = "A5DF5D32BFDE84003B2C2183700D98E106A969C6C6EDE0363A50BB421AFF50B7" },
{ name = "gleam_http", version = "3.5.3", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_http", source = "hex", outer_checksum = "C2FC3322203B16F897C1818D9810F5DEFCE347F0751F3B44421E1261277A7373" },
{ name = "gleam_json", version = "0.7.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "thoas"], otp_app = "gleam_json", source = "hex", outer_checksum = "CB405BD93A8828BCD870463DE29375E7B2D252D9D124C109E5B618AAC00B86FC" },
{ name = "gleam_otp", version = "0.9.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_erlang"], otp_app = "gleam_otp", source = "hex", outer_checksum = "5FADBBEC5ECF3F8B6BE91101D432758503192AE2ADBAD5602158977341489F71" },
{ name = "gleam_otp", version = "0.9.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib"], otp_app = "gleam_otp", source = "hex", outer_checksum = "5FADBBEC5ECF3F8B6BE91101D432758503192AE2ADBAD5602158977341489F71" },
{ name = "gleam_stdlib", version = "0.34.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "1FB8454D2991E9B4C0C804544D8A9AD0F6184725E20D63C3155F0AEB4230B016" },
{ name = "gleeunit", version = "1.0.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "D364C87AFEB26BDB4FB8A5ABDE67D635DC9FA52D6AB68416044C35B096C6882D" },
{ name = "glint", version = "0.14.0", build_tools = ["gleam"], requirements = ["gleam_community_ansi", "gleam_community_colour", "gleam_stdlib", "snag"], otp_app = "glint", source = "hex", outer_checksum = "21AB16D5A50D4EF34DF935915FDBEE06B2DAEDEE3FCC8584C6E635A866566B38" },
{ name = "glisten", version = "0.9.2", build_tools = ["gleam"], requirements = ["gleam_otp", "gleam_stdlib", "gleam_erlang"], otp_app = "glisten", source = "hex", outer_checksum = "C960B6CF25D4AABAB01211146E9B57E11827B9C49E4175217E0FB7EF5BCB0FF7" },
{ name = "hackney", version = "1.20.1", build_tools = ["rebar3"], requirements = ["parse_trans", "certifi", "metrics", "idna", "unicode_util_compat", "mimerl", "ssl_verify_fun"], otp_app = "hackney", source = "hex", outer_checksum = "FE9094E5F1A2A2C0A7D10918FEE36BFEC0EC2A979994CFF8CFE8058CD9AF38E3" },
{ name = "glisten", version = "0.10.2", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_otp", "gleam_stdlib"], otp_app = "glisten", source = "hex", outer_checksum = "461AE0EC3C2BDCC8B581A0CE07D49597A61226B410A3FE7E237EB924D0D18536" },
{ name = "hackney", version = "1.20.1", build_tools = ["rebar3"], requirements = ["certifi", "idna", "metrics", "mimerl", "parse_trans", "ssl_verify_fun", "unicode_util_compat"], otp_app = "hackney", source = "hex", outer_checksum = "FE9094E5F1A2A2C0A7D10918FEE36BFEC0EC2A979994CFF8CFE8058CD9AF38E3" },
{ name = "idna", version = "6.1.1", build_tools = ["rebar3"], requirements = ["unicode_util_compat"], otp_app = "idna", source = "hex", outer_checksum = "92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA" },
{ name = "lustre", version = "3.1.3", build_tools = ["gleam"], requirements = ["glint", "gleam_stdlib", "argv", "gleam_community_ansi"], otp_app = "lustre", source = "hex", outer_checksum = "873B047E6598FA7041E5685C8C9E030AF753A9CF2EF0F6DBB3A4E6AC92461F0D" },
{ name = "lustre", version = "3.1.4", build_tools = ["gleam"], requirements = ["argv", "gleam_community_ansi", "gleam_stdlib", "glint"], otp_app = "lustre", source = "hex", outer_checksum = "E651E39189F55473837FB7386C06BAED7276B37B5058302CAC880F89C25CB4E9" },
{ name = "marceau", version = "1.1.0", build_tools = ["gleam"], requirements = [], otp_app = "marceau", source = "hex", outer_checksum = "1AAD727A30BE0F95562C3403BB9B27C823797AD90037714255EEBF617B1CDA81" },
{ name = "metrics", version = "1.0.1", build_tools = ["rebar3"], requirements = [], otp_app = "metrics", source = "hex", outer_checksum = "69B09ADDDC4F74A40716AE54D140F93BEB0FB8978D8636EADED0C31B6F099F16" },
{ name = "mimerl", version = "1.2.0", build_tools = ["rebar3"], requirements = [], otp_app = "mimerl", source = "hex", outer_checksum = "F278585650AA581986264638EBF698F8BB19DF297F66AD91B18910DFC6E19323" },
{ name = "mist", version = "0.15.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_stdlib", "gleam_http", "glisten", "gleam_otp"], otp_app = "mist", source = "hex", outer_checksum = "49F51DDB64D7B2832F72727CC9721C478D6B524C96EA444C601A19D01E023C03" },
{ name = "mist", version = "0.17.0", build_tools = ["gleam"], requirements = ["gleam_erlang", "gleam_http", "gleam_otp", "gleam_stdlib", "glisten"], otp_app = "mist", source = "hex", outer_checksum = "DA8ACEE52C1E4892A75181B3166A4876D8CBC69D555E4770250BC84C80F75524" },
{ name = "parse_trans", version = "3.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "parse_trans", source = "hex", outer_checksum = "620A406CE75DADA827B82E453C19CF06776BE266F5A67CFF34E1EF2CBB60E49A" },
{ name = "ranger", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "ranger", source = "hex", outer_checksum = "28E615AE7590ED922AF1510DDF606A2ECBBC2A9609AF36D412EDC925F06DFD20" },
{ name = "simplifile", version = "0.4.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "8F3C94B83F691CCFACD784A4D7C1F7E5A0437D93341549B908EE3B32E3477447" },
{ name = "simplifile", version = "1.4.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "simplifile", source = "hex", outer_checksum = "AAFCF154F69B237D269FF2764890F61ABC4A7EF2A592D44D67627B99694539D9" },
{ name = "snag", version = "0.3.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "snag", source = "hex", outer_checksum = "54D32E16E33655346AA3E66CBA7E191DE0A8793D2C05284E3EFB90AD2CE92BCC" },
{ name = "sqlight", version = "0.9.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "esqlite"], otp_app = "sqlight", source = "hex", outer_checksum = "2D9C9BA420A5E7DCE7DB2DAAE4CAB0BE6218BEB48FD1531C583550B3D1316E94" },
{ name = "sqlight", version = "0.9.0", build_tools = ["gleam"], requirements = ["esqlite", "gleam_stdlib"], otp_app = "sqlight", source = "hex", outer_checksum = "2D9C9BA420A5E7DCE7DB2DAAE4CAB0BE6218BEB48FD1531C583550B3D1316E94" },
{ name = "ssl_verify_fun", version = "1.1.7", build_tools = ["mix", "rebar3", "make"], requirements = [], otp_app = "ssl_verify_fun", source = "hex", outer_checksum = "FE4C190E8F37401D30167C8C405EDA19469F34577987C76DDE613E838BBC67F8" },
{ name = "thoas", version = "0.4.1", build_tools = ["rebar3"], requirements = [], otp_app = "thoas", source = "hex", outer_checksum = "4918D50026C073C4AB1388437132C77A6F6F7C8AC43C60C13758CC0ADCE2134E" },
{ name = "unicode_util_compat", version = "0.7.0", build_tools = ["rebar3"], requirements = [], otp_app = "unicode_util_compat", source = "hex", outer_checksum = "25EEE6D67DF61960CF6A794239566599B09E17E668D3700247BC498638152521" },
{ name = "wisp", version = "0.8.0", build_tools = ["gleam"], requirements = ["simplifile", "gleam_http", "gleam_crypto", "exception", "mist", "gleam_erlang", "gleam_stdlib", "marceau", "gleam_json"], otp_app = "wisp", source = "hex", outer_checksum = "3E70062D9D2EF66505ED759EEAE047AE2904450D6035F676C6925449FDB68D4A" },
{ name = "wisp", version = "0.11.0", build_tools = ["gleam"], requirements = ["exception", "gleam_crypto", "gleam_erlang", "gleam_http", "gleam_json", "gleam_stdlib", "marceau", "mist", "simplifile"], otp_app = "wisp", source = "hex", outer_checksum = "F35CB6F8CAA996B84A1BA9C252EEB0ED146BC36B0BF0E04C6479C554231C1EEF" },
]

[requirements]
argv = { version = "~> 1.0"}
argv = { version = "~> 1.0" }
birl = { version = "~> 1.0" }
gleam_erlang = { version = "~> 0.18" }
gleam_hackney = { version = "~> 1.0" }
Expand All @@ -51,6 +51,6 @@ gleam_stdlib = { version = "~> 0.23" }
gleeunit = { version = "~> 1.0" }
lustre = { version = "~> 3.0" }
mist = { version = "~> 0.10" }
simplifile = { version = "~> 0.1" }
simplifile = { version = "~> 1.4" }
sqlight = { version = "~> 0.8" }
wisp = { version = "~> 0.5" }
wisp = { version = "~> 0.11.0" }
54 changes: 47 additions & 7 deletions priv/static/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ body {
background: var(--color-white);
font-family: var(--font-family-normal);
background-color: var(--color-white);
font-size: var(--font-size);
font-size: var(--font-size-normal);
}

a,
Expand All @@ -65,22 +65,27 @@ h1, h2, h3, h4, h5, h6 {
}

.site-header {
width: 100%;
background-color: var(--color-faff-pink);
top: 0;
width: 100%;
}

.site-header a {
color: black;
display: flex;
align-items: center;
white-space: nowrap;
margin-bottom: var(--gap-s);
}

.site-header h1 {
margin: 0;
.site-header a img {
display: inline-block;
height: 1.3em;
margin-right: 0.25em;
}

.site-header nav {
display: flex;
justify-content: space-between;
align-items: center;
display: block;
}

.search-form {
Expand All @@ -90,6 +95,7 @@ h1, h2, h3, h4, h5, h6 {
.search-form input[type=search] {
height: 30px;
border: none;
flex-grow: 1;
padding: 0 var(--gap-s);
border-radius: 3px;
padding-left: var(--gap);
Expand All @@ -106,6 +112,40 @@ h1, h2, h3, h4, h5, h6 {
-webkit-appearance: none;
}

.search-form {
flex-grow: 1;
}

.site-header h1 {
margin: 0;
}

@media (min-width: 600px) {

.search-form {
flex-grow: initial;
}

.search-form input[type=search] {
flex-grow: initial;
}

.site-header a {
margin: 0;
}

.site-header h1 {
display: inline-block;
}

.site-header nav {
align-items: center;
display: flex;
justify-content: space-between;
}
}


.site-footer {
width: 100%;
padding: var(--gap);
Expand Down
3 changes: 2 additions & 1 deletion src/packages/syncing.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ fn sync_packages(state: State) -> Result(Time, Error) {
case list.length(all_packages) == list.length(new_packages) {
// If there were no packages or some packages where not new then we have
// reached the end of the new releases and can stop.
_ if all_packages == [] -> Ok(state.newest)
_ if all_packages == []
-> Ok(state.newest)
False -> Ok(state.newest)

// If all the releases were new then there may be more on the next page.
Expand Down
11 changes: 8 additions & 3 deletions src/packages/web/page.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ pub fn packages_list(
html.header([attribute.class("site-header")], [
html.nav([attribute.class("content")], [
html.a([attribute.href("/")], [
html.img([
attribute.class("logo"),
attribute.src("https://gleam.run/images/lucy-charcoal-2.svg"),
attribute.alt("Lucy the star, Gleam's mascot"),
]),
html.h1([], [element.text("Gleam Packages")]),
]),
search_form(search_term),
Expand Down Expand Up @@ -125,9 +130,9 @@ fn package_list_item(package: PackageSummary) -> Element(Nil) {
let links =
[
package.docs_url
|> option.map(external_link_text(_, "Documentation")),
|> option.map(external_link_text(_, "Documentation")),
repository_url
|> option.map(external_link_text(_, "Repository")),
|> option.map(external_link_text(_, "Repository")),
]
|> list.filter_map(option.to_result(_, Nil))

Expand All @@ -146,7 +151,7 @@ fn package_list_item(package: PackageSummary) -> Element(Nil) {
html.ul(
[],
links
|> list.map(fn(link) { html.li([], [link]) }),
|> list.map(fn(link) { html.li([], [link]) }),
),
])
},
Expand Down

0 comments on commit cf9cdd6

Please sign in to comment.