mirror of https://github.com/freeCodeCamp/devdocs
parent
0873162a7a
commit
ace8f4775d
@ -1,9 +1,15 @@
|
||||
notice = (text) -> """<p class="_notice-text">#{_ text}</p>"""
|
||||
|
||||
app.templates.singleDocNotice = (doc) ->
|
||||
notice """ You're browsing the #{doc.fullName} documentation. To browse all docs, go to
|
||||
<a href="//#{app.config.production_host}" target="_top">#{app.config.production_host}</a> (or press <code>esc</code>). """
|
||||
notice
|
||||
en: """ You're browsing the #{doc.fullName} documentation. To browse all docs, go to
|
||||
<a href="//#{app.config.production_host}" target="_top">#{app.config.production_host}</a> (or press <code>esc</code>). """
|
||||
ja: """ #{doc.fullName} をブラウズしています。すべてのドキュメントを見るには
|
||||
<a href="//#{app.config.production_host}" target="_top">#{app.config.production_host}</a> へアクセスしてください。(または<code>esc</code>を押してください) """
|
||||
|
||||
app.templates.disabledDocNotice = ->
|
||||
notice """ <strong>This documentation is disabled.</strong>
|
||||
To enable it, go to <a href="/settings" class="_notice-link">Preferences</a>. """
|
||||
notice
|
||||
en: """ <strong>This documentation is disabled.</strong>
|
||||
To enable it, go to <a href="/settings" class="_notice-link">Preferences</a>. """
|
||||
ja: """ <strong>このドキュメントは無効です。</strong>
|
||||
有効にするには<a href="/settings" class="_notice-link">設定</a>.にアクセスしてください。"""
|
||||
|
@ -1,44 +1,83 @@
|
||||
app.templates.settingsPage = (settings) -> """
|
||||
<h1 class="_lined-heading">Preferences</h1>
|
||||
app.templates.settingsPage = (settings) -> _
|
||||
en: """
|
||||
<h1 class="_lined-heading">Preferences</h1>
|
||||
|
||||
<div class="_settings-fieldset">
|
||||
<h2 class="_settings-legend">General:</h2>
|
||||
<div class="_settings-fieldset">
|
||||
<h2 class="_settings-legend">General:</h2>
|
||||
|
||||
<div class="_settings-inputs">
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="dark" value="1"#{if settings.dark then ' checked' else ''}>Enable dark theme
|
||||
</label>
|
||||
<label class="_settings-label _setting-max-width">
|
||||
<input type="checkbox" form="settings" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>Enable fixed-width layout
|
||||
</label>
|
||||
<label class="_settings-label _hide-on-mobile">
|
||||
<input type="checkbox" form="settings" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>Automatically hide and show the sidebar
|
||||
<small>Tip: drag the edge of the sidebar to resize it.</small>
|
||||
</label>
|
||||
<div class="_settings-inputs">
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="dark" value="1"#{if settings.dark then ' checked' else ''}>Enable dark theme
|
||||
</label>
|
||||
<label class="_settings-label _setting-max-width">
|
||||
<input type="checkbox" form="settings" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>Enable fixed-width layout
|
||||
</label>
|
||||
<label class="_settings-label _hide-on-mobile">
|
||||
<input type="checkbox" form="settings" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>Automatically hide and show the sidebar
|
||||
<small>Tip: drag the edge of the sidebar to resize it.</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="_settings-fieldset _hide-on-mobile">
|
||||
<h2 class="_settings-legend">Scrolling:</h2>
|
||||
<div class="_settings-fieldset _hide-on-mobile">
|
||||
<h2 class="_settings-legend">Scrolling:</h2>
|
||||
|
||||
<div class="_settings-inputs">
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="smoothScroll" value="1"#{if settings.smoothScroll then ' checked' else ''}>Use smooth scrolling
|
||||
</label>
|
||||
<label class="_settings-label _setting-native-scrollbar">
|
||||
<input type="checkbox" form="settings" name="layout" value="_native-scrollbars"#{if settings['_native-scrollbars'] then ' checked' else ''}>Use native scrollbars
|
||||
</label>
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="arrowScroll" value="1"#{if settings.arrowScroll then ' checked' else ''}>Use arrow keys to scroll the main content area
|
||||
<small>With this checked, use <code class="_label">alt</code> + <code class="_label">↑</code><code class="_label">↓</code><code class="_label">←</code><code class="_label">→</code> to navigate the sidebar.</small>
|
||||
</label>
|
||||
<div class="_settings-inputs">
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="smoothScroll" value="1"#{if settings.smoothScroll then ' checked' else ''}>Use smooth scrolling
|
||||
</label>
|
||||
<label class="_settings-label _setting-native-scrollbar">
|
||||
<input type="checkbox" form="settings" name="layout" value="_native-scrollbars"#{if settings['_native-scrollbars'] then ' checked' else ''}>Use native scrollbars
|
||||
</label>
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="arrowScroll" value="1"#{if settings.arrowScroll then ' checked' else ''}>Use arrow keys to scroll the main content area
|
||||
<small>With this checked, use <code class="_label">alt</code> + <code class="_label">↑</code><code class="_label">↓</code><code class="_label">←</code><code class="_label">→</code> to navigate the sidebar.</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="_hide-on-mobile">
|
||||
<button type="button" class="_btn" data-action="export">Export</button>
|
||||
<label class="_btn _file-btn"><input type="file" form="settings" name="import" accept=".json">Import</label>
|
||||
<p class="_hide-on-mobile">
|
||||
<button type="button" class="_btn" data-action="export">Export</button>
|
||||
<label class="_btn _file-btn"><input type="file" form="settings" name="import" accept=".json">Import</label>
|
||||
|
||||
<p>
|
||||
<button type="button" class="_btn-link _reset-btn" data-behavior="reset">Reset all preferences and data</button>
|
||||
"""
|
||||
<p>
|
||||
<button type="button" class="_btn-link _reset-btn" data-behavior="reset">Reset all preferences and data</button>
|
||||
"""
|
||||
ja: """
|
||||
<h1 class="_lined-heading">設定</h1>
|
||||
<div class="_settings-fieldset">
|
||||
<h2 class="_settings-legend">一般:</h2>
|
||||
<div class="_settings-inputs">
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="dark" value="1"#{if settings.dark then ' checked' else ''}>ダークテーマを有効にする
|
||||
</label>
|
||||
<label class="_settings-label _setting-max-width">
|
||||
<input type="checkbox" form="settings" name="layout" value="_max-width"#{if settings['_max-width'] then ' checked' else ''}>fixed-width レイアウトを有効にする
|
||||
</label>
|
||||
<label class="_settings-label _hide-on-mobile">
|
||||
<input type="checkbox" form="settings" name="layout" value="_sidebar-hidden"#{if settings['_sidebar-hidden'] then ' checked' else ''}>サイドバーを自動で開閉する
|
||||
<small>Tip:サイドバーのふちをドラッグすると、サイズ調整できます。</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="_settings-fieldset _hide-on-mobile">
|
||||
<h2 class="_settings-legend">スクロール:</h2>
|
||||
<div class="_settings-inputs">
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="smoothScroll" value="1"#{if settings.smoothScroll then ' checked' else ''}>スムーズスクロールを使用する
|
||||
</label>
|
||||
<label class="_settings-label _setting-native-scrollbar">
|
||||
<input type="checkbox" form="settings" name="layout" value="_native-scrollbars"#{if settings['_native-scrollbars'] then ' checked' else ''}>本来のスクロールバーを使用する
|
||||
</label>
|
||||
<label class="_settings-label">
|
||||
<input type="checkbox" form="settings" name="arrowScroll" value="1"#{if settings.arrowScroll then ' checked' else ''}>矢印キーを使用してメインコンテンツエリアをスクロールする
|
||||
<small>With this checked, use <code class="_label">alt</code> + <code class="_label">↑</code><code class="_label">↓</code><code class="_label">←</code><code class="_label">→</code> to navigate the sidebar.</small>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<p class="_hide-on-mobile">
|
||||
<button type="button" class="_btn" data-action="export">エクスポート</button>
|
||||
<label class="_btn _file-btn"><input type="file" form="settings" name="import" accept=".json">インポート</label>
|
||||
<p>
|
||||
<button type="button" class="_btn-link _reset-btn" data-behavior="reset">すべての設定とデータをリセットする</button>
|
||||
"""
|
||||
|
@ -1,10 +1,21 @@
|
||||
app.templates.tipKeyNav = """
|
||||
<p class="_notif-text">
|
||||
<strong>ProTip</strong>
|
||||
<span class="_notif-info">(click to dismiss)</span>
|
||||
<p class="_notif-text">
|
||||
Hit <code class="_label">↓</code> <code class="_label">↑</code> <code class="_label">←</code> <code class="_label">→</code> to navigate the sidebar.<br>
|
||||
Hit <code class="_label">space / shift space</code>, <code class="_label">alt ↓/↑</code> or <code class="_label">shift ↓/↑</code> to scroll the page.
|
||||
<p class="_notif-text">
|
||||
<a href="/help#shortcuts" class="_notif-link">See all keyboard shortcuts</a>
|
||||
"""
|
||||
app.templates.tipKeyNav =
|
||||
en: """
|
||||
<p class="_notif-text">
|
||||
<strong>ProTip</strong>
|
||||
<span class="_notif-info">(click to dismiss)</span>
|
||||
<p class="_notif-text">
|
||||
Hit <code class="_label">↓</code> <code class="_label">↑</code> <code class="_label">←</code> <code class="_label">→</code> to navigate the sidebar.<br>
|
||||
Hit <code class="_label">space / shift space</code>, <code class="_label">alt ↓/↑</code> or <code class="_label">shift ↓/↑</code> to scroll the page.
|
||||
<p class="_notif-text">
|
||||
<a href="/help#shortcuts" class="_notif-link">See all keyboard shortcuts</a>
|
||||
"""
|
||||
ja: """
|
||||
<p class="_notif-text">
|
||||
<strong>ProTip</strong>
|
||||
<span class="_notif-info">(クリックすると退出します)</span>
|
||||
<p class="_notif-text">
|
||||
Hit <code class="_label">↓</code> <code class="_label">↑</code> <code class="_label">←</code> <code class="_label">→</code> サイドバーを操作します。<br>
|
||||
Hit <code class="_label">space / shift space</code>, <code class="_label">alt ↓/↑</code> または <code class="_label">shift ↓/↑</code> で、ページをスクロールします。
|
||||
<p class="_notif-text">
|
||||
<a href="/help#shortcuts" class="_notif-link">すべてのキーボードショートカットを見る</a>
|
||||
"""
|
||||
|
Loading…
Reference in new issue