Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeh committed Nov 22, 2020
1 parent b1b9f7a commit 789418f
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?lm8RNjME0/" integrity="sha384-lm8RNjME0/g4Xc2FDLLmbMHvXcKJks7e+UoxBp/95CXFlvuoNdj2q/tpskq/Upfm" 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?ABUAQZFAzb" integrity="sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px" 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?lm8RNjME0/" integrity="sha384-lm8RNjME0/g4Xc2FDLLmbMHvXcKJks7e+UoxBp/95CXFlvuoNdj2q/tpskq/Upfm" 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?ABUAQZFAzb" integrity="sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px" 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?lm8RNjME0/" integrity="sha384-lm8RNjME0/g4Xc2FDLLmbMHvXcKJks7e+UoxBp/95CXFlvuoNdj2q/tpskq/Upfm" 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?ABUAQZFAzb" integrity="sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px" 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>2020-11-03</lastmod>
<lastmod>2020-11-22</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://magic-modules.github.io/language-switch/de/</loc>
<lastmod>2020-11-03</lastmod>
<lastmod>2020-11-22</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://magic-modules.github.io/language-switch/404/</loc>
<lastmod>2020-11-03</lastmod>
<lastmod>2020-11-22</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-lm8RNjME0/g4Xc2FDLLmbMHvXcKJks7e+UoxBp/95CXFlvuoNdj2q/tpskq/Upfm",
"/language-switch/": "sha384-QEMW+ejQ80UoF6SDCYrfEYQtF6TpBu5HMrsO14+qQmf4N+4U9REfHbuAYKVC6m/c",
"/language-switch/404/": "sha384-5Ljxm1+m2siHCdilSsrrVm3eJmShWMWIcLgKTQRuh6Nr9vf5mCsAUCnGO2isB+6D",
"/language-switch/de/": "sha384-RnA2gO2ufIN+kyDbxnpQmzGm0lOoYDa2wsAYfbnaN3Imr0YD38eSlPj+Y4XLFiZk",
"/magic.js": "sha384-ABUAQZFAzbkJk/CHxcj+FijlbwBDqXwaFeljqRUgcfIpDAAhwkHcuXCyVGxQI5px",
"/language-switch/": "sha384-NMEjATCzfQY5tY8Ga6VeDvid9WTsbykS2tRx9Vd9Bh6tAznJvcpLhP60O4IjhyDB",
"/language-switch/404/": "sha384-sEK/FcHHZ+JUipk1a7g2JFS7/OVRzx8qpbN+LLlUaAdXYeIp84Y4fas1uCgFHP0+",
"/language-switch/de/": "sha384-0Ubx8ka0N5xM6SvZ69FTgdiFFaqPYGgO6neWScMgCBb2RzvSJgDgvNCjYveu5kHe",
"/robots.txt": "sha384-EvHv8YVb32aNnvUUecOCU8MRA2ptLVqBusyQVK1ByNv9WOpKmKihoQthL7cADdoO",
"/sitemap.xml": "sha384-tlx8vVdOQydvNHYwy3qW1yGvo7Gm3zusN1EJyH/UpkU/G98IZ1WusM8E6VITT+tE"
"/sitemap.xml": "sha384-rJ2d4PMTd9SPY72vIjofoiSVSOfBz+1dZfXYWHWjBxrzVTzm9dUv4bYsERU/068a"
}

0 comments on commit 789418f

Please sign in to comment.