mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
Merge pull request #2567 from ZhenShuo2021/feat/color-theme
✨ Feat: add new color schemes "github" and "one-light"
This commit is contained in:
@@ -21,7 +21,6 @@ npx blowfish-tools
|
||||
```
|
||||
{{< /alert >}}
|
||||
|
||||
|
||||
I file di configurazione forniti con Blowfish contengono tutte le possibili impostazioni riconosciute dal tema. Per impostazione predefinita, molti di questi sono commentati ma puoi semplicemente decommentarli per attivare o modificare una funzionalità specifica.
|
||||
|
||||
## Configurazione di base
|
||||
@@ -60,63 +59,86 @@ links = [
|
||||
{ twitter = "https://twitter.com/username" }
|
||||
]
|
||||
```
|
||||
|
||||
La configurazione `[params.author]` determina il modo in cui le informazioni sull'autore vengono visualizzate sul sito web. L'immagine deve essere posizionata nella cartella `assets/`. I link verranno visualizzati nell'ordine in cui sono elencati.
|
||||
|
||||
Se hai bisogno di ulteriori dettagli, ulteriori informazioni su ciascuna di queste opzioni di configurazione sono trattate nella sezione [Configurazione]({{< ref "configuration" >}}).
|
||||
|
||||
## Schemi di colori
|
||||
|
||||
Blowfish viene fornito con una serie di schemi di colori già pronti. Per cambiare lo schema, è sufficiente impostare il parametro del tema `colorScheme`. Le opzioni valide sono `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, and`slate`.
|
||||
Blowfish viene fornito con una serie di schemi di colori già pronti. Per cambiare lo schema, è sufficiente impostare il parametro del tema `colorScheme`. Le opzioni valide sono `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, `slate`, `github` and `one-light`.
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
|
||||
colorScheme = "blowfish"
|
||||
```
|
||||
|
||||
Blowfish definisce una palette di tre colori che viene utilizzata in tutto il tema. Ogni colore principale contiene dieci sfumature basate sui colori inclusi in [Tailwind](https://tailwindcss.com/docs/customizing-colors#color-palette-reference). I tre colori principali sono utilizzati per l'intestazione, il piè di pagina e i colori d'accento. Ecco i colori per ogni schema:
|
||||
|
||||
#### Blowfish (default)
|
||||
### Blowfish (default)
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Avocado
|
||||
### Avocado
|
||||
|
||||
{{< swatches "#78716c" "#84cc16" "#10b981" >}}
|
||||
|
||||
#### Fire
|
||||
### Fire
|
||||
|
||||
{{< swatches "#78716c" "#f97316" "#f43f5e" >}}
|
||||
|
||||
#### Ocean
|
||||
### Ocean
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Forest
|
||||
### Forest
|
||||
|
||||
{{< swatches "#658c86" "#3bf5df" "#06d45c" >}}
|
||||
|
||||
#### Princess
|
||||
### Princess
|
||||
|
||||
{{< swatches "#8c658c" "#f53bf2" "#7706d4" >}}
|
||||
|
||||
#### Neon
|
||||
### Neon
|
||||
|
||||
{{< swatches "#8338ec" "#ff006e" "#3a86ff" >}}
|
||||
|
||||
#### Bloody
|
||||
### Bloody
|
||||
|
||||
{{< swatches "#d90429" "#8d99ae" "#457b9d" >}}
|
||||
|
||||
#### Terminal
|
||||
### Terminal
|
||||
|
||||
{{< swatches "#004b23" "#38b000" "#1a759f" >}}
|
||||
|
||||
#### Marvel
|
||||
### Marvel
|
||||
|
||||
{{< swatches "#2541b2" "#d81159" "#ffbc42" >}}
|
||||
|
||||
#### Noir
|
||||
### Noir
|
||||
|
||||
{{< swatches "#5c6b73" "#9db4c0" "#00a5cf" >}}
|
||||
|
||||
#### Autumn
|
||||
### Autumn
|
||||
|
||||
{{< swatches "#0a9396" "#ee9b00" "#bb3e03" >}}
|
||||
|
||||
#### Congo
|
||||
### Congo
|
||||
|
||||
{{< swatches "#71717a" "#8b5cf6" "#d946ef" >}}
|
||||
|
||||
#### Slate
|
||||
### Slate
|
||||
|
||||
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
|
||||
|
||||
### Github
|
||||
|
||||
{{< swatches "#64748b" "#0092ff" "#f54728" >}}
|
||||
|
||||
### One-Light
|
||||
|
||||
{{< swatches "#646464" "#0070cc" "#20a077" >}}
|
||||
|
||||
Sebbene questi siano gli schemi predefiniti, è possibile crearne di propri. Per maggiori informazioni, consultare la sezione [Personalizzazione avanzata]({{< ref "advanced-customisation#colour-schemes" >}}).
|
||||
|
||||
@@ -145,8 +167,8 @@ Ecco una rapida panoramica di un progetto base di Blowfish. Tutti i contenuti so
|
||||
└── themes
|
||||
└── blowfish
|
||||
```
|
||||
È importante avere una conoscenza approfondita di come Hugo si aspetta che il contenuto sia organizzato, poiché il tema è progettato per sfruttare appieno i pacchetti di pagine di Hugo. Si consiglia di leggere i [documentazione ufficiale di Hugo](https://gohugo.io/content-management/organization/) per maggiori informazioni.
|
||||
|
||||
È importante avere una conoscenza approfondita di come Hugo si aspetta che il contenuto sia organizzato, poiché il tema è progettato per sfruttare appieno i pacchetti di pagine di Hugo. Si consiglia di leggere i [documentazione ufficiale di Hugo](https://gohugo.io/content-management/organization/) per maggiori informazioni.
|
||||
|
||||
Blowfish è flessibile anche per quanto riguarda le tassonomie. Alcuni preferiscono usare _tags_ e _categories_ per raggruppare i loro contenuti, altri preferiscono usare _topics_.
|
||||
|
||||
@@ -168,7 +190,6 @@ Blowfish dispone di due menu che possono essere personalizzati per adattarsi al
|
||||
|
||||
Entrambi i menu sono configurati nel file `menus.en.toml`. Simile al file di configurazione delle lingue, se desideri utilizzare un'altra lingua, rinomina questo file e sostituisci `en` con il codice della lingua che si vuole utilizzare.
|
||||
|
||||
|
||||
```toml
|
||||
# config/_default/menus.toml
|
||||
|
||||
@@ -213,7 +234,6 @@ Entrambi i menu sono completamente opzionali e possono essere commentati se non
|
||||
|
||||
Il tema supporta anche i menu nidificati. Per usarli devi solo definire una voce genitore in `menu.toml` e i suoi sottomenu utilizzando il parametro `parent` per fare riferimento al genitore. Tutte le proprietà possono essere utilizzate per i sottomenu. `pageRef` e `url` possono essere utilizzati anche nella voce principale. I menu nidificati sono disponibili solo nel menu principale e non nel footer.
|
||||
|
||||
|
||||
```toml
|
||||
# config/_default/menus.toml
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ links = [
|
||||
|
||||
## カラースキーム
|
||||
|
||||
Blowfish には、すぐに使用できる多くのカラースキームが付属しています。スキームを変更するには、`colorScheme` テーマパラメータを設定するだけです。有効なオプションは、`blowfish` (デフォルト)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo`、`slate` です。
|
||||
Blowfish には、すぐに使用できる多くのカラースキームが付属しています。スキームを変更するには、`colorScheme` テーマパラメータを設定するだけです。有効なオプションは、`blowfish` (デフォルト)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo`、`slate`、`github`、`one-light` です。
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
@@ -73,48 +73,70 @@ colorScheme = "blowfish"
|
||||
|
||||
Blowfish は、テーマ全体で使用される3色のパレットを定義しています。各メインカラーには、[Tailwind](https://tailwindcss.com/docs/customizing-colors#color-palette-reference) に含まれる色に基づいた10の色合いが含まれています。3つのメインカラーは、ヘッダー、フッター、およびアクセントカラーに使用されます。各スキームの色は次のとおりです。
|
||||
|
||||
#### Blowfish (デフォルト)
|
||||
### Blowfish (デフォルト)
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Avocado
|
||||
### Avocado
|
||||
|
||||
{{< swatches "#78716c" "#84cc16" "#10b981" >}}
|
||||
|
||||
#### Fire
|
||||
### Fire
|
||||
|
||||
{{< swatches "#78716c" "#f97316" "#f43f5e" >}}
|
||||
|
||||
#### Ocean
|
||||
### Ocean
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Forest
|
||||
### Forest
|
||||
|
||||
{{< swatches "#658c86" "#3bf5df" "#06d45c" >}}
|
||||
|
||||
#### Princess
|
||||
### Princess
|
||||
|
||||
{{< swatches "#8c658c" "#f53bf2" "#7706d4" >}}
|
||||
|
||||
#### Neon
|
||||
### Neon
|
||||
|
||||
{{< swatches "#8338ec" "#ff006e" "#3a86ff" >}}
|
||||
|
||||
#### Bloody
|
||||
### Bloody
|
||||
|
||||
{{< swatches "#d90429" "#8d99ae" "#457b9d" >}}
|
||||
|
||||
#### Terminal
|
||||
### Terminal
|
||||
|
||||
{{< swatches "#004b23" "#38b000" "#1a759f" >}}
|
||||
|
||||
#### Marvel
|
||||
### Marvel
|
||||
|
||||
{{< swatches "#2541b2" "#d81159" "#ffbc42" >}}
|
||||
|
||||
#### Noir
|
||||
### Noir
|
||||
|
||||
{{< swatches "#5c6b73" "#9db4c0" "#00a5cf" >}}
|
||||
|
||||
#### Autumn
|
||||
### Autumn
|
||||
|
||||
{{< swatches "#0a9396" "#ee9b00" "#bb3e03" >}}
|
||||
|
||||
#### Congo
|
||||
### Congo
|
||||
|
||||
{{< swatches "#71717a" "#8b5cf6" "#d946ef" >}}
|
||||
|
||||
#### Slate
|
||||
### Slate
|
||||
|
||||
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
|
||||
|
||||
### Github
|
||||
|
||||
{{< swatches "#64748b" "#0092ff" "#f54728" >}}
|
||||
|
||||
### One-Light
|
||||
|
||||
{{< swatches "#646464" "#0070cc" "#20a077" >}}
|
||||
|
||||
これらはデフォルトのスキームですが、独自のスキームを作成することもできます。詳細については、[高度なカスタマイズ]({{< ref "advanced-customisation#colour-schemes" >}})セクションを参照してください。
|
||||
|
||||
## コンテンツの整理
|
||||
|
||||
@@ -63,7 +63,7 @@ If you need extra detail, further information about each of these configuration
|
||||
|
||||
## Colour schemes
|
||||
|
||||
Blowfish ships with a number of colour schemes out of the box. To change the scheme, simply set the `colorScheme` theme parameter. Valid options are `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, and`slate`.
|
||||
Blowfish ships with a number of colour schemes out of the box. To change the scheme, simply set the `colorScheme` theme parameter. Valid options are `blowfish` (default), `avocado`, `fire`, `ocean`, `forest`, `princess`, `neon`, `bloody`, `terminal`, `marvel`, `noir`, `autumn`, `congo`, `slate`, `github` and `one-light`.
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
@@ -129,6 +129,14 @@ Blowfish defines a three-colour palette that is used throughout the theme. Each
|
||||
|
||||
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
|
||||
|
||||
### Github
|
||||
|
||||
{{< swatches "#64748b" "#0092ff" "#f54728" >}}
|
||||
|
||||
### One-Light
|
||||
|
||||
{{< swatches "#646464" "#0070cc" "#20a077" >}}
|
||||
|
||||
Although these are the default schemes, you can also create your own. Refer to the [Advanced Customisation]({{< ref "advanced-customisation#colour-schemes" >}}) section for details.
|
||||
|
||||
## Organising content
|
||||
|
||||
@@ -21,7 +21,6 @@ npx blowfish-tools
|
||||
```
|
||||
{{< /alert >}}
|
||||
|
||||
|
||||
Blowfish 中的配置文件中包含了主题需要的所有可能的设置选项。但默认情况下大多数设置都是被注释的,你只需要取消注释就可以激活或者修改设定选项。
|
||||
|
||||
## 基础设置
|
||||
@@ -64,7 +63,7 @@ links = [
|
||||
|
||||
## 颜色方案
|
||||
|
||||
Blowfish 主题中包含了数个颜色方案,这些方案可以快速使用。如果需要修改方案,只需要简单的设置 `colorScheme` 参数即可。`colorScheme` 可选的值有`blowfish` (默认)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo`和`slate`。
|
||||
Blowfish 主题中包含了数个颜色方案,这些方案可以快速使用。如果需要修改方案,只需要简单的设置 `colorScheme` 参数即可。`colorScheme` 可选的值有`blowfish` (默认)、`avocado`、`fire`、`ocean`、`forest`、`princess`、`neon`、`bloody`、`terminal`、`marvel`、`noir`、`autumn`、`congo`、`slate`、`github` 和 `one-light`。
|
||||
|
||||
```toml
|
||||
# config/_default/params.toml
|
||||
@@ -74,48 +73,70 @@ colorScheme = "blowfish"
|
||||
|
||||
Blowfish 定义了一种由三种主色调构成的配色方案,每种主色调包含了10种子色调,10个色调是借鉴 [Tailwind](https://tailwindcss.com/docs/customizing-colors#color-palette-reference) 中的定义。Blowfish 中定义了多个预置的三色主题,以便在整个主题中使用。
|
||||
|
||||
#### Blowfish(默认)
|
||||
### Blowfish(默认)
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Avocado
|
||||
### Avocado
|
||||
|
||||
{{< swatches "#78716c" "#84cc16" "#10b981" >}}
|
||||
|
||||
#### Fire
|
||||
### Fire
|
||||
|
||||
{{< swatches "#78716c" "#f97316" "#f43f5e" >}}
|
||||
|
||||
#### Ocean
|
||||
### Ocean
|
||||
|
||||
{{< swatches "#64748b" "#3b82f6" "#06b6d4" >}}
|
||||
|
||||
#### Forest
|
||||
### Forest
|
||||
|
||||
{{< swatches "#658c86" "#3bf5df" "#06d45c" >}}
|
||||
|
||||
#### Princess
|
||||
### Princess
|
||||
|
||||
{{< swatches "#8c658c" "#f53bf2" "#7706d4" >}}
|
||||
|
||||
#### Neon
|
||||
### Neon
|
||||
|
||||
{{< swatches "#8338ec" "#ff006e" "#3a86ff" >}}
|
||||
|
||||
#### Bloody
|
||||
### Bloody
|
||||
|
||||
{{< swatches "#d90429" "#8d99ae" "#457b9d" >}}
|
||||
|
||||
#### Terminal
|
||||
### Terminal
|
||||
|
||||
{{< swatches "#004b23" "#38b000" "#1a759f" >}}
|
||||
|
||||
#### Marvel
|
||||
### Marvel
|
||||
|
||||
{{< swatches "#2541b2" "#d81159" "#ffbc42" >}}
|
||||
|
||||
#### Noir
|
||||
### Noir
|
||||
|
||||
{{< swatches "#5c6b73" "#9db4c0" "#00a5cf" >}}
|
||||
|
||||
#### Autumn
|
||||
### Autumn
|
||||
|
||||
{{< swatches "#0a9396" "#ee9b00" "#bb3e03" >}}
|
||||
|
||||
#### Congo
|
||||
### Congo
|
||||
|
||||
{{< swatches "#71717a" "#8b5cf6" "#d946ef" >}}
|
||||
|
||||
#### Slate
|
||||
### Slate
|
||||
|
||||
{{< swatches "#6B7280" "#64748b" "#6B7280" >}}
|
||||
|
||||
### Github
|
||||
|
||||
{{< swatches "#64748b" "#0092ff" "#f54728" >}}
|
||||
|
||||
### One-Light
|
||||
|
||||
{{< swatches "#646464" "#0070cc" "#20a077" >}}
|
||||
|
||||
这些是内置的配色方案,你也可以去自定义这一部分,请参阅 [高级自定义]({{< ref "advanced-customisation#colour-schemes" >}}) 。
|
||||
|
||||
## 整理内容
|
||||
@@ -269,4 +290,3 @@ Blowfish 还支持在文章和列表中使用背景图。为了使与缩略图
|
||||
## 详细配置
|
||||
|
||||
上面的步骤介绍了最基本的配置。如果你现在运行 `hugo server`,你将会看到一个空白的 Blowfish 网站。更加详细的内容在[配置]({{< ref "configuration" >}})中介绍。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user