Skip to content

Commit

Permalink
updated: Path to the new riot major version
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Aug 26, 2023
1 parent 1682caa commit 2a13d3a
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 25 deletions.
2 changes: 1 addition & 1 deletion animated-list-reordering/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<list></list>

<script src="https://unpkg.com/animore/animore.js"></script>
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>

<script type="riot" src="./list.riot"></script>

Expand Down
2 changes: 1 addition & 1 deletion bug-reporter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<my-tag></my-tag>

<script type="text/javascript" src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script type="riot" src="./my-tag.html"></script>

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion color-palette/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script type="riot" src="app.riot"></script>

<!-- scripts we need -->
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script src="mixin.js"></script>

<!-- mount this app -->
Expand Down
2 changes: 1 addition & 1 deletion hooks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<my-tag count="0"></my-tag>

<script type="text/javascript" src="https://unpkg.com/[email protected]/min.js"></script>
<script type="text/javascript" src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script type="text/javascript" src="./with-hooks.js"></script>
<script type="riot" src="./my-tag.html"></script>

Expand Down
2 changes: 1 addition & 1 deletion live-ajax-search/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<search></search>

<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>

<script type="riot" src="./search.riot"></script>

Expand Down
2 changes: 1 addition & 1 deletion live-editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<!-- scripts we need -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.2/ace.js"></script>
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script>
riot.compile().then(() => {
riot.mount('live-editor')
Expand Down
2 changes: 1 addition & 1 deletion live-editor/stage.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<body>
<sample></sample>
<!-- scripts we need -->
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script>
window.addEventListener('message', function(e) {
const { code } = riot.compileFromString(e.data)
Expand Down
22 changes: 19 additions & 3 deletions modal/cool-modal.riot
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
<cool-modal>
<modal state={ state.modal } title="My Cool Modal" if={ state.modal.visible }>
<p>{ state.modal.message }</p>
<button onclick={ sayHello }>Say hello!</button>
<button onclick={ closeModal }>Close modal</button>
<div class="btn-group">
<button onclick={ sayHello }>Say hello!</button>
<button onclick={ closeModal }>Close modal</button>
</div>
</modal>

<script>
export default {
state: {
Expand All @@ -26,4 +28,18 @@
}
}
</script>

<style>
button {
cursor: pointer;
background: white;
border: 1px solid #2e6eb5;
padding: 8px;
}
.btn-group {
display: flex;
gap: 12px;
}
</style>
</cool-modal>
3 changes: 2 additions & 1 deletion modal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
<style>
body {
overflow: hidden;
background: #d9ebff;
}
</style>
</head>
<body>

<cool-modal></cool-modal>

<script type="text/javascript" src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@riotjs/observable@4/dist/observable.min.js"></script>
<script type="riot" src="./modal.riot"></script>
<script type="riot" src="./cool-modal.riot"></script>
Expand Down
32 changes: 24 additions & 8 deletions modal/modal.riot
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<modal>
<div class="modal animated faster { state.animation }">
<div class="modal-title">{ props.title }</div>
<h2 class="modal-title">{ props.title }</h2>

<div class="modal-body">
<div class="modal-body">
<slot />
</div>
</div>

<script>
export default {
state: {
Expand All @@ -25,13 +25,29 @@
},
}
</script>


<style>
:host {
font-family: Helvetica Neue, Helvetica, Arial, serif;
position: absolute;
display: block;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
h2 {
margin: 0;
font-size: 1.2rem;
}
.modal {
padding: 16px;
background: #fafafa;
border: 1px solid #333;
padding: 24px;
background: #e3f5ff;
border: 4px solid #ffffff;
border-radius: 4px;
box-shadow: 0 0 4px rgba(0 0 0 / 0.2);
}
</style>
</modal>
2 changes: 1 addition & 1 deletion plunker/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="riot" src="app.riot"></script>

<!-- scripts we need -->
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>

<!-- mount this app -->
<script>
Expand Down
2 changes: 1 addition & 1 deletion router-complex/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<script type="riot" src="app.riot"></script>

<!-- scripts we need -->
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script src="https://unpkg.com/@riotjs/route/route.js"></script>

<!-- mount this app -->
Expand Down
2 changes: 1 addition & 1 deletion router-history-api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="riot" src="app.riot"></script>

<!-- scripts we need -->
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script src="https://unpkg.com/@riotjs/route/route.js"></script>

<!-- mount this app -->
Expand Down
2 changes: 1 addition & 1 deletion router-page-switcher/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script type="riot" src="app.riot"></script>

<!-- scripts we need -->
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script src="https://unpkg.com/@riotjs/route/route.js"></script>

<!-- mount this app -->
Expand Down
2 changes: 1 addition & 1 deletion timer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<script src="timer.riot" type="riot"></script>

<!-- scripts we need -->
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>

<!-- mount this app -->
<script>
Expand Down
2 changes: 1 addition & 1 deletion todo-app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<todo></todo>

<script src="todo.riot" type="riot"></script>
<script src="https://unpkg.com/riot@7/riot+compiler.min.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>

<script>
riot.compile().then(() => {
Expand Down

0 comments on commit 2a13d3a

Please sign in to comment.