From cec85a93478d0a21d566ce29c8f023b5d2aeb1b7 Mon Sep 17 00:00:00 2001 From: Manager Bot Date: Wed, 7 Dec 2022 23:59:06 +0000 Subject: [PATCH] Expand settings. --- Web/lib/MJB/Web/Controller/Dashboard.pm | 29 ++++++++++++------- Web/templates/dashboard/blog_settings.html.ep | 15 ++++++++++ 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/Web/lib/MJB/Web/Controller/Dashboard.pm b/Web/lib/MJB/Web/Controller/Dashboard.pm index 340b85e..757b1a8 100644 --- a/Web/lib/MJB/Web/Controller/Dashboard.pm +++ b/Web/lib/MJB/Web/Controller/Dashboard.pm @@ -201,9 +201,12 @@ sub blog_settings ($c) { my $data = $c->jekyll($blog->domain->name)->config->data; - $c->stash->{form}->{title} = $data->{title}; - $c->stash->{form}->{desc} = $data->{description}; - $c->stash->{form}->{email} = $data->{email}; + $c->stash->{form}->{title} = $data->{title}; + $c->stash->{form}->{desc} = $data->{description}; + $c->stash->{form}->{email} = $data->{email}; + $c->stash->{form}->{twitter_username} = $data->{twitter_username}; + $c->stash->{form}->{github_username} = $data->{github_username}; + $c->stash->{form}->{theme} = $data->{theme}; } #== @@ -219,13 +222,19 @@ sub do_blog_settings ($c) { my $jekyll = $c->jekyll($blog->domain->name); - my $title = $c->stash->{form}->{title} = $c->param( 'configTitle' ); - my $desc = $c->stash->{form}->{desc} = $c->param( 'configDesc' ); - my $email = $c->stash->{form}->{email} = $c->param( 'configEmail' ); - - $jekyll->config->data->{title} = $title; - $jekyll->config->data->{description} = $desc; - $jekyll->config->data->{email} = $email; + my $title = $c->stash->{form}->{title} = $c->param( 'configTitle' ); + my $desc = $c->stash->{form}->{desc} = $c->param( 'configDesc' ); + my $email = $c->stash->{form}->{email} = $c->param( 'configEmail' ); + my $twitter_username = $c->stash->{form}->{twitter_username} = $c->param( 'configTwitterUsername' ); + my $github_username = $c->stash->{form}->{github_username} = $c->param( 'configGithubUsername' ); + my $theme = $c->stash->{form}->{theme} = $c->param( 'configTheme' ); + + $jekyll->config->data->{title} = $title; + $jekyll->config->data->{description} = $desc; + $jekyll->config->data->{email} = $email; + $jekyll->config->data->{twitter_username} = $twitter_username; + $jekyll->config->data->{github_username} = $github_username; + $jekyll->config->data->{theme} = $theme; $jekyll->write_config; diff --git a/Web/templates/dashboard/blog_settings.html.ep b/Web/templates/dashboard/blog_settings.html.ep index ac161a1..d43d0f0 100644 --- a/Web/templates/dashboard/blog_settings.html.ep +++ b/Web/templates/dashboard/blog_settings.html.ep @@ -19,6 +19,21 @@ + +
+ + +
+ +
+ + +
+ +
+ + +