Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,8 @@
"type": "module",
"engines": {
"node": ">= 16"
},
"dependencies": {
"svelte-material-icons": "^3.0.5"
}
}
5 changes: 5 additions & 0 deletions src/lib/icons/Jetbrains.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M25.6 99.6L0 74V25.2L25.6 0l50.4 50.4L25.6 99.6z" fill="#000"/>
<path d="M99.6 49.2L49.2 99.6 74 74.8l25.6-25.6V24L74.8 0 99.6 25.2v24zM0 25.2L25.6 0h49.2L25.2 49.6 0 25.2z" fill="#000"/>
<path d="M49.2 99.6l24.8-24.8L24 24 0 49.2l25.2 25.2L49.2 99.6z" fill="#F23"/>
</svg>
3 changes: 3 additions & 0 deletions src/lib/icons/VisualStudioCode.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<svg width="100" height="100" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.15.1L16.3.24l-4.4 11.32L7.7.24.85.1.1 23.9h4.4l.52-5.52L8.2 5.5l3.84 9.4.48.48h3.32l4.32-10.88.48-2.4.52 5.52h4.48L23.15.1z" fill="#007ACC"/>
</svg>
19 changes: 15 additions & 4 deletions src/routes/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import Rss from '$lib/rss/Rss.svelte';
import { darkModeThemeEnabled } from '$lib/theme/colorTheme';
import { onMount } from 'svelte';
import VisualStudioCode from '@icons-pack/svelte-simple-icons/src/components/Visualstudiocode.svelte';
import Jetbrains from '@icons-pack/svelte-simple-icons/src/components/Jetbrains.svelte';
import VisualStudioCode from '$lib/icons/VisualStudioCode.svelte';
import Jetbrains from '$lib/icons/Jetbrains.svelte';
import Try from '$lib/try/Try.svelte';
import { variables } from '$lib/variables';
import { pageTitle, pageDescription, pageUrl } from '$lib/stores';
Expand All @@ -12,6 +12,7 @@
$pageDescription = 'Run your favorite IDE on Kubernetes.';
$pageUrl = 'https://www.eclipse.org/che/';

let stars = '...';
let ideImages = [];
const darkImages = [`${variables.imagesPath}/ide-code-dark.png`, `${variables.imagesPath}/ide-pycharm-dark.png`]
const lightImages = [`${variables.imagesPath}/ide-code-light.png`, `${variables.imagesPath}/ide-pycharm-light.png`]
Expand All @@ -23,7 +24,12 @@
let ideImage;
const timeoutMs = 6000;

onMount(() => {
onMount(async () => {
const res = await fetch('https://api.github.com/repos/eclipse/che');
if (res.ok) {
const data = await res.json();
stars = data.stargazers_count;
}
darkModeThemeEnabled.subscribe(isEnabled => {
if (isEnabled) {
ideImages = darkImages;
Expand Down Expand Up @@ -51,7 +57,12 @@
<div class="text-center lg:w-2/3 w-full">
<h1 class="title-font sm:text-4xl text-3xl lg:text-6xl mb-4 font-medium text-gray-900 dark:text-white">Run your favorite IDE on Kubernetes</h1>
<div class="flex justify-center">
<iframe src="https://ghbtns.com/github-btn.html?user=eclipse&repo=che&type=star&count=true" frameborder="0" scrolling="0" width="150" height="20" title="GitHub"></iframe>
<a href="https://github.com/eclipse/che" target="_blank" class="flex items-center space-x-2 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 16 16" fill="currentColor">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/>
</svg>
<span>{stars} stars</span>
</a>
</div>
<p class="mb-3 py-3 leading-relaxed">Create a workspace from a Git repository or sample</p>
<div class="flex justify-center mb-8">
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,11 @@ svelte-hmr@^0.14.9:
resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.9.tgz#35f277efc789e1a6230185717347cddb2f8e9833"
integrity sha512-bKE9+4qb4sAnA+TKHiYurUl970rjA0XmlP9TEP7K/ncyWz3m81kA4HOgmlZK/7irGK7gzZlaPDI3cmf8fp/+tg==

svelte-material-icons@^3.0.5:
version "3.0.5"
resolved "https://registry.yarnpkg.com/svelte-material-icons/-/svelte-material-icons-3.0.5.tgz#37bed05ceadd981b0da8630bd43b6d7cd6345376"
integrity sha512-UbhAa+Btd5y6e6DMljVccP+cbJ8lvesltMippiCOvfIUtYe2TsQqM+P6osfrVsZHV47b1tY6AmqCuSpMKnwMOQ==

svelte-meta-tags@^2.6.4:
version "2.6.4"
resolved "https://registry.yarnpkg.com/svelte-meta-tags/-/svelte-meta-tags-2.6.4.tgz#ead86a01a4f645a7b7ad7b7f52248fb58564fd64"
Expand Down