Skip to content

Commit

Permalink
feat: improve gui
Browse files Browse the repository at this point in the history
  • Loading branch information
qarlosalberto committed Aug 6, 2023
1 parent 43fa489 commit 7481880
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 196 deletions.
4 changes: 4 additions & 0 deletions packages/teroshdl/resources/webviews/common/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ button svg {

button:hover svg{
fill: #ffffff;
}

#main-container {
margin-top: 20px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<script src="{{ js_path_4 }}"></script>
<script src="{{ js_path_3 }}"></script>

<link rel="stylesheet" href="{{css_common_path}}" type="text/css" />
<link rel="stylesheet" href="{{css_bootstrap_path}}" type="text/css" />
<link rel="stylesheet" href="{{css_common_path}}" type="text/css" />
</head>

<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container-fluid">
<div class="navbar-center">
<ul class="navbar-nav">
Expand All @@ -36,13 +36,11 @@
</div>
</nav>

<div class="container-fluis">
<div class="row">
<div class="col-12"></div>
<div id="container"></div>
</div>
</div>
</div>

</body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function update_graph(dot) {
if (graph !== null) {
container.removeChild(graph);
}
element.setAttribute('style', 'width: 100vw; height: 100%;');
element.setAttribute('style', 'width: 100vw; height: 100vh;');

container.appendChild(element);
graph = element;
Expand Down
20 changes: 1 addition & 19 deletions packages/teroshdl/resources/webviews/documenter/index.html.nj
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,7 @@
</head>

<body id="body_element">
{# <div>
<div class="toolbar">
<div class="center-panel">
<label class="fancy-checkbox">
<input id="export-as-markdown" name="zoom-mode" type="radio" value="fixed" />
<div class="button">Export markdown</div>
</label>
<label class="fancy-checkbox">
<input id="export-as-html" name="zoom-mode" type="radio" value="fit" />
<div class="button">Export HTML</div>
</label>
<label class="fancy-checkbox">
<input id="export-as-image" name="zoom-mode" type="radio" value="fit" />
<div class="button">Export as SVG</div>
</label>
</div>
</div> #}

<nav class="navbar navbar-expand-lg navbar-light bg-light">
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container-fluid">
<div class="navbar-center">
<ul class="navbar-nav">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
<script type="text/javascript" src="{{js_path_6}}"></script>

<link rel="stylesheet" href="{{css_path}}" type="text/css" />
<link rel="stylesheet" href="{{css_common_path}}" type="text/css" />
<link rel="stylesheet" href="{{css_bootstrap_path}}" type="text/css" />
</head>

<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container">
<div class="navbar-center">
<ul class="navbar-nav">
Expand Down
83 changes: 0 additions & 83 deletions packages/teroshdl/resources/webviews/netlist_viewer/style.css
Original file line number Diff line number Diff line change
@@ -1,89 +1,6 @@
body::-webkit-scrollbar {
width: 1em;
}
body::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

body::-webkit-scrollbar-thumb {
background-color: darkgrey;
}

html,
body {
height: 100%;
overflow: hidden;
overflow-y: hidden;
color: black;
margin: 0;
padding: 0;
}

.navbar {
margin-left: 0;
margin-right: 0;
width: 100%;
}

.navbar-nav {
margin: 0 auto;
}

#zoom {
color: white;
margin: 0.5em;
}

#status {
align-items: center;
background: rgba(0, 0, 0, 0.85);
color: white;
display: flex;
font: 16px Monaco, Menlo, Consolas, monospace;
height: 100%;
justify-content: center;
margin: 0;
position: absolute;
width: 100%;
z-index: 1;
}

#status:empty {
display: none;
}

#message {
font-weight: bold;
font: 20px;
}

#code {
color: #424242;
}

.navbar-center {
display: flex;
justify-content: center;
}

.navbar-center {
width: 100%;
}

button svg {
fill: #000000;
width: 20px;
height: 20px;
margin-bottom: 4px;
}

iframe {
width: 100%;
height: 100%;
overflow-y: none;
overflow-x: none;
}

button:hover svg{
fill: #ffffff;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

<div id="svg" style="text-align: center;"></div>

<link rel="stylesheet" href="{{css_path}}" type="text/css" />
<link rel="stylesheet" href="{{css_common_path}}" type="text/css" />
<link rel="stylesheet" href="{{css_bootstrap_path}}" type="text/css" />
</head>

<body>

<nav class="navbar navbar-expand-lg navbar-light bg-light">
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top">
<div class="container-fluid">
<div class="navbar-center">
<ul class="navbar-nav">
Expand All @@ -39,7 +39,7 @@
</div>
</nav>

<div class="container">
<div id="main-container" class="container">
<div id="error-info" class="trontron">
<div id="inner" class="fuck"></div>
</div>
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion packages/teroshdl/src/features/documenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class Documenter_manager extends Base_webview {
const documenter = await this.get_documenter();
const config = this.get_config();
const html_document = await documenter.get_document(vscode_document.code, vscode_document.lang,
config, false, vscode_document.filename, '', false,
config, false, vscode_document.filename, '', true,
teroshdl2.documenter.common.doc_output_type.HTML);

if (this.panel !== undefined) {
Expand Down
4 changes: 4 additions & 0 deletions packages/teroshdl/src/features/schematic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export class Schematic_manager extends Base_webview {

const css_bootstrap_path = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources', 'webviews', 'common',
'bootstrap.min.css'));
const css_common_path = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources', 'webviews', 'common',
'style.css'));

const css_path = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources','webviews',
'netlist_viewer', 'style.css'));
const js_path_0 = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources','webviews',
Expand All @@ -79,6 +82,7 @@ export class Schematic_manager extends Base_webview {
'netlist_viewer', 'libs', 'main.js'));

const html = nunjucks.renderString(template_str, {
"css_common_path": css_common_path,
"css_bootstrap_path": css_bootstrap_path,
"css_path": css_path,
"cspSource": webview.cspSource,
Expand Down
5 changes: 3 additions & 2 deletions packages/teroshdl/src/features/state_machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ export class State_machine_manager extends Base_webview {

const css_bootstrap_path = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources', 'webviews', 'common',
'bootstrap.min.css'));
const css_path = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources', 'webviews', 'state_machine_viewer',
const css_common_path = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources', 'webviews', 'common',
'style.css'));

const js_path_0 = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources', 'webviews',
'state_machine_viewer', 'libs', 'jquery-2.2.4.min.js'));
const js_path_1 = webview.asWebviewUri(vscode.Uri.joinPath(this.context.extensionUri, 'resources', 'webviews',
Expand All @@ -68,7 +69,7 @@ export class State_machine_manager extends Base_webview {
'state_machine_viewer', 'libs', 'viz.js'));

const html = nunjucks.renderString(template_str, {
"css_path": css_path,
"css_common_path": css_common_path,
"css_bootstrap_path": css_bootstrap_path,
"cspSource": webview.cspSource,
"js_path_0": js_path_0,
Expand Down

0 comments on commit 7481880

Please sign in to comment.