Переглянути джерело

Add float parameter to inputer-editor component and set that parameter to true for thread route

sbkwgh 8 роки тому
батько
коміт
fa83786121
2 змінених файлів з 8 додано та 3 видалено
  1. 7 2
      src/components/InputEditor.vue
  2. 1 1
      src/components/routes/Thread.vue

+ 7 - 2
src/components/InputEditor.vue

@@ -1,7 +1,7 @@
 <template>
 	<div
 		class='input_editor'
-		:class='{"input_editor--focus": focused}'
+		:class='{"input_editor--focus": focused, "input_editor--float": float}'
 	>
 		<tab-view :tabs='["Editor", "Preview"]' :name='name' small-tabs='true'>
 			<template slot='Editor'>
@@ -63,7 +63,7 @@
 
 	export default {
 		name: 'InputEditor',
-		props: ['name'],
+		props: ['name', 'float'],
 		components: {
 			ModalWindow,
 			FancyInput,
@@ -183,6 +183,11 @@
 			border-color: $color__gray--darkest;
 		}
 
+		@at-root #{&}--float {
+			position: fixed;
+			bottom: 0;
+		}
+
 		@at-root #{&}__format_bar {
 			width: auto;
 			position: absolute;

+ 1 - 1
src/components/routes/Thread.vue

@@ -4,7 +4,7 @@
 			<div class='thread_header__thread_title'>Thread title</div>
 			<button class='button thread_header__reply_button'>Reply to thread</button>
 		</header>
-		<input-editor name='thread'></input-editor>
+		<input-editor name='thread' float='true'></input-editor>
 		<div class='posts'>
 			<div class='post'>
 				<div class='post__meta_data'>