styling
This commit is contained in:
parent
24b8f910da
commit
bbfb359e04
4 changed files with 7 additions and 13 deletions
|
@ -83,12 +83,6 @@
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent, computed, provide, watch } from 'vue';
|
import { defineAsyncComponent, computed, provide, watch } from 'vue';
|
||||||
import 'prismjs';
|
|
||||||
import { highlight, languages } from 'prismjs/components/prism-core';
|
|
||||||
import 'prismjs/components/prism-clike';
|
|
||||||
import 'prismjs/components/prism-javascript';
|
|
||||||
import 'prismjs/themes/prism-okaidia.css';
|
|
||||||
import 'vue-prism-editor/dist/prismeditor.min.css';
|
|
||||||
import { v4 as uuid } from 'uuid';
|
import { v4 as uuid } from 'uuid';
|
||||||
import XVariable from './page-editor.script-block.vue';
|
import XVariable from './page-editor.script-block.vue';
|
||||||
import XBlocks from './page-editor.blocks.vue';
|
import XBlocks from './page-editor.blocks.vue';
|
||||||
|
@ -357,10 +351,6 @@ function removeEyeCatchingImage() {
|
||||||
eyeCatchingImageId = null;
|
eyeCatchingImageId = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function highlighter(code) {
|
|
||||||
return highlight(code, languages.js, 'javascript');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
hpml = new HpmlTypeChecker();
|
hpml = new HpmlTypeChecker();
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-actions">
|
<div class="menu-actions">
|
||||||
<button v-tooltip="i18n.ts.copyUrl" @click="copyUrl" class="menu _button"><i class="ph-link-simple ph-bold ph-lg"/></button>
|
<button v-tooltip="i18n.ts.copyUrl" @click="copyUrl" class="menu _button"><i class="ph-link-simple ph-bold ph-lg"/></button>
|
||||||
<MkA v-tooltip="i18n.ts._pages.viewSource" :to="`/@${username}/pages/${pageName}/view-source`" class="menu _button"><i class="ph-code ph-bold ph-lg"/></MkA>
|
<MkA v-tooltip="i18n.ts._pages.viewSource" :to="`/@${username}/pages/${pageName}/view-source`" class="menu _button" style="transform: translateY(2px);"><i class="ph-code ph-bold ph-lg"/></MkA>
|
||||||
<template v-if="$i && $i.id === page.userId">
|
<template v-if="$i && $i.id === page.userId">
|
||||||
<MkA v-tooltip="i18n.ts._pages.editPage" class="menu _button" :to="`/pages/edit/${page.id}`"><i class="ph-pencil ph-bold ph-lg"/></MkA>
|
<MkA v-tooltip="i18n.ts._pages.editPage" class="menu _button" :to="`/pages/edit/${page.id}`" style="transform: translateY(2px);"><i class="ph-pencil ph-bold ph-lg"/></MkA>
|
||||||
<button v-if="$i.pinnedPageId === page.id" v-tooltip="i18n.ts.unpin" class="menu _button" @click="pin(false)"><i class="ph-push-pin-slash ph-bold ph-lg"/></button>
|
<button v-if="$i.pinnedPageId === page.id" v-tooltip="i18n.ts.unpin" class="menu _button" @click="pin(false)"><i class="ph-push-pin-slash ph-bold ph-lg"/></button>
|
||||||
<button v-else v-tooltip="i18n.ts.pin" class="menu _button" @click="pin(true)"><i class="ph-push-pin ph-bold ph-lg"/></button>
|
<button v-else v-tooltip="i18n.ts.pin" class="menu _button" @click="pin(true)"><i class="ph-push-pin ph-bold ph-lg"/></button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="iltifgqe">
|
<div class="iltifgqe">
|
||||||
<div class="editor _panel _gap">
|
<div class="editor _panel _gap">
|
||||||
<PrismEditor v-model="code" class="_code code" :highlight="highlighter" :line-numbers="false"/>
|
<PrismEditor v-model="code" class="_code code" style="height: 30vh" :highlight="highlighter" :line-numbers="false"/>
|
||||||
<MkButton style="position: absolute; top: 8px; right: 8px;" primary @click="run()"><i class="ph-play ph-bold ph-lg"></i></MkButton>
|
<MkButton style="position: absolute; top: 8px; right: 8px;" primary @click="run()"><i class="ph-play ph-bold ph-lg"></i></MkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -518,6 +518,10 @@ hr {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prism-editor__container {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.prism-editor__textarea:focus {
|
.prism-editor__textarea:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue