1
1
<?php
2
2
$ platforms = $ this ->getParam ('platforms ' );
3
- $ versions = [];
3
+ $ platform = [];
4
4
5
5
foreach ($ platforms ['client ' ]['languages ' ] ?? [] as $ lang ) {
6
+
6
7
$ key = $ lang ['key ' ] ?? '' ;
7
- $ version = $ lang ['version ' ] ?? '' ;
8
8
9
- if (!empty ($ key )) {
10
- $ versions [$ key ] = $ version ;
9
+ if ($ key === 'web ' ) {
10
+ $ platform = $ lang ;
11
+ break ;
11
12
}
12
13
}
13
14
14
- $ jsVersion = $ versions ['web ' ] ?? '' ;
15
+ $ version = $ platform ['version ' ] ?? '' ;
16
+ $ demos = $ platform ['demos ' ] ?? [];
15
17
?>
16
18
<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>
17
19
@@ -50,7 +52,7 @@ $jsVersion = $versions['web'] ?? '';
50
52
<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>
51
53
52
54
<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>
54
56
</div>
55
57
56
58
<h2>Init your SDK</h2>
@@ -110,6 +112,47 @@ appwrite
110
112
</code></pre>
111
113
</div>
112
114
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
+
113
156
<h2>Next Steps</h2>
114
157
115
158
<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