-
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.
- Loading branch information
Showing
4 changed files
with
152 additions
and
0 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,27 @@ | ||
html, | ||
body, | ||
#root, | ||
mm-page { | ||
width: 100%; | ||
height: 100%; | ||
margin: 0; | ||
overflow: hidden; | ||
} | ||
main { | ||
padding: 20px; | ||
} | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
margin: 3px inherit; | ||
} | ||
section { | ||
margin: 5px 0; | ||
padding: 20px; | ||
border-radius: 6px; | ||
box-sizing: border-box; | ||
border: rgb(var(--mm-color-outline-variant)) solid 1px; | ||
} |
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,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Ripple · Material-Me Component Demo</title> | ||
<link rel="stylesheet" href="../assets/css/index.css" /> | ||
<style> | ||
#ripple-1, | ||
#ripple-2, | ||
#ripple-3, | ||
#ripple-4, | ||
#ripple-5-container { | ||
padding: 10px; | ||
} | ||
#ripple-2 { | ||
color: #ffa8ec; | ||
} | ||
#ripple-3 { | ||
--mm-ripple-color: lightblue; | ||
} | ||
#ripple-4 { | ||
display: block; | ||
} | ||
#ripple-5-container { | ||
display: block; | ||
position: relative; | ||
} | ||
</style> | ||
<script type="module"> | ||
import '../../dist/components/page.js'; | ||
import '../../dist/components/ripple.js'; | ||
</script> | ||
</head> | ||
<body> | ||
<mm-page id="root" theme="auto"> | ||
<main> | ||
<h1>Ripple</h1> | ||
<section> | ||
<mm-ripple id="ripple-1"> Simple Ripple </mm-ripple> | ||
<mm-ripple id="ripple-2"> Ripple with text color </mm-ripple> | ||
<mm-ripple id="ripple-3"> Ripple with specified color </mm-ripple> | ||
</section> | ||
<section> | ||
<mm-ripple id="ripple-4"> Full line Ripple </mm-ripple> | ||
</section> | ||
<section> | ||
<div id="ripple-5-container"> | ||
Attached Ripple | ||
<mm-ripple id="ripple-5" attached></mm-ripple> | ||
</div> | ||
</section> | ||
</main> | ||
</mm-page> | ||
</body> | ||
</html> |
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,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Material-Me ESM Importing Demo</title> | ||
</head> | ||
<body> | ||
<div id="root">see console output.</div> | ||
<script type="module"> | ||
async function main() { | ||
const materialMe = await import('../dist/main.js'); | ||
window.materialMe = materialMe; | ||
console.log('ESM Imported Module: ', materialMe); | ||
} | ||
main(); | ||
</script> | ||
</body> | ||
</html> |
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,50 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Material-Me Demo</title> | ||
<link rel="stylesheet" href="./assets/css/index.css" /> | ||
<style> | ||
a:link, | ||
a:hover, | ||
a:active, | ||
a:visited { | ||
color: var(--mm-color-primary); | ||
} | ||
.links mm-ripple { | ||
display: block; | ||
} | ||
.links a { | ||
display: block; | ||
padding: 10px; | ||
text-decoration: none; | ||
font-size: large; | ||
} | ||
.links h2 { | ||
font-size: larger; | ||
margin-top: 0; | ||
} | ||
</style> | ||
<script type="module"> | ||
import '../../dist/components/page.js'; | ||
import '../../dist/components/ripple.js'; | ||
</script> | ||
</head> | ||
<body> | ||
<mm-page theme="auto"> | ||
<main> | ||
<h1>Material-Me Demo</h1> | ||
<section class="links"> | ||
<h2>Components</h2> | ||
<mm-ripple><a href="./components/ripple.html">Ripple</a></mm-ripple> | ||
</section> | ||
<section class="links"> | ||
<h2>Others</h2> | ||
<mm-ripple><a href="./esm.html">ESM Importing</a></mm-ripple> | ||
</section> | ||
</main> | ||
</mm-page> | ||
<script defer src="../dist/material-me.min.js"></script> | ||
</body> | ||
</html> |