提交 189045ac 编写于 作者: M Matt Bierner

Merge branch 'chrmarti/welcomeexperience' of...

Merge branch 'chrmarti/welcomeexperience' of https://github.com/microsoft/vscode into chrmarti/welcomeexperience
......@@ -111,6 +111,11 @@ export class WalkThroughPart extends BaseEditor {
layout({ width, height }: Dimension): void {
$(this.content).style({ height: `${height}px`, width: `${width}px` });
const innerContent = this.content.firstElementChild;
if (innerContent) {
const classList = innerContent.classList;
classList[height <= 690 ? 'add' : 'remove']('max-height-690px');
}
this.contentDisposables.forEach(disposable => {
if (disposable instanceof CodeEditor) {
disposable.layout();
......@@ -137,7 +142,7 @@ export class WalkThroughPart extends BaseEditor {
this.content.innerHTML = content;
this.decorateContent();
if (input.onReady) {
input.onReady(this.content);
input.onReady(this.content.firstElementChild as HTMLElement);
}
this.scrollbar.scanDomNode();
return;
......@@ -149,14 +154,16 @@ export class WalkThroughPart extends BaseEditor {
const id = `snippet-${model.snippets[i++].textEditorModel.uri.fragment}`;
return `<div id="${id}" class="walkThroughEditorContainer" ></div>`;
};
this.content.classList.add('walkThroughContent'); // only for markdown files
const innerContent = document.createElement('div');
innerContent.classList.add('walkThroughContent'); // only for markdown files
const markdown = this.expandMacros(content);
this.content.innerHTML = marked(markdown, { renderer });
innerContent.innerHTML = marked(markdown, { renderer });
this.content.appendChild(innerContent);
model.snippets.forEach((snippet, i) => {
const model = snippet.textEditorModel;
const id = `snippet-${model.uri.fragment}`;
const div = this.content.querySelector(`#${id.replace(/\./g, '\\.')}`) as HTMLElement;
const div = innerContent.querySelector(`#${id.replace(/\./g, '\\.')}`) as HTMLElement;
var options: IEditorOptions = {
scrollBeyondLastLine: false,
......@@ -184,7 +191,7 @@ export class WalkThroughPart extends BaseEditor {
}
});
if (input.onReady) {
input.onReady(this.content);
input.onReady(innerContent);
}
this.scrollbar.scanDomNode();
});
......
......@@ -37,9 +37,14 @@
}
.monaco-workbench > .part.editor > .content .welcomePage a {
color: #4080D0;
color: #2e70c0;
text-decoration: none;
}
.vs-dark .monaco-workbench > .part.editor > .content .welcomePage a {
color: #4080D0;
}
.monaco-workbench > .part.editor > .content .welcomePage a:focus {
outline: 1px solid -webkit-focus-ring-color;
outline-offset: -1px;
......@@ -222,8 +227,6 @@
outline-offset: -5px;
}
@media screen and (max-height: 750px) {
.monaco-workbench > .part.editor > .content .welcomePage .title {
display: none;
}
}
\ No newline at end of file
.monaco-workbench > .part.editor > .content .welcomePage.max-height-690px .title {
display: none;
}
......@@ -125,6 +125,7 @@ class WelcomePage {
a.addEventListener('click', e => {
this.windowsService.openWindow([folder]);
e.preventDefault();
e.stopPropagation();
});
li.appendChild(a);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册