Skip to content

Commit 2f74b36

Browse files
committed
Removed the pin function
1 parent fa9c710 commit 2f74b36

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

docs/.vuepress/components/MojsInteractive.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,8 @@ or with no controlls at all (static animation, unless you provide a .play() func
4242
<div class="mojs-interactive">
4343
<div
4444
class="mojs-interactive__code"
45-
:class="{ 'mojs-interactive__code--pinned': isPinned }"
4645
>
4746
<prism-editor :code="code" language="js" @change="change"></prism-editor>
48-
<button class="button button--icon button--pin" v-on:click="pin" aria-label="Pin the code on scroll">
49-
{{ isPinned ? "✖️" : "📍" }}
50-
</button>
5147
<div class="buttons">
5248
<button class="button button--secondary" v-on:click="reset">Reset</button>
5349
<button class="button" v-on:click="updateCode">Update code</button>
@@ -90,7 +86,6 @@ or with no controlls at all (static animation, unless you provide a .play() func
9086
return {
9187
rawCode: this.code,
9288
isPlaying: false,
93-
isPinned: false,
9489
}
9590
},
9691

@@ -179,10 +174,6 @@ or with no controlls at all (static animation, unless you provide a .play() func
179174
}
180175
this.isPlaying = !this.isPlaying;
181176
},
182-
183-
pin: function() {
184-
this.isPinned = !this.isPinned;
185-
}
186177
},
187178

188179
mounted () {

docs/.vuepress/styles/index.styl

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -191,26 +191,6 @@ blockquote {
191191
bottom: 1rem;
192192
right: 1rem;
193193
}
194-
/* TODO: Add the pinned to the container, co both the code and the code exmple can be side by side.
195-
And add a placeholder block where the old elements had been so the text doesnt jump.
196-
*/
197-
.mojs-interactive__code.mojs-interactive__code--pinned {
198-
position: fixed;
199-
top: 0;
200-
right: 0;
201-
left: 0;
202-
z-index: 200;
203-
background: $c-purple-dark;
204-
}
205-
.mojs-interactive__code.mojs-interactive__code--pinned .prism-editor-wrapper {
206-
max-height: 50vh;
207-
overflow: auto;
208-
}
209-
.mojs-interactive__code .button--pin {
210-
position: absolute;
211-
top: 0;
212-
right: 0;
213-
}
214194

215195
.mojs-interactive__result {
216196
position: relative;

0 commit comments

Comments
 (0)