Skip to content

Commit

Permalink
[5.1] Dark Mode Improvement (joomla#42986)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Carl Kopp <[email protected]>
  • Loading branch information
coolcat-creations and MacJoom authored Mar 11, 2024
1 parent fba52f5 commit 985b174
Show file tree
Hide file tree
Showing 78 changed files with 2,735 additions and 1,031 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId

$title = Text::_('COM_ASSOCIATIONS_NO_ASSOCIATION');
$additional = $addLink ? Text::_('COM_ASSOCIATIONS_ADD_NEW_ASSOCIATION') : '';
$labelClass = 'bg-warning text-dark';
$labelClass = 'bg-warning';
$target = $langCode . ':0:add';
$allow = $canCreate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
</div>
</td>
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_archived > 0) ? 'btn-info' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>"
<a class="btn <?php echo ($item->count_archived > 0) ? 'btn-primary' : 'btn-secondary'; ?>" href="<?php echo Route::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>"
aria-describedby="tip-archived<?php echo $i; ?>">
<?php echo $item->count_archived; ?>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@
</span>
</td>
<td class="d-none d-md-table-cell text-center">
<span class="badge bg-warning text-dark">
<span class="badge bg-warning">
<?php echo (int) $item->rating; ?>
</span>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
</span>
</td>
<td class="d-none d-md-table-cell text-center">
<span class="badge bg-warning text-dark">
<span class="badge bg-warning">
<?php echo (int) $item->rating; ?>
</span>
</td>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_finder/tmpl/maps/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<?php if ($item->rgt - $item->lft > 1) : ?>
<a href="<?php echo Route::_('index.php?option=com_finder&view=maps&filter[branch]=' . $item->id); ?>"
aria-describedby="tip-map<?php echo $i; ?>">
<span class="btn btn-info"><?php echo floor(($item->rgt - $item->lft) / 2); ?></span>
<span class="btn btn-primary"><?php echo floor(($item->rgt - $item->lft) / 2); ?></span>
</a>
<div role="tooltip" id="tip-map<?php echo $i; ?>">
<?php echo Text::_('COM_FINDER_HEADING_CHILDREN'); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<?php echo $extension->type_translated; ?>
</td>
<td>
<span class="badge bg-<?php echo count($item['results']['error']) ? 'danger' : ($item['errorsCount'] ? 'warning text-dark' : 'success'); ?>" tabindex="0">
<span class="badge bg-<?php echo count($item['results']['error']) ? 'danger' : ($item['errorsCount'] ? 'warning' : 'success'); ?>" tabindex="0">
<?php echo Text::plural('COM_INSTALLER_MSG_DATABASE_ERRORS', $item['errorsCount']); ?>
</span>
<div role="tooltip" id="tip<?php echo $i; ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class="<?php echo $buttonClass; ?>"
<?php $minorVersion = $version::MAJOR_VERSION . '.' . $version::MINOR_VERSION; ?>
<?php // Display a Note if language pack version is not equal to Joomla version ?>
<?php if (strpos($language->version, $minorVersion) !== 0 || strpos($language->version, $currentShortVersion) !== 0) : ?>
<span class="badge bg-warning text-dark"><?php echo $language->version; ?></span>
<span class="badge bg-warning"><?php echo $language->version; ?></span>
<span class="icon-info-circle" aria-hidden="true" tabindex="0"></span>
<div role="tooltip" class="text-start" id="tip<?php echo $language->code; ?>">
<?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<?php echo $item->type_translated; ?>
</td>
<td>
<span class="badge bg-warning text-dark"><?php echo $item->current_version; ?></span>
<span class="badge bg-warning"><?php echo $item->current_version; ?></span>
</td>
<td>
<span class="badge bg-success"><?php echo $item->version; ?></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<?php $minorVersion = $version::MAJOR_VERSION . '.' . $version::MINOR_VERSION; ?>
<?php // Display a Note if language pack version is not equal to Joomla version ?>
<?php if (strpos($row->version, $minorVersion) !== 0 || strpos($row->version, $currentShortVersion) !== 0) : ?>
<span class="badge bg-warning text-dark" title="<?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>"><?php echo $row->version; ?></span>
<span class="badge bg-warning" title="<?php echo Text::_('JGLOBAL_LANGUAGE_VERSION_NOT_PLATFORM'); ?>"><?php echo $row->version; ?></span>
<?php else : ?>
<span class="badge bg-success"><?php echo $row->version; ?></span>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function statusLabel($status)

default:
case 0:
return '<span class="badge bg-warning text-dark">' . Text::_('COM_PRIVACY_STATUS_PENDING') . '</span>';
return '<span class="badge bg-warning">' . Text::_('COM_PRIVACY_STATUS_PENDING') . '</span>';
}
}
}
2 changes: 1 addition & 1 deletion administrator/components/com_tags/tmpl/tags/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo $item->count_archived > 0 ? 'btn-info' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_TAGS_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($mode ? '&extension=' . $section : '&view=' . $section) . '&filter[tag]=' . (int) $item->id . '&filter[published]=2'); ?>">
<a class="btn <?php echo $item->count_archived > 0 ? 'btn-primary' : 'btn-secondary'; ?>" title="<?php echo Text::_('COM_TAGS_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo Route::_('index.php?option=' . $component . ($mode ? '&extension=' . $section : '&view=' . $section) . '&filter[tag]=' . (int) $item->id . '&filter[published]=2'); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</td>
<td>
<?php if (is_null($value->modified_date)) : ?>
<span class="badge bg-warning text-dark"><?php echo Text::_('COM_TEMPLATES_OVERRIDE_CORE_REMOVED'); ?></span>
<span class="badge bg-warning"><?php echo Text::_('COM_TEMPLATES_OVERRIDE_CORE_REMOVED'); ?></span>
<?php else : ?>
<?php echo HTMLHelper::_('date', $value->modified_date, Text::_('DATE_FORMAT_FILTER_DATETIME')); ?>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
<td class="d-none d-md-table-cell text-center">
<?php if (!empty($item->updated)) : ?>
<a href="<?php echo Route::_('index.php?option=com_templates&view=template&id=' . (int) $item->extension_id . '#files'); ?>">
<span class="badge bg-warning text-dark"><?php echo Text::plural('COM_TEMPLATES_N_CONFLICT', $item->updated); ?></span>
<span class="badge bg-warning"><?php echo Text::plural('COM_TEMPLATES_N_CONFLICT', $item->updated); ?></span>
</a>
<?php else : ?>
<span class="badge bg-success"><?php echo Text::_('COM_TEMPLATES_UPTODATE'); ?></span>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_users/tmpl/users/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
</div>
<?php echo HTMLHelper::_('users.notesModal', $item->note_count, $item->id); ?>
<?php if ($item->requireReset == '1') : ?>
<span class="badge bg-warning text-dark"><?php echo Text::_('COM_USERS_PASSWORD_RESET_REQUIRED'); ?></span>
<span class="badge bg-warning"><?php echo Text::_('COM_USERS_PASSWORD_RESET_REQUIRED'); ?></span>
<?php endif; ?>
</th>
<td class="break-word d-none d-md-table-cell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
</div>
</td>
<td class="text-center btns d-none d-md-table-cell itemnumber">
<a class="btn <?php echo ($item->count_transitions > 0) ? 'btn-info' : 'btn-secondary'; ?>"
<a class="btn <?php echo ($item->count_transitions > 0) ? 'btn-primary' : 'btn-secondary'; ?>"
href="<?php echo Route::_('index.php?option=com_workflow&view=transitions&workflow_id=' . (int) $item->id . '&extension=' . $extension); ?>" aria-describedby="tip-transitions<?php echo $i; ?>">
<?php echo $item->count_transitions; ?>
</a>
Expand Down
2 changes: 1 addition & 1 deletion administrator/language/en-GB/com_joomlaupdate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ COM_JOOMLAUPDATE_VIEW_DEFAULT_DB_NOT_SUPPORTED="Your database type is not suppor
COM_JOOMLAUPDATE_VIEW_DEFAULT_DB_NOT_SUPPORTED_DESC="An update to Joomla %1$s was found, but your current database type is not supported by the new version.<br>For further details take a look at <a href=\"https://downloads.joomla.org/technical-requirements\">the minimum requirements for Joomla %1$s</a>."
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_BREAK="Extensions marked with <span class='badge bg-danger'>No</span> or <span class='badge bg-secondary'>Missing Compatibility Tag</span> might break your website. Please consult with the developer before updating."
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_MISSING_TAG="Extensions marked with <span class='badge bg-secondary'>Missing Compatibility Tag</span> indicate the developer has not included <a href='https://docs.joomla.org/Special:MyLanguage/Deploying_an_Update_Server' target='_blank' rel='noopener noreferrer'>compatibility information.</a>"
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_UPDATE_REQUIRED="Extensions marked with <span class='badge bg-warning text-dark'>Yes (X.X.X)</span> might require an update."
COM_JOOMLAUPDATE_VIEW_DEFAULT_DESCRIPTION_UPDATE_REQUIRED="Extensions marked with <span class='badge bg-warning'>Yes (X.X.X)</span> might require an update."
COM_JOOMLAUPDATE_VIEW_DEFAULT_DIRECTIVE="Directive"
COM_JOOMLAUPDATE_VIEW_DEFAULT_DOWNLOAD_IN_PROGRESS="Downloading update file. Please wait &hellip;"
COM_JOOMLAUPDATE_VIEW_DEFAULT_EXPLANATION_AND_LINK_TO_DOCS="The pre-update check provides you with information about the readiness of your server, settings and installed extensions for the update.<br>You can find more information about this page and how to prepare for updating Joomla in the <a class='pre-update-docs' href='https://docs.joomla.org/Special:MyLanguage/Pre-Update_Check' target='_blank' rel='noopener noreferrer'>pre-update check documentation</a>."
Expand Down
4 changes: 2 additions & 2 deletions administrator/language/en-GB/com_privacy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ COM_PRIVACY_CORE_CAPABILITY_COMMUNICATION_WITH_JOOMLA_ORG="When a network connec
COM_PRIVACY_CORE_CAPABILITY_LOGGING_IP_ADDRESS="Joomla's logging system records the IP address of the visitor which leads to a message being written to its log files. These log files are used to record various activity on a Joomla site, including information related to core updates, invalid login attempts, unhandled errors, and development information such as the use of deprecated APIs. The format of these log files may be customised by any extension which configures a logger, therefore you are encouraged to download and review the log files for your website which may be found at `%s`."
COM_PRIVACY_CORE_CAPABILITY_SESSION_IP_ADDRESS_AND_COOKIE="All requests to a Joomla website start a session which stores the IP address in the session data and creates a session cookie in the user's browser. The IP address is used as a security measure to help protect against potential session hijacking attacks and this information is deleted once the session has expired and its data purged. The session cookie's name is based on a randomly generated hash and therefore does not have a constant identifier. The session cookie is destroyed once the session has expired or the user has exited their browser."
COM_PRIVACY_DASHBOARD_BADGE_ACTIVE_REQUESTS_0="<span class=\"badge bg-info\">0</span> Active Requests"
COM_PRIVACY_DASHBOARD_BADGE_ACTIVE_REQUESTS_1="<span class=\"badge bg-warning text-dark\">1</span> Active Request"
COM_PRIVACY_DASHBOARD_BADGE_ACTIVE_REQUESTS_MORE="<span class=\"badge bg-warning text-dark\">%d</span> Active Requests"
COM_PRIVACY_DASHBOARD_BADGE_ACTIVE_REQUESTS_1="<span class=\"badge bg-warning\">1</span> Active Request"
COM_PRIVACY_DASHBOARD_BADGE_ACTIVE_REQUESTS_MORE="<span class=\"badge bg-warning\">%d</span> Active Requests"
COM_PRIVACY_DASHBOARD_BADGE_TOTAL_REQUESTS_0="<span class=\"badge bg-info\">0</span> Total Requests"
COM_PRIVACY_DASHBOARD_BADGE_TOTAL_REQUESTS_1="<span class=\"badge bg-info\">1</span> Total Request"
COM_PRIVACY_DASHBOARD_BADGE_TOTAL_REQUESTS_MORE="<span class=\"badge bg-info\">%d</span> Total Requests"
Expand Down
10 changes: 5 additions & 5 deletions administrator/modules/mod_privacy_status/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
<?php echo Text::_('JPUBLISHED'); ?>
</span>
<?php elseif ($privacyPolicyInfo['published'] && !$privacyPolicyInfo['articlePublished']) : ?>
<span class="badge bg-warning text-dark">
<span class="badge bg-warning">
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php else : ?>
<span class="badge bg-warning text-dark">
<span class="badge bg-warning">
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
Expand All @@ -62,12 +62,12 @@
<?php echo Text::_('JPUBLISHED'); ?>
</span>
<?php elseif (!$requestFormPublished['published'] && $requestFormPublished['exists']) : ?>
<span class="badge bg-warning text-dark">
<span class="badge bg-warning">
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
<?php echo Text::_('JUNPUBLISHED'); ?>
</span>
<?php else : ?>
<span class="badge bg-warning text-dark">
<span class="badge bg-warning">
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
Expand Down Expand Up @@ -133,7 +133,7 @@
<?php echo Text::_('JENABLED'); ?>
</span>
<?php else : ?>
<span class="badge bg-warning text-dark">
<span class="badge bg-warning">
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
<?php echo Text::_('COM_PRIVACY_STATUS_CHECK_NOT_AVAILABLE'); ?>
</span>
Expand Down
4 changes: 2 additions & 2 deletions administrator/modules/mod_sampledata/tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<span class="sample-data__icon icon-<?php echo $item->icon; ?> me-1" aria-hidden="true"></span>
<?php echo htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8'); ?>
</div>
<button type="button" class="btn btn-secondary btn-sm apply-sample-data" data-type="<?php echo $item->name; ?>" data-steps="<?php echo $item->steps; ?>">
<button type="button" class="btn btn-primary btn-sm apply-sample-data" data-type="<?php echo $item->name; ?>" data-steps="<?php echo $item->steps; ?>">
<span class="icon-upload" aria-hidden="true"></span> <?php echo Text::_('JLIB_INSTALLER_INSTALL'); ?>
<span class="visually-hidden"><?php echo $item->title; ?></span>
</button>
Expand All @@ -53,7 +53,7 @@
</li>
<?php endforeach; ?>
</ul>
<a href="index.php?option=com_plugins&filter[folder]=sampledata" class="btn btn-secondary btn-sm manage-sample-data float-end m-3">
<a href="index.php?option=com_plugins&filter[folder]=sampledata" class="btn btn-primary btn-sm manage-sample-data float-end m-3">
<span class="icon-tasks" aria-hidden="true"></span> <?php echo Text::_('MOD_SAMPLEDATA_MANAGE_SAMPLEDATA'); ?>
</a>
<?php endif; ?>
9 changes: 8 additions & 1 deletion administrator/templates/atum/component.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
$linkColor = $this->params->get('link-color', '#2a69b8');
list($r, $g, $b) = sscanf($linkColor, "#%02x%02x%02x");

$linkColorDark = $this->params->get('link-color-dark', '#6fbfdb');
list($rd, $gd, $bd) = sscanf($linkColorDark, "#%02x%02x%02x");

// Enable assets
$wa->usePreset('template.atum.' . ($this->direction === 'rtl' ? 'rtl' : 'ltr'))
->useStyle('template.active.language')
Expand All @@ -34,7 +37,11 @@
--link-color: ' . $linkColor . ';
--link-color-rgb: ' . $r . ',' . $g . ',' . $b . ';
--template-special-color: ' . $this->params->get('special-color', 'var(--template-special-color)') . ';
}');
}')
->addInlineStyle('@media (prefers-color-scheme: dark) { :root {
--link-color: ' . $linkColorDark . ';
--link-color-rgb: ' . $rd . ',' . $gd . ',' . $bd . ';
}}');

// No template.js for modals
$wa->disableScript('template.atum');
Expand Down
Loading

0 comments on commit 985b174

Please sign in to comment.