Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit ebf9ba0

Browse files
authored
Merge pull request #16 from appwrite/feat-new-demos
Feat new demos
2 parents f28257e + 29e33d7 commit ebf9ba0

File tree

1 file changed

+49
-6
lines changed

1 file changed

+49
-6
lines changed

app/views/docs/getting-started-for-web.phtml

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<?php
22
$platforms = $this->getParam('platforms');
3-
$versions = [];
3+
$platform = [];
44

55
foreach($platforms['client']['languages'] ?? [] as $lang) {
6+
67
$key = $lang['key'] ?? '';
7-
$version = $lang['version'] ?? '';
88

9-
if(!empty($key)) {
10-
$versions[$key] = $version;
9+
if($key === 'web') {
10+
$platform = $lang;
11+
break;
1112
}
1213
}
1314

14-
$jsVersion = $versions['web'] ?? '';
15+
$version = $platform['version'] ?? '';
16+
$demos = $platform['demos'] ?? [];
1517
?>
1618
<p>Appwrite is a development platform providing you easy yet powerful API and management console to get your next project up and running quickly.</p>
1719

@@ -50,7 +52,7 @@ $jsVersion = $versions['web'] ?? '';
5052
<p>To install with a CDN (content delivery network) add the following scripts to the bottom of your tag, but before you use any Appwrite services:</p>
5153

5254
<div class="ide" data-lang="html" data-lang-label="HTML">
53-
<pre class="line-numbers"><code class="prism language-markup" data-prism><?php echo htmlentities('<script src="https://cdn.jsdelivr.net/npm/appwrite@'.$this->escape($jsVersion).'"></script>'); ?></code></pre>
55+
<pre class="line-numbers"><code class="prism language-markup" data-prism><?php echo htmlentities('<script src="https://cdn.jsdelivr.net/npm/appwrite@'.$this->escape($version).'"></script>'); ?></code></pre>
5456
</div>
5557

5658
<h2>Init your SDK</h2>
@@ -110,6 +112,47 @@ appwrite
110112
</code></pre>
111113
</div>
112114

115+
<h2>Demos</h2>
116+
117+
<p>Below you can find a list of some demos to help you get started with Appwrite for Web using your favorite tools and framework of choice.</p>
118+
119+
<table cellspacing="0" cellpadding="0" border="0" class="full margin-bottom-large text-size-small vertical">
120+
<thead>
121+
<tr>
122+
<th style="width: 80px"></th>
123+
<th style="width: 180px">Demo</th>
124+
<th>GitHub Repository</th>
125+
<th style="width: 120px"></th>
126+
</tr>
127+
</thead>
128+
<tbody>
129+
<?php foreach($demos as $demo):
130+
$name = $demo['name'] ?? '';
131+
$icon = $demo['icon'] ?? '';
132+
$description = $demo['description'] ?? '';
133+
$source = $demo['source'] ?? '';
134+
$url = $demo['url'] ?? '';
135+
$repo = str_replace('https://github.com/', '', $source);
136+
?>
137+
<tr>
138+
<td>
139+
<img src="/images-ee/platforms/<?php echo $icon; ?>" alt="Logo" height="30" class="force-light sdk-logo margin-start margin-end" />
140+
<img src="/images-ee/platforms/dark/<?php echo $icon; ?>" alt="Logo" height="30" class="force-dark sdk-logo margin-start margin-end" />
141+
</td>
142+
<td>
143+
<?php echo $name; ?> <span class="tooltip" data-tooltip="<?php echo $this->escape($description); ?>"><i class="icon-info-circled"></i></span>
144+
</td>
145+
<td>
146+
<a href="<?php echo $source; ?>" target="_blank" rel="noopener"><?php echo $repo; ?></a>
147+
</td>
148+
<td>
149+
<a href="<?php echo $url; ?>" target="_blank" rel="noopener">Live Example</a>
150+
</td>
151+
</tr>
152+
<?php endforeach; ?>
153+
</tbody>
154+
</table>
155+
113156
<h2>Next Steps</h2>
114157

115158
<p>Appwrite has many services and tools to help improve your app and speed up your development. The best way to learn how you can take advantage of them is to explore the different API references docs.</p>

0 commit comments

Comments
 (0)