Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from bleonard252/patch-2
Browse files Browse the repository at this point in the history
Add fullscreen, change language to English (en), and separate toolbar
  • Loading branch information
tobias-kuendig authored Jul 25, 2018
2 parents 0152cfa + bc9d656 commit f0e3b06
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
29 changes: 27 additions & 2 deletions resources/assets/js/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
>
<span class="glyphicon glyphicon-download"></span>
</button>
<button type="button"
class="btn btn-default"
title="Full Window/Fullscreen"
@click="fullwin"
v-show="openFile !== null"
>
<span class="glyphicon glyphicon-fullscreen"></span>
</button>
</div>
</div>
</template>
Expand All @@ -48,6 +56,15 @@
save() {
this.putContents(this.editor.getValue());
},
fullwin() {
//I only know JavaScript, not this babel stuff, so here goes nothing (B>):
//Reconfigure this into your language
if (querySelector("div.col-editor").className = "fullscr") {
querySelector("div.col-editor").className = ""
} else {
querySelector("div.col-editor").className = "fullscr"
}
},
hide() {
this.setEditorVisibility(false);
}
Expand Down Expand Up @@ -90,11 +107,18 @@
</script>

<style>
div.col-editor.fullscr {
width: 100%;
}
div.col-editor.fullscr #hide {
/* This hides the "hide" button in the fullscreen mode. To show it again, press the Fullscreen button again. */
display: none;
}
#editor {
position: relative;
width: 100%;
z-index: 500;
height: 100vh;
height: calc(100vh - 54px);
font-size: 15px;
line-height: 1.6;
}
Expand All @@ -107,6 +131,7 @@
width: 100%;
z-index: 600;
padding: 10px;
background-color: white;
}
#hide {
Expand All @@ -122,4 +147,4 @@
transform: translate(10%, 0);
}
}
</style>
</style>
4 changes: 2 additions & 2 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="de">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
Expand All @@ -26,4 +26,4 @@
@includeIf('partials.github-ribbon')
@includeIf('partials.analytics')
</body>
</html>
</html>

0 comments on commit f0e3b06

Please sign in to comment.