-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from loupeteam/feature/material
Add a prebuilt material library
- Loading branch information
Showing
12 changed files
with
13,188 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
.dark { | ||
--md-sys-color-primary: rgb(165 200 255); | ||
--md-sys-color-surface-tint: rgb(165 200 255); | ||
--md-sys-color-on-primary: rgb(0 49 94); | ||
--md-sys-color-primary-container: rgb(33 72 118); | ||
--md-sys-color-on-primary-container: rgb(212 227 255); | ||
--md-sys-color-secondary: rgb(188 199 220); | ||
--md-sys-color-on-secondary: rgb(38 49 65); | ||
--md-sys-color-secondary-container: rgb(61 71 88); | ||
--md-sys-color-on-secondary-container: rgb(216 227 248); | ||
--md-sys-color-tertiary: rgb(218 189 226); | ||
--md-sys-color-on-tertiary: rgb(61 41 70); | ||
--md-sys-color-tertiary-container: rgb(85 63 94); | ||
--md-sys-color-on-tertiary-container: rgb(247 216 255); | ||
--md-sys-color-error: rgb(255 180 171); | ||
--md-sys-color-on-error: rgb(105 0 5); | ||
--md-sys-color-error-container: rgb(147 0 10); | ||
--md-sys-color-on-error-container: rgb(255 218 214); | ||
--md-sys-color-background: rgb(17 19 24); | ||
--md-sys-color-on-background: rgb(225 226 233); | ||
--md-sys-color-surface: rgb(17 19 24); | ||
--md-sys-color-on-surface: rgb(225 226 233); | ||
--md-sys-color-surface-variant: rgb(67 71 78); | ||
--md-sys-color-on-surface-variant: rgb(195 198 207); | ||
--md-sys-color-outline: rgb(141 145 153); | ||
--md-sys-color-outline-variant: rgb(67 71 78); | ||
--md-sys-color-shadow: rgb(0 0 0); | ||
--md-sys-color-scrim: rgb(0 0 0); | ||
--md-sys-color-inverse-surface: rgb(225 226 233); | ||
--md-sys-color-inverse-on-surface: rgb(46 48 53); | ||
--md-sys-color-inverse-primary: rgb(60 96 144); | ||
--md-sys-color-primary-fixed: rgb(212 227 255); | ||
--md-sys-color-on-primary-fixed: rgb(0 28 58); | ||
--md-sys-color-primary-fixed-dim: rgb(165 200 255); | ||
--md-sys-color-on-primary-fixed-variant: rgb(33 72 118); | ||
--md-sys-color-secondary-fixed: rgb(216 227 248); | ||
--md-sys-color-on-secondary-fixed: rgb(17 28 43); | ||
--md-sys-color-secondary-fixed-dim: rgb(188 199 220); | ||
--md-sys-color-on-secondary-fixed-variant: rgb(61 71 88); | ||
--md-sys-color-tertiary-fixed: rgb(247 216 255); | ||
--md-sys-color-on-tertiary-fixed: rgb(39 20 48); | ||
--md-sys-color-tertiary-fixed-dim: rgb(218 189 226); | ||
--md-sys-color-on-tertiary-fixed-variant: rgb(85 63 94); | ||
--md-sys-color-surface-dim: rgb(17 19 24); | ||
--md-sys-color-surface-bright: rgb(55 57 62); | ||
--md-sys-color-surface-container-lowest: rgb(12 14 19); | ||
--md-sys-color-surface-container-low: rgb(25 28 32); | ||
--md-sys-color-surface-container: rgb(29 32 36); | ||
--md-sys-color-surface-container-high: rgb(40 42 47); | ||
--md-sys-color-surface-container-highest: rgb(50 53 58); | ||
} |
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,52 @@ | ||
|
||
.light { | ||
--md-sys-color-primary: rgb(60 96 144); | ||
--md-sys-color-surface-tint: rgb(60 96 144); | ||
--md-sys-color-on-primary: rgb(255 255 255); | ||
--md-sys-color-primary-container: rgb(212 227 255); | ||
--md-sys-color-on-primary-container: rgb(0 28 58); | ||
--md-sys-color-secondary: rgb(84 95 113); | ||
--md-sys-color-on-secondary: rgb(255 255 255); | ||
--md-sys-color-secondary-container: rgb(216 227 248); | ||
--md-sys-color-on-secondary-container: rgb(17 28 43); | ||
--md-sys-color-tertiary: rgb(109 86 118); | ||
--md-sys-color-on-tertiary: rgb(255 255 255); | ||
--md-sys-color-tertiary-container: rgb(247 216 255); | ||
--md-sys-color-on-tertiary-container: rgb(39 20 48); | ||
--md-sys-color-error: rgb(186 26 26); | ||
--md-sys-color-on-error: rgb(255 255 255); | ||
--md-sys-color-error-container: rgb(255 218 214); | ||
--md-sys-color-on-error-container: rgb(65 0 2); | ||
--md-sys-color-background: rgb(249 249 255); | ||
--md-sys-color-on-background: rgb(25 28 32); | ||
--md-sys-color-surface: rgb(249 249 255); | ||
--md-sys-color-on-surface: rgb(25 28 32); | ||
--md-sys-color-surface-variant: rgb(224 226 236); | ||
--md-sys-color-on-surface-variant: rgb(67 71 78); | ||
--md-sys-color-outline: rgb(116 119 127); | ||
--md-sys-color-outline-variant: rgb(195 198 207); | ||
--md-sys-color-shadow: rgb(0 0 0); | ||
--md-sys-color-scrim: rgb(0 0 0); | ||
--md-sys-color-inverse-surface: rgb(46 48 53); | ||
--md-sys-color-inverse-on-surface: rgb(240 240 247); | ||
--md-sys-color-inverse-primary: rgb(165 200 255); | ||
--md-sys-color-primary-fixed: rgb(212 227 255); | ||
--md-sys-color-on-primary-fixed: rgb(0 28 58); | ||
--md-sys-color-primary-fixed-dim: rgb(165 200 255); | ||
--md-sys-color-on-primary-fixed-variant: rgb(33 72 118); | ||
--md-sys-color-secondary-fixed: rgb(216 227 248); | ||
--md-sys-color-on-secondary-fixed: rgb(17 28 43); | ||
--md-sys-color-secondary-fixed-dim: rgb(188 199 220); | ||
--md-sys-color-on-secondary-fixed-variant: rgb(61 71 88); | ||
--md-sys-color-tertiary-fixed: rgb(247 216 255); | ||
--md-sys-color-on-tertiary-fixed: rgb(39 20 48); | ||
--md-sys-color-tertiary-fixed-dim: rgb(218 189 226); | ||
--md-sys-color-on-tertiary-fixed-variant: rgb(85 63 94); | ||
--md-sys-color-surface-dim: rgb(217 218 224); | ||
--md-sys-color-surface-bright: rgb(249 249 255); | ||
--md-sys-color-surface-container-lowest: rgb(255 255 255); | ||
--md-sys-color-surface-container-low: rgb(242 243 250); | ||
--md-sys-color-surface-container: rgb(237 237 244); | ||
--md-sys-color-surface-container-high: rgb(231 232 238); | ||
--md-sys-color-surface-container-highest: rgb(225 226 233); | ||
} |
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,3 @@ | ||
body{ | ||
background-color: var(--md-sys-color-background, #303030); | ||
} |
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,39 @@ | ||
# Tmplit-material | ||
|
||
This tmplit is a prebuilt material design library for tmplits. By installing this library you can use material design components in your tmplits project. Tmplits will automatically load the material design css and javascript files for you after installing this library. | ||
|
||
### Usage | ||
|
||
npm install tmplits-material | ||
|
||
Use it in your tmplits project: | ||
|
||
```html | ||
<md-filled-button >I'm a button!</md-filled-button> | ||
``` | ||
|
||
### To use a theme | ||
|
||
```html | ||
<!-- Include the themes you support --> | ||
<link href="app/css/dark.css" rel="stylesheet"> | ||
<link href="app/css/light.css" rel="stylesheet"> | ||
|
||
<!-- Add the class for the active theme to the body tag--> | ||
<body class='light'> | ||
... | ||
``` | ||
|
||
|
||
### Updating the library | ||
|
||
Install the version of material you want to use: | ||
|
||
```bash | ||
npm install --save-dev @material/web | ||
``` | ||
|
||
Then run the build script: | ||
```bash | ||
npm run build | ||
``` |
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,2 @@ | ||
//Import all the material components so that rollup can bundle them | ||
import "@material/web/all" |
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,2 @@ | ||
{{!-- DO NOT DELETE THIS FILE - Doing so will cause 404 errors on the client side which will not break anything, but will throw errors in the console. --}} | ||
<h1>Hello World!</h1> |
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,9 @@ | ||
//DO NOT DELETE THIS FILE | ||
//- Doing so will cause 404 errors on the client side which will not break anything, but will throw errors in the console. | ||
|
||
//This file will get loaded as a javascript file (not a module), meaning you can't import other modules from here. | ||
|
||
//Define your tmplit functions here and they will be globally available | ||
//function TmplitHelloWorld(context, args){ | ||
// return `Hello ${context[0]}!` | ||
//} |
Oops, something went wrong.