Skip to content

Commit

Permalink
Fix to support theme styling for embedded calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Jun 10, 2024
1 parent e83eca2 commit 8ba3d01
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
25 changes: 24 additions & 1 deletion authentic-init.pl
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,18 @@ sub embed_pm_scripts

sub embed_css_fonts
{
print ' <link href="' .
my ($return) = @_;
my $font_link = ' <link href="' .
$theme_webprefix .
'/unauthenticated/css/fonts-roboto.' .
(theme_debug_mode() ? 'src' : 'min') . '.css?' .
theme_version('timestamped') .
'" rel="stylesheet">' . "\n";
if ($return) {
return $font_link;
} else {
print $font_link;
}
}

sub embed_css_bundle
Expand Down Expand Up @@ -677,6 +683,23 @@ sub embed_noscript
print $noscript, "\n";
}

sub get_css_inline
{
my ($target) = @_;
if ($target eq 'calendar') {
return <<CALENDAR;
.calendar-table .calendar-cell,
.calendar-table .calendar-cell strong,
.calendar-table strong {
font-weight: 500;
}
.calendar-details .detail strong {
opacity: 0.97;
}
CALENDAR
}
}

sub embed_port_shell
{
if (!@_ &&
Expand Down
9 changes: 9 additions & 0 deletions authentic.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,15 @@ sub theme_ui_page_refresh
return "page_refresh()";
}

sub theme_fonts
{
return embed_css_fonts(1);
}

sub theme_css_inline
{
return get_css_inline(@_);
}

$main::cloudmin_no_create_links = 1;
$main::cloudmin_no_edit_buttons = 1;
Expand Down
2 changes: 1 addition & 1 deletion unauthenticated/css/bundle.min.css

Large diffs are not rendered by default.

Binary file modified unauthenticated/css/bundle.min.css.gz
Binary file not shown.

0 comments on commit 8ba3d01

Please sign in to comment.