-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
450 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,23 @@ | |
<!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> --> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React</title> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
href="https://fonts.googleapis.com/css2?family=Lexend:[email protected]&family=Zain:wght@200;300;400;700;800;900&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<style> | ||
body { | ||
font-family: sans-serif; | ||
margin: 0; | ||
font-family: Zain; | ||
} | ||
:root { | ||
--atomic-tangerine: #f79256; | ||
--aquamarine: #acfcd9; | ||
--turquoise: #5dd9c1; | ||
--periwinkle: #a6b1e1; | ||
--purple: #dcd6f7; | ||
} | ||
</style> | ||
</head> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
//// Defines the base components used in the shared view. Think copmonents as in | ||
//// functions that simply returns the HTML correctly formatted. | ||
//// Every component accepts two arrays, attributes and children, to follow the | ||
//// same convention as Lustre standard HTML. That way, you could leverage on | ||
//// your knowledge of Lustre, and behaves exactly as expected. | ||
|
||
import redraw | ||
import redraw/html as h | ||
import shared_styles as styles | ||
import sketch/redraw/html | ||
|
||
pub fn body(attrs, children) { | ||
// demonstrate ability to merge fragment at root | ||
redraw.fragment([ | ||
html.div(styles.body_style(), attrs, children), | ||
h.footer([], []), | ||
]) | ||
} | ||
|
||
pub fn topbar(attrs, children) { | ||
html.div(styles.topbar_style(), attrs, children) | ||
} | ||
|
||
pub fn headline(value, attrs, children) { | ||
html.main(styles.headline_style(value), attrs, children) | ||
} | ||
|
||
pub fn headline_subtitle(attrs, children) { | ||
html.div(styles.headline_subtitle_style(), attrs, children) | ||
} | ||
|
||
pub fn headline_emphasize(attrs, children) { | ||
html.div(styles.headline_emphasize_style(), attrs, children) | ||
} | ||
|
||
pub fn counter(attrs, children) { | ||
html.div(styles.counter_style(), attrs, children) | ||
} | ||
|
||
pub fn counter_title(attrs, children) { | ||
h.div(attrs, children) | ||
} | ||
|
||
pub fn counter_subtitle(attrs, children) { | ||
html.div(styles.counter_subtitle_style(), attrs, children) | ||
} | ||
|
||
pub fn button(attrs, children) { | ||
html.button(styles.button_style(), attrs, children) | ||
} | ||
|
||
pub fn value(attrs, children) { | ||
html.div(styles.value_style(), attrs, children) | ||
} | ||
|
||
pub fn value_content(attrs, children) { | ||
html.div(styles.value_content_style(), attrs, children) | ||
} | ||
|
||
pub fn showcase(attrs, children) { | ||
html.div(styles.showcase_style(), attrs, children) | ||
} | ||
|
||
pub fn counter_body(attrs, children) { | ||
html.div(styles.counter_body_style(), attrs, children) | ||
} | ||
|
||
pub fn counter_body_title(attrs, children) { | ||
html.div(styles.counter_body_title_style(), attrs, children) | ||
} | ||
|
||
pub fn counter_counter(attrs, children) { | ||
html.div(styles.counter_counter_style(), attrs, children) | ||
} | ||
|
||
pub fn showcase_body(attrs, children) { | ||
html.div(styles.showcase_body_style(), attrs, children) | ||
} | ||
|
||
pub fn card_title(attrs, children) { | ||
h.div(attrs, children) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: "26.0.2" | ||
gleam-version: "1.4.1" | ||
rebar3-version: "3" | ||
# elixir-version: "1.15.4" | ||
- run: gleam deps download | ||
- run: gleam test | ||
- run: gleam format --check src test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.beam | ||
*.ez | ||
/build | ||
erl_crash.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# shared_styles | ||
|
||
[![Package Version](https://img.shields.io/hexpm/v/shared_styles)](https://hex.pm/packages/shared_styles) | ||
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/shared_styles/) | ||
|
||
```sh | ||
gleam add shared_styles@1 | ||
``` | ||
```gleam | ||
import shared_styles | ||
pub fn main() { | ||
// TODO: An example of the project in use | ||
} | ||
``` | ||
|
||
Further documentation can be found at <https://hexdocs.pm/shared_styles>. | ||
|
||
## Development | ||
|
||
```sh | ||
gleam run # Run the project | ||
gleam test # Run the tests | ||
``` |
Oops, something went wrong.