Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Home update #153

Merged
merged 13 commits into from
Aug 30, 2021
10 changes: 6 additions & 4 deletions _includes/demo.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<h2 id="demo">Demo</h2>
<div id="terminal"></div>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/xterm.css" />
<script src="https://unpkg.com/[email protected]/lib/xterm.js"></script>
<div class="demo">
<div class="inner"></div>
</div>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/css/xterm.css" />
<script src="https://unpkg.com/[email protected]/lib/xterm.js"></script>
<script src="https://unpkg.com/[email protected]/lib/xterm-addon-webgl.js"></script>
<script src="{{ "/js/demo.js" | prepend: site.baseurl }}"></script>
10 changes: 0 additions & 10 deletions _includes/xtermjs-description.md

This file was deleted.

22 changes: 15 additions & 7 deletions _pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,25 @@

<div class="home">

<article>
{% capture about %}{% include xtermjs-description.md %}{% endcapture %}
{{ about | markdownify }}
</article>
<div class="logo">
<img src="/images/logo-full.png">
</div>

{% capture getting_started %}{% include getting-started.md %}{% endcapture %}
{{ getting_started | markdownify }}
<div class="description">
<p>Build terminals in the browser</p>
</div>

<div class="npm-install">
<div class="text">npm install xterm</div>
<button class="copy" title="Copy to clipboard" onclick="navigator.clipboard.writeText('npm install xterm'); document.querySelector('.copy').textContent = '\u2713'">Copy</div>
</div>

{% include demo.html %}

{% capture getting_started %}{% include getting-started.md %}{% endcapture %}
{{ getting_started | markdownify }}

{% capture real_world_uses %}{% include real-world-uses.md %}{% endcapture %}
{{ real_world_uses | markdownify }}

</div>
</div>
49 changes: 49 additions & 0 deletions _sass/_home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
.home {
.logo {
text-align: center;
}

.description {
// max-width: 500px;
text-align: center;
font-size: 1.3em;
margin: 1em auto;
opacity: 0.8;
}

.npm-install {
display: flex;
width: 300px;
margin: auto;
justify-content: space-between;
background-color: #F8F8F8;
padding: 5px 14px 5px 20px;
border-radius: 4px;
.text {
font-family: monospace;
padding: 2px 0;
}
.copy {
border: 0;
background: none;
padding: 2px 6px;
&:hover {
background-color: #00000020;
}
}
}
}

.demo {
display: flex;
justify-content: center;
margin: 20px 0 50px;
.inner {
padding: 10px 20px;
border-radius: 4px;
background-color: #2D2E2C;
&.other-theme {
background-color: #282a36;
}
}
}
1 change: 1 addition & 0 deletions css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,5 @@ h4:hover, h5:hover, h6:hover {
}

@import 'code';
@import 'home';
@import 'syntax_highlight';
Binary file added images/logo-full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading