` 设置音频接口。
43 | - 成因 3:如果 JACK 能正常运行(配置没出错,JACK 没有报错,没有 Xrun),也使用了正确的音频接口,请检查音频路由设置是否正确。如果您安装了 `cadence`,则可以前往 `Tools -> Catia` 并检查应用程序播放端口是否连接到了系统。
44 | - 成因 4:如果您的应用程序使用 ALSA 或 PulseAudio,请检查 JACK 桥接器是否已启用,并检查其日志以查看它们是否在建立桥接时遇到困难。如果使用的是 PulseAudio,请确保 `JACK Bridges -> PulseAudio` 处于运行状态,`Stop` 按钮下方有一个 `...` 菜单,请确保您在该处选择 `Playback mode only`。接下来再次点击 `Stop`,此时您会看到它自动重新启动桥接。
45 |
46 | ## JACK 已在运行,但是我的声音散射或失真
47 |
48 | - 成因:您的缓冲区大小太小,设备无法及时处理信号。
49 | - 解决方案:增加缓冲区大小和延迟,或者升级设备硬件。
50 |
51 | # 已知问题
52 |
53 | - 如果您在使用版本低于 `1.9.11rc1-1` 的 JACK,那么它将不会工作。这是我们打包失误造成的,烦请您将 JACK 升级到最新版本。
--------------------------------------------------------------------------------
/content/software/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Software"
3 | template = "softwares.html"
4 | insert_anchor_links = "right"
5 | +++
6 |
7 |
--------------------------------------------------------------------------------
/content/software/_index.zh.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "软件"
3 | template = "softwares.html"
4 | insert_anchor_links = "right"
5 | +++
6 |
7 |
--------------------------------------------------------------------------------
/content/software/firefox/_index.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Firefox"
3 | template = "software.html"
4 | insert_anchor_links = "right"
5 | [extra]
6 | software_category = "Web Browser"
7 | upstream_url = "https://www.mozilla.org/en-US/firefox/new/"
8 | package_site_url = "https://packages.aosc.io/packages/firefox"
9 | +++
10 |
11 | Firefox is a popular open source graphical web browser from Mozilla.
12 |
--------------------------------------------------------------------------------
/content/software/firefox/_index.zh.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Firefox"
3 | template = "software.html"
4 | insert_anchor_links = "right"
5 | [extra]
6 | software_category = "网络浏览器"
7 | upstream_url = "https://www.mozilla.org/en-US/firefox/new/"
8 | package_site_url = "https://packages.aosc.io/packages/firefox"
9 | +++
10 |
11 | Firefox 是 Mozilla 开发的网络浏览器。
12 |
--------------------------------------------------------------------------------
/content/software/firefox/dark-mode.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Global Dark Mode"
3 | [extra]
4 | article_type = "Tricks"
5 | +++
6 |
7 | To enable dark mode throughout Firefox, enter `about:config` and add a field named `ui.systemUsesDarkTheme` as an integer. Set this field to 1 for forced dark and 0 for forced light.
8 |
9 | This field will change the media query result for web pages (you will notice this site goes dark) and also built-in Firefox pages (like the Add-on menu and such).
10 |
--------------------------------------------------------------------------------
/content/software/firefox/dark-mode.zh.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "全局暗色模式"
3 | [extra]
4 | article_type = "技巧"
5 | +++
6 |
7 | 要为 Firefox 启用全局暗色模式,访问 `about:config` 并添加一个叫做 `ui.systemUsesDarkTheme` 的整数型字段并将其赋值为 1。如果你想切换回全局亮色模式,将这个整数项赋值为 0 即可。
8 |
9 | 这个字段将直接影响到网页和 Firefox 内置页面的显示效果(在启用全局暗色模式之后,您会注意到这个网站也会随之变为暗色模式)。
10 |
--------------------------------------------------------------------------------
/content/software/firefox/vaapi.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "Enable VA-API"
3 | [extra]
4 | article_type = "Tricks"
5 | +++
6 |
7 | Starting from 78, Firefox supports VA-API (starting from 80, if you are using Xorg), but the feature is not enabled by default.
8 |
9 | To turn on VA-API capability:
10 |
11 | 0. Make sure VA-API is working in the first place. You can check VA-API status via installing `libva-utils` and run `vainfo`.
12 | 1. Enable `WebRender`. Go to `about:config` and search for `gfx.webrender.all`, set it to `true`. If it doesn’t work, you can open `OpenGL compositor`, Go to `about:config` and search for `layers.acceleration.force-enabled`, set it to `true`.
13 | 2. Also in `about:config`, set `media.ffmpeg.vaapi.enabled` to `true`.
14 | 3. Also in `about:config`, set `media.ffvpx.enabled` to `false`.
15 | 4. If you are using Xorg, set environmental variable `MOZ_X11_EGL=1`
16 | 5. If you are using Wayland, set environmental variable `MOZ_ENABLE_WAYLAND=1`.
17 |
--------------------------------------------------------------------------------
/content/software/firefox/vaapi.zh.md:
--------------------------------------------------------------------------------
1 | +++
2 | title = "启用 VA-API"
3 | [extra]
4 | article_type = "技巧"
5 | +++
6 |
7 | Firefox 78 或更高版本为 VA-API 提供了支持(如果您在使用 Xorg,则是 80 或更高版本),但这个特性在默认情况下没有被启用。
8 |
9 | 要启用 VA-API 支持:
10 |
11 | 0. 首先您要确认 VA-API 可以正常工作。您可以通过安装 `libva-utils` 并运行 `vainfo` 了解工作状态。
12 | 1. 启用 `WebRender`。前往 `about:config` 并将 `gfx.webrender.all` 设置为 `true`。如果这不奏效,您可以打开 `OpenGL compositor`,前往 `about:config` 并将 `layers.acceleration.force-enabled` 设置为 `true`。
13 | 2. 类似地,前往 `about:config` 并将 `media.ffmpeg.vaapi.enabled` 设置为 `true`。
14 | 3. 类似地,前往 `about:config` 并将 `media.ffvpx.enabled` 设置为 `false`。
15 | 4. 如果您在使用 Xorg,设置环境变量 `MOZ_X11_EGL=1`。
16 | 5. 如果您在使用 Wayland,设置环境变量 `MOZ_ENABLE_WAYLAND=1`。
17 |
--------------------------------------------------------------------------------
/pentex.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ##############################################################################
4 | # Get the `pentex` script from https://github.com/neruthes/pentex
5 | ##############################################################################
6 |
7 | ##############################################################################
8 | # ./pentex.sh all
9 | # Build PDF artifacts for all Markdown files.
10 | # ./pentex.sh content/1.md content/2.md
11 | # Build multiple artifacts at once.
12 | ##############################################################################
13 |
14 |
15 | EXTRA_ARGS=(
16 | -V "fontsize:10pt"
17 | -V "geometry:textwidth=43em,vmargin=25mm"
18 | --pdf-engine-opt="--shell-escape"
19 | )
20 |
21 | mkdir -p .dist/pdf
22 |
23 | function remove_header() {
24 | fn="$1"
25 | line_num=$(grep -n -m 2 '+++' "$fn" | tail -n 1 | cut -d ':' -f 1)
26 | # Remove all lines up to and including the second occurrence of "+++"
27 | sed "1,${line_num}d" "$fn"
28 | }
29 |
30 | function makepdf() {
31 | mdpath="$1"
32 | pdfpath="$(sed 's|^content|.dist/pdf|' <<< "$mdpath.pdf")"
33 | url_base="https://wiki.aosc.io/$(cut -d/ -f2- <<< "$mdpath" | sed 's|.md$|/|')"
34 | mkdir -p "$(dirname "$pdfpath")"
35 | md_title="$(grep -m1 'title = ' "$mdpath" | sed 's|^title = ||' | tr -d '"')"
36 | H=.pentex/std.H.tex pentex <(
37 | remove_header "$mdpath"
38 | ) --shift-heading-level-by=0 -o "$pdfpath" \
39 | -V title:"$md_title" \
40 | -V url-base:"$url_base" \
41 | "${EXTRA_ARGS[@]}"
42 | }
43 |
44 |
45 |
46 | case $1 in
47 | all)
48 | find content -name '*.md' -type f | while read -r fn; do
49 | makepdf "$fn"
50 | done
51 | exit 0
52 | ;;
53 | esac
54 |
55 |
56 |
57 | if [[ -e "$2" ]]; then
58 | for fn in "$@"; do
59 | makepdf "$fn"
60 | done
61 | else
62 | makepdf "$1"
63 | fi
64 |
65 |
66 |
--------------------------------------------------------------------------------
/sass/_article.sass:
--------------------------------------------------------------------------------
1 | article
2 | counter-reset: section
3 | h1, h2
4 | &:before
5 | margin-right: .2rem
6 |
7 | // Section number
8 | h1
9 | counter-reset: subsection
10 | &:before
11 | counter-increment: section
12 | content: counter(section) "."
13 | h2
14 | &:before
15 | counter-increment: subsection
16 | content: counter(section) "." counter(subsection) ""
17 |
18 | .wiki-anchor
19 | margin-left: .3em
20 | &:hover
21 | background-color: transparent
22 |
--------------------------------------------------------------------------------
/sass/_color.sass:
--------------------------------------------------------------------------------
1 | // Typography
2 | a
3 | color: #07a
4 | &:hover
5 | background-color: #f2f8fa
6 |
7 | blockquote
8 | color: #484644
9 |
10 | del
11 | color: #979593
12 |
13 | code
14 | background-color: #f3f2f1
15 |
16 | pre
17 | code
18 | // So we can see non-colored text
19 | color: #c0c5ce
20 | background-color: transparent
21 |
22 | table
23 | border-color: #a19f9d
24 | th
25 | color: #797775
26 | border-color: inherit
27 | td
28 | border-color: inherit
29 |
30 | // main
31 | #search
32 | background-color: white
33 | .search-result
34 | border-color: #d2d0ce
35 | .context
36 | color: #605e5c
37 |
38 | input[type="search"]
39 | border-color: #000000
40 | background-color: #ffffff
41 | transition: .2s border-color
42 | &:focus
43 | border-color: #07a
44 | &::placeholder
45 | color: grey
46 | opacity: 1
47 |
48 | nav
49 | .first-level-header
50 | &:before
51 | color: grey
52 |
53 | #back-to-top
54 | background-color: black
55 | color: white
56 |
57 | // article
58 | article
59 | h1, h2
60 | &:before
61 | color: #797775
62 |
63 | .wiki-anchor
64 | color: #d2d0ce
65 | transition: .2s color
66 | &:hover
67 | color: black
68 |
69 | // Index
70 | #grand-header
71 | .description
72 | color: grey
73 |
74 | // components/card
75 | .card.success
76 | color: #498205
77 | fill: #498205
78 | .card.info
79 | color: #0078d4
80 | fill: #0078d4
81 | .card.warning
82 | color: #ffaa44
83 | fill: #ffaa44
84 | .card.danger
85 | color: #d13438
86 | fill: #d13438
87 |
--------------------------------------------------------------------------------
/sass/_color_dark.sass:
--------------------------------------------------------------------------------
1 | @media (prefers-color-scheme: dark)
2 | *
3 | scrollbar-color: #bebbb8 #484644
4 |
5 | body
6 | background-color: #161514
7 | color: #f3f2f1
8 |
9 | a
10 | color: rgb(81, 229, 255)
11 | &:hover
12 | background-color: #002050
13 |
14 | #search
15 | background-color: #161514
16 | .search-result
17 | .context
18 | color: #bebbb8
19 |
20 | input[type="search"]
21 | background-color: #161514
22 | border-color: white
23 | &:focus
24 | border-color: rgb(81, 229, 255)
25 | color: white
26 |
27 | #back-to-top
28 | background-color: #3b3a39
29 | color: white
30 |
31 | blockquote
32 | color: #e1dfdd
33 |
34 | code
35 | background-color: #323130
36 |
37 | table
38 | border-color: #c8c6c4
39 | th
40 | color: #edebe9
41 |
42 | .wiki-anchor
43 | color: #323130
44 | &:hover
45 | color: #d2d0ce
46 |
47 | #grand-header
48 | .description
49 | color: #c8c6c4
50 |
51 | // components/card
52 | .card.success
53 | fill: #00ad56
54 | color: #00ad56
55 | .card.info
56 | fill: #00b7c3
57 | color: #00b7c3
58 | .card.warning
59 | fill: #ffaa44
60 | color: #ffaa44
61 | .card.danger
62 | fill: #da3b01
63 | color: #da3b01
64 |
--------------------------------------------------------------------------------
/sass/_components.sass:
--------------------------------------------------------------------------------
1 | .card
2 | margin: 1em 0
3 | padding: 0 1.5em
4 | border-left: 2px solid
5 | .header
6 | margin-bottom: .25em
7 | font-size: 1.2em
8 | font-weight: 600
9 | font-family: $sansSerifFonts
10 | text-transform: capitalize
11 | // To align them
12 | display: flex
13 | justify-items: center
14 | .symbol
15 | display: inline-block
16 | height: 1em
17 | width: 1em
18 | margin-top: .18em
19 | margin-right: .25em
20 | .content
21 | vertical-align: middle
22 | display: inline-block
23 |
24 |
--------------------------------------------------------------------------------
/sass/_hack.sass:
--------------------------------------------------------------------------------
1 | .big-min-table-cell-width
2 | table
3 | td
4 | min-width: 7em
5 |
6 | // Show underline for links inside info cards
7 | // To increase visibility of them
8 | .card.info
9 | .content
10 | a
11 | text-decoration: underline
12 |
--------------------------------------------------------------------------------
/sass/_index.sass:
--------------------------------------------------------------------------------
1 | #grand-header
2 | display: flex
3 | align-item: center
4 | $grand-height: 3rem
5 | .logo
6 | height: $grand-height
7 | width: $grand-height
8 | .text
9 | font-size: $grand-height
10 | // Magic happens here
11 | display: inline
12 | position: relative
13 | bottom: 10%
14 | .slash
15 | position: relative
16 | bottom: 2%
17 | .logo-text
18 | //
19 | .description
20 | font-style: italic
21 | font-size: .5em
22 | @media screen and (max-width: $smallScreenWidth)
23 | $small-grand-height: 2.2rem
24 | .logo
25 | height: $small-grand-height
26 | width: $small-grand-height
27 | .text
28 | font-size: $small-grand-height
29 |
30 | .search-grand-header
31 | margin-top: .5rem
32 |
33 | .section
34 | margin: 1rem 0
35 | border-top: 2px solid grey
36 | padding-top: .3rem
37 | .marker
38 | position: absolute
39 | margin: 0
40 | padding-top: .3rem
41 | max-width: 9rem
42 |
43 | font-weight: 600
44 | font-size: 1.25em
45 | .content
46 | padding-left: 10rem
47 | padding-top: .4rem
48 | a
49 | display: block
50 | position: relative
51 | // Hack for Zola's Markdown renderer
52 | margin: 0
53 | left: -1rem
54 | p
55 | margin: 0 0 1rem 0
56 | padding-left: 1rem
57 | @media screen and (max-width: $smallScreenWidth)
58 | .marker
59 | position: relative
60 | max-width: 100%
61 | .content
62 | padding: .5rem 0
63 |
--------------------------------------------------------------------------------
/sass/_typography.sass:
--------------------------------------------------------------------------------
1 | body
2 | // Nerdy stuff
3 | text-rendering: optimizeLegibility
4 | font-feature-settings: 'liga' 1
5 | // Stupid Safari...
6 | text-size-adjust: none
7 |
8 | font-size: 1.1rem
9 | font-weight: 400
10 | line-height: 1.5
11 | hyphens: auto
12 |
13 | h1, h2, h3, h4, h5, h6
14 | font-family: $serifFonts
15 |
16 | h1
17 | font-size: 1.4em
18 |
19 | h2
20 | font-size: 1.25em
21 |
22 | h3
23 | font-size: 1.1em
24 |
25 | a
26 | transition-duration: .1s
27 | transition-property: background
28 | text-decoration: none
29 |
30 | // lists
31 | ul
32 | list-style-type: square
33 | li
34 | margin: .2rem 0
35 |
36 | blockquote
37 | margin: 0
38 | padding: .5rem 1.5rem
39 | border-left: 2px solid grey
40 | *
41 | margin: 0
42 |
43 | code
44 | font-family: $monospaceFonts
45 | font-size: .95em
46 |
47 | pre
48 | overflow-x: auto
49 | padding: 1rem
50 | line-height: 1.2
51 | code
52 | // So we can see non-colored text
53 | color: #c0c5ce
54 | background-color: transparent
55 |
56 | // Table formatting
57 | table
58 | display: block
59 | margin: .5rem 0
60 | max-width: 100%
61 | overflow-x: auto
62 | border-collapse: collapse
63 |
64 | th, td
65 | padding: .75rem
66 | min-width: 5em
67 | th
68 | border-width: 0 0 2px 0
69 | border-style: solid
70 | td
71 | border-width: 0 0 1px 0
72 | border-style: solid
73 |
74 | .footnote-definition
75 | .footnote-definition-label
76 | p
77 | display: inline
78 |
--------------------------------------------------------------------------------
/sass/main-en.sass:
--------------------------------------------------------------------------------
1 | $sansSerifFonts : 'Source Sans Pro', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif
2 | $serifFonts : 'Source Serif Pro', 'Noto Serif CJK SC', 'Songti SC', 'Microsoft YaHei', serif
3 | $monospaceFonts : 'Source Code Pro', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', monospace
4 | $singleColWidth: 65rem
5 | $smallScreenWidth: 35rem
6 |
7 | @import "./_main.sass"
8 | @import "./_typography.sass"
9 | @import "./_article.sass"
10 | @import "./_index.sass"
11 | @import "./_components.sass"
12 | @import "./_hack.sass"
13 | @import "./_color.sass"
14 | @import "./_color_dark.sass"
15 |
--------------------------------------------------------------------------------
/sass/main-zh.sass:
--------------------------------------------------------------------------------
1 | $sansSerifFonts : 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif
2 | $serifFonts : 'Noto Serif CJK SC', 'Songti SC', 'Noto Serif SC', 'Microsoft YaHei', serif
3 | $monospaceFonts : 'Source Code Pro', 'Hiragino Sans GB', 'Noto Sans CJK SC', 'Microsoft YaHei', monospace
4 | $singleColWidth: 65rem
5 | $smallScreenWidth: 35rem
6 |
7 | @import "./_main.sass"
8 | @import "./_typography.sass"
9 | @import "./_article.sass"
10 | @import "./_index.sass"
11 | @import "./_components.sass"
12 | @import "./_hack.sass"
13 | @import "./_color.sass"
14 | @import "./_color_dark.sass"
15 |
16 | // Here's the language specifc settings
17 | header
18 | p#description
19 | // We don't do that here
20 | font-style: normal
21 |
22 | #grand-header
23 | .text .description
24 | font-style: normal
25 |
26 | nav
27 | h2
28 | font-weight: 600
29 |
--------------------------------------------------------------------------------
/static/.swcrc:
--------------------------------------------------------------------------------
1 | {
2 | "minify": true,
3 | "jsc": {
4 | "loose": true
5 | },
6 | "env": {
7 | "targets": {
8 | "ie": "8"
9 | }
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/static/icons/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015-present Ionic (http://ionic.io/)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/static/icons/danger.svg:
--------------------------------------------------------------------------------
1 | Nuclear
2 |
--------------------------------------------------------------------------------
/static/icons/info.svg:
--------------------------------------------------------------------------------
1 | Information Circle
--------------------------------------------------------------------------------
/static/icons/success.svg:
--------------------------------------------------------------------------------
1 | Checkmark Circle
--------------------------------------------------------------------------------
/static/icons/warning.svg:
--------------------------------------------------------------------------------
1 | Warning
--------------------------------------------------------------------------------
/static/img/aosc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AOSC-Dev/wiki/5d8186fed78ace89ac49e99d6f0dbbef21804e9d/static/img/aosc.png
--------------------------------------------------------------------------------
/static/img/build_sh.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AOSC-Dev/wiki/5d8186fed78ace89ac49e99d6f0dbbef21804e9d/static/img/build_sh.jpg
--------------------------------------------------------------------------------
/static/zh/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | 404 Not Found - AOSC Wiki
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
29 |
30 |
31 |
32 | 明天,明天,再一个明天,
33 | 一天接着一天地蹑步前进,
34 | 直到最后一秒钟的时间;
35 | 我们所有的昨天,
36 | 不过替傻子们照亮了到死亡的土壤中去的路。
37 | 熄灭了吧,熄灭了吧,短促的烛光!
38 | 人生不过是一个行走的影子,
39 | 一个在舞台上指手划脚的拙劣的伶人,
40 | 登场片刻,就在无声无臭中悄然退下;
41 | 它是一个愚人所讲的故事,
42 | 充满着喧哗和骚动,却找不到一点意义。
43 |
44 |
45 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/templates/404.html:
--------------------------------------------------------------------------------
1 | {% import "macros.html" as macros %}
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{ macros::head(title="404 Not Found", url="#", description="Page Not Found") }}
14 |
15 |
16 | {# For Netsurf #}
17 |
18 |
19 |
20 |
21 | 404
22 | Page Not Found
23 |
24 |
25 |
26 |
27 | Tomorrow, and tomorrow, and tomorrow,
28 | Creeps in this petty pace from day to day,
29 | To the last syllable of recorded time;
30 | And all our yesterdays have lighted fools
31 | The way to dusty death. Out, out, brief candle!
32 | Life's but a walking shadow, a poor player,
33 | That struts and frets his hour upon the stage,
34 | And then is heard no more. It is a tale
35 | Told by an idiot, full of sound and fury,
36 | Signifying nothing.
37 |
38 |
39 |
40 |
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/templates/anchor-link.html:
--------------------------------------------------------------------------------
1 | §
2 |
--------------------------------------------------------------------------------
/templates/base.html:
--------------------------------------------------------------------------------
1 | {% import "macros.html" as macros %}
2 |
3 |
4 |
5 |
6 |
7 |
8 | {% if lang == "zh" %}
9 |
10 | {% else %}
11 |
12 | {% endif %}
13 |
14 |
15 |
16 | {% block head %}
17 | {{ macros::head(title=trans(key="index_page", lang=lang), url=config.base_url, description=config.description) }}
18 | {% endblock head %}
19 |
20 |
21 | {# For Netsurf #}
22 |
23 |
24 |
25 | {% block search %}
26 |
27 | {% set search_msg = trans(key="search_placeholder", lang=lang) %}
28 |
29 |
30 |
31 |
32 |
33 | {% endblock search %}
34 |
35 |
36 | {% block header %}
37 | {% endblock header %}
38 |
39 |
40 |
41 | {% block main %}
42 | {% endblock main %}
43 |
44 |
45 | ↑
46 |
47 |
48 |
49 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/templates/index.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {# Default head block is good enough here. #}
4 |
5 | {% block search %}
6 |
7 | {% set search_msg = trans(key="search_placeholder", lang=lang) %}
8 |
9 |
10 |
11 |
12 |
13 | {% endblock search %}
14 |
15 | {% block header %}
16 |
17 |
18 |
19 |
20 | / {{ config.extra.logo_text }}
21 | {{ trans(key="description", lang=lang) }}
22 |
23 |
24 |
25 | {% endblock header %}
26 |
27 | {% block main %}
28 | {{ section.content | safe }}
29 |
30 |
31 |
37 |
38 | {{ trans(key="on_this_wiki", lang=lang) }}
39 | {% for subsection_path in section.subsections %}
40 | {% set subsection = get_section(path=subsection_path, metadata_only=true) %}
41 |
42 | >
43 | {{ subsection.title }}
44 |
45 | {% endfor %}
46 |
47 | {% for post in section.pages %}
48 | {{ post.title }}
49 | {% endfor %}
50 |
51 | {% endblock main %}
52 |
--------------------------------------------------------------------------------
/templates/macros.html:
--------------------------------------------------------------------------------
1 | {% macro head(title, url, description) %}
2 | {{ title }} - {{ trans(key="title", lang=lang) }}
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {% endmacro head %}
12 |
13 | {% macro language_select(source) %}
14 |
15 | {% if source.translations | length > 1 %}
16 | {{ trans(key="also_available_in", lang=lang) }}
17 | {% for t in source.translations %}
18 | {% if t.lang != lang %}
19 |
{{ trans(key=t.lang, lang=lang) }}
20 | {% endif %}
21 | {% endfor %}
22 | {% endif %}
23 |
24 | {% endmacro language_select %}
25 |
26 |
--------------------------------------------------------------------------------
/templates/page.html:
--------------------------------------------------------------------------------
1 | {% import "macros.html" as macros %}
2 |
3 | {% extends "base.html" %}
4 |
5 | {% block head %}
6 | {{ macros::head(title=page.title, url=page.permalink, description=page.description) }}
7 | {% endblock head %}
8 |
9 | {% block header %}
10 |
11 | {# Navigation #}
12 | {% for ancestor in page.ancestors %}
13 | {% set section = get_section(path=ancestor, metadata_only=true) %}
14 |
{{ section.title }}
15 | {% if not loop.last %}
16 |
/
17 | {% else %}
18 |
/
19 |
.
20 | {% endif %}
21 | {% endfor %}
22 |
23 | {{ macros::language_select(source=page, lang=page.lang) }}
24 |
25 |
26 | {{ page.title }}
27 | {{ page.description }}
28 | {% endblock header %}
29 |
30 | {% block main %}
31 |
32 | {{ trans(key="on_this_page", lang=page.lang) }}
33 | {% for header in page.toc %}
34 |
35 |
40 | {% endfor %}
41 |
42 |
43 | {% if page.extra.page_hack %}
44 |
47 | {% else %}
48 | {{ page.content | safe }}
49 | {% endif %}
50 |
51 | {% endblock main %}
52 |
--------------------------------------------------------------------------------
/templates/shortcodes/section.html:
--------------------------------------------------------------------------------
1 |
2 |
{{ name }}
3 |
4 | {{ body | markdown | safe }}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/templates/software.html:
--------------------------------------------------------------------------------
1 | {% import "macros.html" as macros %}
2 | {% extends "section.html" %}
3 |
4 | {% block main %}
5 | {{ section.content | safe }}
6 |
7 | {# Get a list of all article types #}
8 | {% set_global article_types = [] %}
9 | {% for page in section.pages %}
10 | {% if article_types is not containing(page.extra.article_type) %}
11 | {% set_global article_types = article_types | concat(with=page.extra.article_type) %}
12 | {% endif %}
13 | {% endfor %}
14 |
15 | {# Then list them #}
16 | {% for type in article_types %}
17 | {{ type }}
18 |
19 | {% for page in section.pages %}
20 | {% if page.extra.article_type == type %}
21 |
22 | {{ page.title }}
23 |
24 | {% endif %}
25 | {% endfor %}
26 |
27 | {% endfor %}
28 |
29 | {# Navigation #}
30 |
31 | {% if section.extra.upstream_url %}
32 | Upstream
33 | {% endif %}
34 |
35 | {% if section.extra.package_site_url %}
36 | AOSC Package
37 | {% endif %}
38 |
39 |
40 |
41 | {{ trans(key="categories", lang=lang) }}
42 | {% for type in article_types %}
43 | {{ type }}
44 | {% endfor %}
45 |
46 | {% endblock %}
47 |
--------------------------------------------------------------------------------
/templates/softwares.html:
--------------------------------------------------------------------------------
1 | {% import "macros.html" as macros %}
2 | {% extends "section.html" %}
3 |
4 | {% block main %}
5 | {{ section.content | safe }}
6 |
7 | {# Get a list of all software types #}
8 | {% set_global software_categories = [] %}
9 | {% for subsection in section.subsections %}
10 | {% set section = get_section(path=subsection, metadata_only=true) %}
11 | {% if software_categories is not containing(section.extra.software_category) %}
12 | {% set_global software_categories = software_categories | concat(with=section.extra.software_category) %}
13 | {% endif %}
14 | {% endfor %}
15 |
16 | {# Then we can list them one by one #}
17 | {% for category in software_categories %}
18 | {# The grand title first #}
19 | {{ category }}
20 |
21 | {% for subsection in section.subsections %}
22 | {% set section = get_section(path=subsection, metadata_only=true) %}
23 | {% if section.extra.software_category == category %}
24 |
25 | {{ section.title }}
26 |
27 | {% endif %}
28 | {% endfor %}
29 |
30 | {% endfor %}
31 |
32 | {# Navigation #}
33 |
34 | {{ trans(key="categories", lang=lang) }}
35 | {% for category in software_categories %}
36 | {{ category }}
37 | {% endfor %}
38 |
39 | {% endblock %}
40 |
--------------------------------------------------------------------------------
/templates/tags/list.html:
--------------------------------------------------------------------------------
1 | {% import "macros.html" as macros %}
2 | {% extends "base.html" %}
3 |
4 | {% block head %}
5 | {{ macros::head(title="Tags", url=current_url, description=config.description) }}
6 | {% endblock head %}
7 |
8 | {% block header %}
9 |
14 | {% endblock header %}
15 |
16 | {% block main %}
17 |
18 | Tags
19 | {% for tag in terms %}
20 | {{ tag.name }}
21 | {% endfor %}
22 |
23 |
24 | {# Acutal tags #}
25 |
26 | {% for tag in terms %}
27 | {{ tag.name }}
28 |
29 | {% for page in tag.pages %}
30 |
31 | {{ page.title }}
32 |
33 | {% endfor %}
34 |
35 | {% endfor %}
36 |
37 | {% endblock main %}
38 |
--------------------------------------------------------------------------------
/templates/tags/single.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block head %}
4 | {{ macros::head(title="Tag: " ~ term.name, url=current_url, description=config.description) }}
5 | {% endblock head %}
6 |
7 | {% block header %}
8 |
20 | Pages with tag: {{ term.name }}
21 |
22 | {# Acutal pages #}
23 |
24 | {% for page in term.pages %}
25 |
26 | {{ page.title }}
27 |
28 | {% endfor %}
29 |
30 |
31 | {% endblock header %}
32 |
33 |
--------------------------------------------------------------------------------