Compare commits

..

No commits in common. "a5f24427a151435d4d3d2f1bda4b34e6ded006a3" and "686cd72ec2835a96fec79de25dd1ec8711bf4d3a" have entirely different histories.

8 changed files with 22 additions and 22 deletions

View File

@ -17,29 +17,28 @@ jobs:
uses: actions/setup-go@v4 uses: actions/setup-go@v4
with: with:
go-version: '1.22' go-version: '1.22'
- uses: actions/setup-python@v5 # - uses: actions/setup-python@v5
with: # with:
python-version: '3.11' # python-version: '3.11'
- name: Build # - name: Build
run: go build -v ./... # run: go build -v ./...
- name: Test # - name: Test
run: go test -v ./... # run: go test -v ./...
- name: E2E Test # - name: E2E Test
run: | # run: |
cd e2e_tests # cd e2e_tests
docker compose -f docker-compose.ci.yml up -d # docker compose -f docker-compose.ci.yml up -d
pip install -r requirements.txt # pip install -r requirements.txt
pytest # pytest
- name: Build Release - name: Build Release
env: env:
CGO_ENABLED: 1 CGO_ENABLED: 1
GOOS: linux GOOS: linux
GOARCH: amd64 GOARCH: amd64
GH_TOKEN: ${{ github.token }}
run: | run: |
go build -o owl-linux-amd64 ./cmd/owl go build -o owl-linux-amd64 ./cmd/owl
gh release upload ${{github.event.release.tag_name}} owl-linux-amd64 gh release upload ${{github.event.release.tag_name}} owl-linux-amd64

View File

@ -25,6 +25,7 @@ func (svc *SiteConfigService) defaultConfig() model.SiteConfig {
return model.SiteConfig{ return model.SiteConfig{
Title: "My Owl-Blog", Title: "My Owl-Blog",
SubTitle: "A freshly created blog", SubTitle: "A freshly created blog",
HeaderColor: "#efc48c",
PrimaryColor: "#d37f12", PrimaryColor: "#d37f12",
AuthorName: "", AuthorName: "",
Me: []model.MeLinks{}, Me: []model.MeLinks{},

View File

@ -92,6 +92,7 @@ var importCmd = &cobra.Command{
} }
v2Config.Title = v1Config.Title v2Config.Title = v1Config.Title
v2Config.SubTitle = v1Config.SubTitle v2Config.SubTitle = v1Config.SubTitle
v2Config.HeaderColor = v1Config.HeaderColor
v2Config.AuthorName = v1Config.AuthorName v2Config.AuthorName = v1Config.AuthorName
v2Config.Me = mes v2Config.Me = mes
v2Config.Lists = lists v2Config.Lists = lists

View File

@ -22,6 +22,7 @@ type MenuItem struct {
type SiteConfig struct { type SiteConfig struct {
Title string Title string
SubTitle string SubTitle string
HeaderColor string
PrimaryColor string PrimaryColor string
AuthorName string AuthorName string
Me []MeLinks Me []MeLinks

View File

@ -14,11 +14,6 @@
<link rel='stylesheet' href='/static/owl.css'> <link rel='stylesheet' href='/static/owl.css'>
<link rel='stylesheet' href='/static/style.css'> <link rel='stylesheet' href='/static/style.css'>
<style>
:root {
--primary: {{.SiteConfig.PrimaryColor}};
}
</style>
{{ .SiteConfig.HtmlHeadExtra }} {{ .SiteConfig.HtmlHeadExtra }}
</head> </head>
<body> <body>

View File

@ -14,6 +14,9 @@
<label for="SubTitle">SubTitle</label> <label for="SubTitle">SubTitle</label>
<input type="text" name="SubTitle" id="SubTitle" value="{{.SubTitle}}"/> <input type="text" name="SubTitle" id="SubTitle" value="{{.SubTitle}}"/>
<label for="HeaderColor">HeaderColor</label>
<input type="color" name="HeaderColor" id="HeaderColor" value="{{.HeaderColor}}"/>
<label for="PrimaryColor">PrimaryColor</label> <label for="PrimaryColor">PrimaryColor</label>
<input type="color" name="PrimaryColor" id="PrimaryColor" value="{{.PrimaryColor}}"/> <input type="color" name="PrimaryColor" id="PrimaryColor" value="{{.PrimaryColor}}"/>

View File

@ -40,7 +40,6 @@ func NewWebApp(
) *WebApp { ) *WebApp {
fiberApp := fiber.New(fiber.Config{ fiberApp := fiber.New(fiber.Config{
BodyLimit: 50 * 1024 * 1024, // 50MB in bytes BodyLimit: 50 * 1024 * 1024, // 50MB in bytes
DisableStartupMessage: true,
}) })
fiberApp.Use(middleware.NewUserMiddleware(authorService).Handle) fiberApp.Use(middleware.NewUserMiddleware(authorService).Handle)

View File

@ -38,6 +38,7 @@ func (h *SiteConfigHandler) HandlePost(c *fiber.Ctx) error {
siteConfig.Title = c.FormValue("Title") siteConfig.Title = c.FormValue("Title")
siteConfig.SubTitle = c.FormValue("SubTitle") siteConfig.SubTitle = c.FormValue("SubTitle")
siteConfig.HeaderColor = c.FormValue("HeaderColor")
siteConfig.PrimaryColor = c.FormValue("PrimaryColor") siteConfig.PrimaryColor = c.FormValue("PrimaryColor")
siteConfig.AuthorName = c.FormValue("AuthorName") siteConfig.AuthorName = c.FormValue("AuthorName")
siteConfig.AvatarUrl = c.FormValue("AvatarUrl") siteConfig.AvatarUrl = c.FormValue("AvatarUrl")