Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeh committed Jan 17, 2021
1 parent 35aecd6 commit 8ebd45e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/language-switch/favicon.ico"/><title>404 - not found</title><meta name="description" content="404 - not found."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"404 - not found"}</script><link rel="stylesheet" href="/language-switch/magic.css?6TZBTNHLKl" integrity="sha384-6TZBTNHLKlB2V52pESNlAYAXPv/seNzwGVNGlmXnbq4/9PhAFm3r7DPJFRayvFqj" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/language-switch/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/language-switch/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>LanguageSwitch</p><nav class="Menu"><ul><li><a href="/language-switch/#installation">installation</a></li><li><a href="/language-switch/#usage">usage</a></li><li><a href="/language-switch/#pages">language pages</a></li><li><a href="/language-switch/#state">required state</a></li><li><a href="/language-switch/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><div>404 - not found.</div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/language-switch/magic.js?ABUAQZFAzb" integrity="sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px" crossorigin="anonymous"></script></body></html>
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="icon" href="/language-switch/favicon.ico"/><title>404 - not found</title><meta name="description" content="404 - not found."/><script type="application/ld+json">{"@context":"http://schema.org","@type":"website","name":"404 - not found"}</script><link rel="stylesheet" href="/language-switch/magic.css?6TZBTNHLKl" integrity="sha384-6TZBTNHLKlB2V52pESNlAYAXPv/seNzwGVNGlmXnbq4/9PhAFm3r7DPJFRayvFqj" crossorigin="anonymous"/></head><body><a class="SkipLink" href="/language-switch/#page">Skip to Content</a><main id="Magic"><div class="Wrapper"><header class="Header"><div><a class="Logo" href="/language-switch/"><svg viewBox="0 0 512 444"><path d="M512 444L256 0 0 444z" fill="#663695"></path><circle cx="256" cy="294" r="130" fill="#fff"></circle><circle cx="256" cy="281" r="40" fill="#663695"></circle><path d="M256 350v44m24-44l1 13c1 27 29 27 29-7m-160-72s46-47 106-47c59 0 106 47 106 47s-47 43-106 43c-60 0-106-43-106-43zm65-75a134 134 0 0189 2" class="stroke"></path><path d="M256 81v53m184 270l-43-29M72 404l43-29" class="stroke white"></path></svg></a><p>LanguageSwitch</p><nav class="Menu"><ul><li><a href="/language-switch/#installation">installation</a></li><li><a href="/language-switch/#usage">usage</a></li><li><a href="/language-switch/#pages">language pages</a></li><li><a href="/language-switch/#state">required state</a></li><li><a href="/language-switch/#source">source</a></li></ul></nav></div></header><div class="Page" id="page"><div>404 - not found.</div></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/language-switch/magic.js?xS786N3JYQ" integrity="sha384-xS786N3JYQL4L1RMYXBJgW28Kr45Bk1dd4dG+rC6U1ceIV8kgwohQlIrKSEg+GPt" crossorigin="anonymous"></script></body></html>
2 changes: 1 addition & 1 deletion docs/de/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
<a href="https://github.com/magic-modules/language-switch/tree/master/example" target="_blank" rel="noopener">example directory</a>
und wird mit
<a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a>
gebaut und zu github publiziert.</p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/language-switch/magic.js?ABUAQZFAzb" integrity="sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px" crossorigin="anonymous"></script></body></html>
gebaut und zu github publiziert.</p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/language-switch/magic.js?xS786N3JYQ" integrity="sha384-xS786N3JYQL4L1RMYXBJgW28Kr45Bk1dd4dG+rC6U1ceIV8kgwohQlIrKSEg+GPt" crossorigin="anonymous"></script></body></html>
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
LanguageSwitch component. It provides a language switch menu.</p><ul class="GitBadges"><li><a href="https://www.npmjs.com/package/@magic-modules/language-switch" target="_blank" rel="noopener"><img src="https://img.shields.io/npm/v/@magic-modules/language-switch?color=blue" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><img src="https://img.shields.io/node/v/@magic-modules/language-switch?color=blue" height="23" role="presentation" alt="" loading="lazy"/></li><li><img src="https://img.shields.io/npm/l/@magic-modules/language-switch?color=blue" height="23" role="presentation" alt="" loading="lazy"/></li><li><a href="https://travis-ci.com/magic-modules/language-switch" target="_blank" rel="noopener"><img src="https://img.shields.io/travis/com/magic-modules/language-switch/master" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://ci.appveyor.com/project/magicmodules/language-switch/branch/master" target="_blank" rel="noopener"><img src="https://img.shields.io/appveyor/ci/magicmodules/language-switch/master.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://coveralls.io/github/magic-modules/language-switch" target="_blank" rel="noopener"><img src="https://img.shields.io/coveralls/github/magic-modules/language-switch/master.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li><li><a href="https://snyk.io/test/github/magic-modules/language-switch" target="_blank" rel="noopener"><img src="https://img.shields.io/snyk/vulnerabilities/github/magic-modules/language-switch.svg" height="23" role="presentation" alt="" loading="lazy"/></a></li></ul><h2 id="installation">installation</h2><div class="Pre"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="keyword">npm</span> <span class="keyword">install</span> @magic-modules/language-switch</code></pre></div><h2 id="usage">usage</h2><p>hoist in config.mjs:</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="comment">// /src/config.mjs</span></code><code class="line"><span class="keyword">export</span> <span class="keyword">default</span> {</code><code class="line"> HOIST: [<span class="string">&#39;LanguageSwitch&#39;</span>],</code><code class="line">}</code></pre></div><h3 id="caveat">caveat</h3><p>please note that this module will not change anything about the menu.</p><p>i built it to use it on my page <a href="https://jaeh.at" target="_blank" rel="noopener">jaeh.at</a>, which does not have a menu.</p><h2 id="pages">pages</h2><p>create your languages in the pages directory, for example:</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line">/pages/</code><code class="line"> index.mjs <span class="comment">// english page</span></code><code class="line"> /de/</code><code class="line"> index.mjs <span class="comment">// german page</span></code></pre></div><h2 id="state">state</h2><p>LanguageSwitch needs to know about the languages in your app.</p><div class="Pre lines"><div class="menu"><button>copy</button></div><pre><code class="line"><span class="comment">// /assets/app.mjs</span></code><code class="line"><span class="keyword">export</span> <span class="keyword">const</span> <span class="state">state</span> = {</code><code class="line"> <span class="comment">// ... other app <span class="state">state</span></span></code><code class="line"> languages: [</code><code class="line"> <span class="comment">// the first language is the <span class="keyword">default</span> fallback</span></code><code class="line"> { code: <span class="string">&#39;en&#39;</span>, to: <span class="string">&#39;/&#39;</span>, text: <span class="string">&#39;english&#39;</span> },</code><code class="line"> { code: <span class="string">&#39;de&#39;</span>, to: <span class="string">&#39;/de/&#39;</span>, text: <span class="string">&#39;deutsch&#39;</span> },</code><code class="line"> ],</code><code class="line">}</code></pre></div><p>thats it, your magic app now knows about your languages</p><h2 id="source">source</h2><p>the source for this page is in the
<a href="https://github.com/magic-modules/language-switch/tree/master/example" target="_blank" rel="noopener">example directory</a>
and gets built and published to github using
<a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/language-switch/magic.js?ABUAQZFAzb" integrity="sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px" crossorigin="anonymous"></script></body></html>
<a href="https://github.com/magic/core" target="_blank" rel="noopener">@magic/core</a></p></div><footer class="Footer"><div class="Container"><div class="Credits">made with a few bits of <a target="_blank" rel="noopener" href="https://magic.github.io/">magic</a></div></div></footer></div></main><script src="/language-switch/magic.js?xS786N3JYQ" integrity="sha384-xS786N3JYQL4L1RMYXBJgW28Kr45Bk1dd4dG+rC6U1ceIV8kgwohQlIrKSEg+GPt" crossorigin="anonymous"></script></body></html>
2 changes: 1 addition & 1 deletion docs/magic.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@

<url>
<loc>https://magic-modules.github.io/language-switch/</loc>
<lastmod>2021-01-05</lastmod>
<lastmod>2021-01-17</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://magic-modules.github.io/language-switch/de/</loc>
<lastmod>2021-01-05</lastmod>
<lastmod>2021-01-17</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://magic-modules.github.io/language-switch/404/</loc>
<lastmod>2021-01-05</lastmod>
<lastmod>2021-01-17</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
Expand Down
10 changes: 5 additions & 5 deletions docs/sri-hashes.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"/magic.css": "sha384-6TZBTNHLKlB2V52pESNlAYAXPv/seNzwGVNGlmXnbq4/9PhAFm3r7DPJFRayvFqj",
"/magic.js": "sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px",
"/language-switch/": "sha384-NMEjATCzfQY5tY8Ga6VeDvid9WTsbykS2tRx9Vd9Bh6tAznJvcpLhP60O4IjhyDB",
"/language-switch/404/": "sha384-sEK/FcHHZ+JUipk1a7g2JFS7/OVRzx8qpbN+LLlUaAdXYeIp84Y4fas1uCgFHP0+",
"/language-switch/de/": "sha384-0Ubx8ka0N5xM6SvZ69FTgdiFFaqPYGgO6neWScMgCBb2RzvSJgDgvNCjYveu5kHe",
"/magic.js": "sha384-xS786N3JYQL4L1RMYXBJgW28Kr45Bk1dd4dG+rC6U1ceIV8kgwohQlIrKSEg+GPt",
"/language-switch/": "sha384-VnNVRUBz1f0p0YCvBx+yEna3CP40M8lV/MwGSWBK+a2kwBiyWRhbx3Cjt6uT89zw",
"/language-switch/404/": "sha384-yDLKKliatwC1rdlWAP4UNzvrW5NMJ3s0PNnkda5lY525/dRbARKwKqc10ekLh3pD",
"/language-switch/de/": "sha384-2qKlOFXjuUGudi/WeI5lScH6dMvxGCvr0kSZzRivvSymj4TG8Z7QS6DCsZEdsJBC",
"/robots.txt": "sha384-EvHv8YVb32aNnvUUecOCU8MRA2ptLVqBusyQVK1ByNv9WOpKmKihoQthL7cADdoO",
"/sitemap.xml": "sha384-lIU2bzka7NaZriv0Wpkyc43dmUct2ByZQq5/Y/ay6ExX3iM4BthJ7R8mSLZbROLw"
"/sitemap.xml": "sha384-faGk4Rdx7HdCt75hJ2Jxlo1b4ZqUbWI1C/Zv7kblKtd2Fjauj/FG4273EvEwjclW"
}

0 comments on commit 8ebd45e

Please sign in to comment.