mirror of https://github.com/jpanther/congo.git
commit
34d10e04a5
|
@ -0,0 +1,5 @@
|
|||
i18n:
|
||||
- i18n/*
|
||||
|
||||
documentation:
|
||||
- exampleSite/content/*
|
|
@ -0,0 +1,17 @@
|
|||
name: Labeller
|
||||
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
label:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- name: Label
|
||||
uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/labeller.yml
|
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -6,6 +6,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.3.0] - 2021-09-29
|
||||
|
||||
### Added
|
||||
|
||||
- Site logo support
|
||||
- Chinese translation ([#2](https://github.com/jpanther/congo/pull/2))
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgrade to Tailwind v2.2.16
|
||||
|
||||
## [1.2.1] - 2021-08-26
|
||||
|
||||
### Added
|
||||
|
@ -95,7 +106,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
- Advanced customisation using simple Tailwind colour definitions and styles
|
||||
- Fully documented
|
||||
|
||||
[unreleased]: https://github.com/jpanther/Congo/compare/v1.2.1...HEAD
|
||||
[unreleased]: https://github.com/jpanther/Congo/compare/v1.3.0...HEAD
|
||||
[1.3.0]: https://github.com/jpanther/Congo/compare/v1.2.1...v1.3.0
|
||||
[1.2.1]: https://github.com/jpanther/Congo/compare/v1.2.0...v1.2.1
|
||||
[1.2.0]: https://github.com/jpanther/Congo/compare/v1.1.1...v1.2.0
|
||||
[1.1.1]: https://github.com/jpanther/congo/compare/v1.1.0...v1.1.1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*! Congo v1.2.1 | MIT License | https://github.com/jpanther/congo */
|
||||
/*! Congo v1.3.0 | MIT License | https://github.com/jpanther/congo */
|
||||
|
||||
/*! tailwindcss v2.2.7 | MIT License | https://tailwindcss.com */
|
||||
/*! tailwindcss v2.2.16 | MIT License | https://tailwindcss.com */
|
||||
|
||||
/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
|
||||
|
||||
|
@ -477,6 +477,18 @@ button,
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Override legacy focus reset from Normalize with modern Firefox focus styles.
|
||||
*
|
||||
* This is actually an improvement over the new defaults in Firefox in our testing,
|
||||
* as it triggers the better focus styles even for links, which still use a dotted
|
||||
* outline in Firefox by default.
|
||||
*/
|
||||
|
||||
:-moz-focusring {
|
||||
outline: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
@ -2701,6 +2713,10 @@ body a, body button {
|
|||
flex-direction: row;
|
||||
}
|
||||
|
||||
.sm\:items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sm\:px-14 {
|
||||
padding-left: 3.5rem;
|
||||
padding-right: 3.5rem;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/*! Congo v1.2.1 | MIT License | https://github.com/jpanther/congo */
|
||||
/*! Congo v1.3.0 | MIT License | https://github.com/jpanther/congo */
|
||||
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# https://jpanther.github.io/congo/docs/configuration/#theme-parameters
|
||||
|
||||
colorScheme = "congo"
|
||||
# logo = "img/logo.jpg"
|
||||
# description = "My awesome website"
|
||||
# mainSections = ["section1", "section2"]
|
||||
# robots = ""
|
||||
|
|
|
@ -21,7 +21,7 @@ Use one of the existing theme stylesheets as a template. You are free to define
|
|||
|
||||
## Overriding the stylesheet
|
||||
|
||||
Sometimes you need to add a custom style to style your own HTML elements. Congo provides for this scenario by allowing you to overrid the default styles in your own CSS stylesheet. Simply create a `custom.css` file in your project's `assets/css/` folder.
|
||||
Sometimes you need to add a custom style to style your own HTML elements. Congo provides for this scenario by allowing you to override the default styles in your own CSS stylesheet. Simply create a `custom.css` file in your project's `assets/css/` folder.
|
||||
|
||||
The `custom.css` file will be minified by Hugo and loaded automatically after all the other theme styles which means anything in your custom file will take precedence over the defaults.
|
||||
|
||||
|
@ -54,7 +54,7 @@ npm run dev
|
|||
This will automatically output a CSS file to `/themes/congo/assets/css/compiled/main.css`.
|
||||
|
||||
{{< alert >}}
|
||||
**Note:** You should make manual edits to the compiled CSS file.
|
||||
**Note:** You should not make manual edits to the compiled CSS file.
|
||||
{{< /alert >}}
|
||||
|
||||
Now whenever you make a change, the CSS files will be rebuilt automatically. This mode is useful to run when using `hugo server` to preview your site during development. Asset files will be minified by Hugo at site build time.
|
||||
|
|
|
@ -54,7 +54,8 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
<!-- prettier-ignore-start -->
|
||||
|Name|Type|Default|Description|
|
||||
| --- | --- | --- | --- |
|
||||
|`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`.|
|
||||
|`colorScheme`|string|`"congo"`|The theme colour scheme to use. Valid values are `congo` (default), `avocado`, `ocean` and `fire`. Refer to [Advanced Customisation]({{< ref "advanced-customisation#colour-schemes" >}}) for more details.|
|
||||
|`logo`|string|_Not set_|The relative path to the site logo file within the Hugo assets folder. The logo file should be provided at 2x resolution and supports any image dimensions.|
|
||||
|`description`|string|_Not set_|The description of the website for metadata purposes.|
|
||||
|`mainSections`|array of strings|_Not set_|The sections that should be displayed in the recent articles list. If not provided the section with the greatest number of articles is used.|
|
||||
|`robots`|string|_Not set_|String that indicates how robots should handle your site. If set, it will be output in the page head. Refer to [Google's docs](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives) for valid values.|
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
title: "Users"
|
||||
date: 2020-08-14
|
||||
draft: false
|
||||
description: "Some real life Congo examples."
|
||||
description: "Some real-life Congo examples."
|
||||
slug: "users"
|
||||
tags: ["users"]
|
||||
showDate: false
|
||||
|
@ -16,7 +16,8 @@ Real websites that are built with Congo.
|
|||
{{< /lead >}}
|
||||
|
||||
| Website | Details |
|
||||
| ------------------------------------------------ | ---------------------------- |
|
||||
| [jamespanther.com](https://www.jamespanther.com) | Personal site - Theme author |
|
||||
| -------------------------------------------- | ---------------------------- |
|
||||
| [jamespanther.com](https://jamespanther.com) | Personal site - Theme author |
|
||||
| [zekeriyaay.com](https://zekeriyaay.com) | Personal cheat sheets site |
|
||||
|
||||
**Congo user?** To add your site to this list, [submit a pull request](https://github.com/jpanther/congo/blob/dev/exampleSite/content/users.md).
|
||||
|
|
|
@ -16,7 +16,7 @@ error:
|
|||
404_description: "It seems that the page you've requested does not exist."
|
||||
|
||||
footer:
|
||||
powered_by: "Powered by"
|
||||
powered_by: "Powered by {{ .Hugo }}"
|
||||
|
||||
list:
|
||||
externalurl_title: "Link to external site"
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
article:
|
||||
anchor_label: "锚点"
|
||||
draft: "草稿"
|
||||
edit_title: "编辑内容"
|
||||
reading_time:
|
||||
other: "{{ .Count }} 分钟"
|
||||
reading_time_title: "预计阅读"
|
||||
|
||||
author:
|
||||
byline_title: "作者"
|
||||
|
||||
error:
|
||||
404_title: "找不到网页 :confused:"
|
||||
404_error: "404 错误"
|
||||
404_description: "您请求的页面似乎不存在。"
|
||||
|
||||
footer:
|
||||
powered_by: "由 {{ .Hugo }} 强力驱动"
|
||||
|
||||
list:
|
||||
externalurl_title: "链接到外部网站"
|
||||
no_articles: "这里还没有任何文章可以列出。"
|
||||
|
||||
sharing:
|
||||
email: "通过电子邮件发送"
|
||||
facebook: "分享到 Facebook"
|
||||
linkedin: "分享到 LinkedIn"
|
||||
reddit: "提交到 Reddit"
|
||||
twitter: "分享到 Twitter"
|
||||
|
||||
shortcode:
|
||||
recent_articles: "最近的文章"
|
||||
icon_none: "未找到图标。"
|
|
@ -23,7 +23,7 @@
|
|||
{{ end }}
|
||||
{{ if and .Draft .Site.Params.article.showDraftLabel }}
|
||||
<div class="ml-2">
|
||||
{{ partial "badge.html" "Draft" }}
|
||||
{{ partial "badge.html" (i18n "article.draft" | emojify) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if templates.Exists "partials/extend-article-link.html" }}
|
||||
|
|
|
@ -12,22 +12,14 @@
|
|||
{{/* Theme attribution */}}
|
||||
{{ if .Site.Params.attribution | default true }}
|
||||
<p class="text-xs text-neutral-300 dark:text-neutral-600">
|
||||
{{ i18n "footer.powered_by" }}
|
||||
<a
|
||||
class="hover:underline hover:underline-primary-300 hover:text-primary-400"
|
||||
href="https://gohugo.io/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>Hugo</a
|
||||
>
|
||||
{{ $hugo := printf `<a class="hover:underline hover:underline-primary-300 hover:text-primary-400"
|
||||
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>
|
||||
&
|
||||
<a
|
||||
class="hover:underline hover:underline-primary-300 hover:text-primary-400"
|
||||
href="https://git.io/hugo-congo"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>Congo</a
|
||||
>
|
||||
<a class="hover:underline hover:underline-primary-300 hover:text-primary-400" href="https://git.io/hugo-congo"
|
||||
target="_blank" rel="noopener noreferrer">Congo</a>`
|
||||
}}
|
||||
|
||||
{{ i18n "footer.powered_by" (dict "Hugo" $hugo) | safeHTML }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
||||
|
|
|
@ -1,11 +1,25 @@
|
|||
<header class="flex justify-between py-6 font-semibold sm:py-10 text-neutral-800 dark:text-neutral">
|
||||
<header
|
||||
class="flex justify-between py-6 font-semibold sm:items-center sm:py-10 text-neutral-800 dark:text-neutral"
|
||||
>
|
||||
<div>
|
||||
{{ if .Site.Params.Logo -}}
|
||||
{{ $logo := resources.Get .Site.Params.Logo }}
|
||||
{{ if $logo }}
|
||||
<img
|
||||
src="{{ $logo.RelPermalink }}"
|
||||
width="{{ div $logo.Width 2 }}"
|
||||
height="{{ div $logo.Height 2 }}"
|
||||
alt="{{ .Site.Title }}"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<a
|
||||
class="hover:underline hover:underline-primary-500 hover:underline-thickness-bold hover:underline-offset-small"
|
||||
rel="me"
|
||||
href="{{ "/" | relURL }}"
|
||||
>{{ .Site.Title }}</a
|
||||
>
|
||||
{{- end }}
|
||||
</div>
|
||||
<nav>
|
||||
<ul class="flex flex-col list-none sm:flex-row">
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hugo-congo-theme",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.0",
|
||||
"description": "Congo theme for Hugo",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -29,6 +29,6 @@
|
|||
"prettier": "^2.3.2",
|
||||
"prettier-plugin-go-template": "^0.0.11",
|
||||
"tailwind-underline-utils": "^1.1.3",
|
||||
"tailwindcss": "^2.2.7"
|
||||
"tailwindcss": "^2.2.16"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue