-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create onMounting hook #6
Changes from all commits
87204a0
8b854fa
886869a
6c274a0
4e5113f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
const copy = require('copy'); | ||
|
||
copy('dist/*.js', 'example', ()=> console.log('copied pill.js build into example')); | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,27 +3,30 @@ | |
<head> | ||
<title>Main Page</title> | ||
<link rel="stylesheet" type="text/css" href="/style.css" /> | ||
<script type="text/javascript" src="/pill.js"></script> | ||
</head> | ||
<body> | ||
<div id="indicator">Loading...</div> | ||
<!-- PAGE CONTENT START --> | ||
<div id='page'> | ||
<div> | ||
<nav> | ||
<a href="/">Home</a> | ||
<a href="/pages/a">Page A</a> | ||
<a href="/pages/b">Page B</a> | ||
<a href="/pages/x">Page X</a> | ||
</nav> | ||
|
||
<h1>Main page</h1> | ||
<p> | ||
Main page content. | ||
<a href='#anchor'>Anchor</a> | ||
</p> | ||
<div style="height: 100vh"></div> | ||
<p> | ||
<a name="anchor"></a> <span>Anchor</span> <a href="/pages/a">Page A</a> | ||
</p> | ||
<main id="page"> | ||
<h1>Main page</h1> | ||
<p> | ||
Main page content. | ||
<a href='#anchor'>Anchor</a> | ||
</p> | ||
<div style="height: 100vh"></div> | ||
<p> | ||
<a name="anchor"></a> <span>Anchor</span> <a href="/pages/a">Page A</a> | ||
</p> | ||
</main> | ||
</div> | ||
<!-- PAGE CONTENT END --> | ||
<script src='/site.js' type='module'></script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presented in PR #9 |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,23 +2,22 @@ | |
<html> | ||
<head> | ||
<title>Page A</title> | ||
<link rel="stylesheet" type="text/css" href="/style.css" /> | ||
</head> | ||
<body> | ||
<div id="indicator">Loading...</div> | ||
<!-- PAGE CONTENT START --> | ||
<div id='page'> | ||
<div> | ||
<nav> | ||
<a href="/">Home</a> | ||
<a href="/pages/a">Page A</a> | ||
<a href="/pages/b">Page B</a> | ||
</nav> | ||
<h1>Page A</h1> | ||
<main id='page'> | ||
<h1>Page A</h1> | ||
<p> | ||
Page A content. | ||
</p> | ||
</main> | ||
</div> | ||
<!-- PAGE CONTENT END --> | ||
<script src='/site.js' type='module'></script> | ||
</body> | ||
</html> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presented in PR #9 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,23 +2,23 @@ | |
<html> | ||
<head> | ||
<title>Page B</title> | ||
<link rel="stylesheet" type="text/css" href="/style.css" /> | ||
</head> | ||
<body> | ||
<div id="indicator">Loading...</div> | ||
<!-- PAGE CONTENT START --> | ||
<div id='page'> | ||
<div> | ||
<nav> | ||
<a href="/">Home</a> | ||
<a href="/pages/a">Page A</a> | ||
<a href="/pages/b">Page B</a> | ||
</nav> | ||
<h1>Page B</h1> | ||
<p> | ||
Page B content. | ||
</p> | ||
<main id='page'> | ||
<h1>Page B</h1> | ||
<p> | ||
Page B content. | ||
</p> | ||
</main> | ||
|
||
</div> | ||
<!-- PAGE CONTENT END --> | ||
<script src='/site.js' type='module'></script> | ||
</body> | ||
</html> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Presented in PR #9 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import pill from '/pill.js' | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Conflicts with PR #9 |
||
|
||
const indicator = document.getElementById('indicator'); | ||
|
||
|
@@ -16,5 +16,8 @@ pill('#page', { | |
timeout = setTimeout(() => { | ||
indicator.style.display = 'none'; | ||
}, 1000) | ||
}, | ||
onMounting(){ | ||
console.log('content is mounting'); | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part should be removed. It's presented in PR #10.