Merge pull request 'devel' (#161) from devel into main
Reviewed-on: #161
This commit is contained in:
commit
56a95c045e
6 changed files with 34 additions and 10 deletions
|
@ -18,16 +18,20 @@ module.exports = {
|
|||
typography: {
|
||||
gruvbox: {
|
||||
css: {
|
||||
'--tw-prose-td-borders': 'rgb(var(--color-background1))',
|
||||
'--tw-prose-th-borders': 'rgb(var(--color-background1))',
|
||||
'--tw-prose-body': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-links': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-headings': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-bold': 'rgb(var(--color-yellow1))',
|
||||
'--tw-prose-quotes': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-bullets': 'rgb(var(--color-primary))',
|
||||
'--tw-prose-code': 'rgb(var(--color-base))',
|
||||
'--tw-prose-code': 'rgb(var(--color-yellow1))',
|
||||
'--tw-prose-pre-bg': 'rgb(var(--color-background1))',
|
||||
'--tw-prose-quote-borders': 'rgb(var(--color-primary))',
|
||||
'--tw-prose-counters': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-invert-td-borders': 'rgb(var(--color-background1))',
|
||||
'--tw-prose-invert-th-borders': 'rgb(var(--color-background1))',
|
||||
'--tw-prose-invert-body': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-invert-links': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-invert-headings': 'rgb(var(--color-foreground))',
|
||||
|
@ -35,7 +39,7 @@ module.exports = {
|
|||
'--tw-prose-invert-quotes': 'rgb(var(--color-foreground))',
|
||||
'--tw-prose-invert-bullets': 'rgb(var(--color-primary))',
|
||||
'--tw-prose-invert-quote-borders': 'rgb(var(--color-primary))',
|
||||
'--tw-prose-invert-code': 'rgb(var(--color-base))',
|
||||
'--tw-prose-invert-code': 'rgb(var(--color-yellow))',
|
||||
'--tw-prose-invert-pre-bg': 'rgb(var(--color-background1))',
|
||||
'--tw-prose-invert-counters': 'rgb(var(--color-foreground))',
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ defmodule Chiya.Site.Setting do
|
|||
belongs_to :home_channel, Chiya.Channels.Channel
|
||||
belongs_to :default_channel, Chiya.Channels.Channel
|
||||
belongs_to :micropub_channel, Chiya.Channels.Channel
|
||||
belongs_to :wiki_channel, Chiya.Channels.Channel
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
@ -32,7 +33,8 @@ defmodule Chiya.Site.Setting do
|
|||
:custom_html,
|
||||
:home_channel_id,
|
||||
:default_channel_id,
|
||||
:micropub_channel_id
|
||||
:micropub_channel_id,
|
||||
:wiki_channel_id
|
||||
])
|
||||
|> validate_required([:title, :subtitle, :theme, :user_agent])
|
||||
end
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
<%= Markdown.render(@note.content) |> raw %>
|
||||
</section>
|
||||
|
||||
<footer class="mt-8 mx-auto max-w-xl">
|
||||
<a href={~p"/note/#{@note.slug}"} class="u-url u-uid">Permalink</a>
|
||||
<footer class="mt-8 mx-auto max-w-2xl">
|
||||
<a href={~p"/note/#{@note.slug}"} class="text-theme-base underline-link font-semibold | u-url u-uid">Permalink</a>
|
||||
</footer>
|
||||
|
||||
<section class="mt-8 mx-auto max-w-xl">
|
||||
<section class="mt-8 mx-auto max-w-2xl">
|
||||
<%= if !Enum.empty?(@note.images) do %>
|
||||
<.line />
|
||||
|
||||
|
|
|
@ -27,6 +27,12 @@
|
|||
label="Default Channel"
|
||||
options={@channels}
|
||||
/>
|
||||
<.input
|
||||
field={f[:wiki_channel_id]}
|
||||
type="select"
|
||||
label="Wiki Channel"
|
||||
options={@channels}
|
||||
/>
|
||||
<:actions>
|
||||
<.button>Save Setting</.button>
|
||||
</:actions>
|
||||
|
|
|
@ -31,14 +31,17 @@
|
|||
<:item title="User agent"><%= @setting.user_agent %></:item>
|
||||
<:item title="Custom css"><%= @setting.custom_css %></:item>
|
||||
<:item title="Custom html"><%= @setting.custom_html %></:item>
|
||||
<:item title="Home Channel">
|
||||
<%= if @setting.home_channel, do: @setting.home_channel.name %>
|
||||
</:item>
|
||||
<:item title="Default Channel">
|
||||
<%= if @setting.default_channel, do: @setting.default_channel.name %>
|
||||
</:item>
|
||||
<:item title="Micropub Default Channel">
|
||||
<:item title="Home Channel">
|
||||
<%= if @setting.home_channel, do: @setting.home_channel.name %>
|
||||
</:item>
|
||||
<:item title="Micropub Channel">
|
||||
<%= if @setting.micropub_channel, do: @setting.micropub_channel.name %>
|
||||
</:item>
|
||||
<:item title="Wiki Channel">
|
||||
<%= if @setting.micropub_channel, do: @setting.wiki_channel.name %>
|
||||
</:item>
|
||||
</.list>
|
||||
<% end %>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
defmodule Chiya.Repo.Migrations.AddWikiChannelSetting do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:settings) do
|
||||
add :wiki_channel_id, references(:channels, on_delete: :nothing)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue