Skip to content

Commit

Permalink
Add _legacy.css
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhj committed Feb 11, 2021
1 parent ce63100 commit cd336c8
Show file tree
Hide file tree
Showing 9 changed files with 167,142 additions and 32 deletions.
2 changes: 2 additions & 0 deletions core-bundle/assets/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@tailwind base;

@import "_legacy.css";

[x-cloak] {
@apply hidden;
}
Expand Down
1 change: 1 addition & 0 deletions core-bundle/assets/tailwind-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
black: colors.black,
white: colors.white,
gray: colors.coolGray,
red: colors.rose,
primary: {
50: 'var(--color-primary-50, #FFF8F1)',
100: 'var(--color-primary-100, #FFEBD5)',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Contao\CoreBundle\ServiceAnnotation\Callback;
use Contao\DataContainer;

/**
* @internal
*/
class BackendThemesOptionsListener
{
private BackendThemes $backendThemes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,13 @@ public function run()
$objTemplate->jsDisabled = $GLOBALS['TL_LANG']['MSC']['jsDisabled'];
$objTemplate->targetPath = StringUtil::specialchars(base64_encode($targetPath));
$objTemplate->REQUEST_TOKEN = REQUEST_TOKEN;
$objTemplate->errors = Message::generate();

$backendThemes = $container->get(BackendThemes::class);

if ('flexible' !== $themeName && null === $theme = $backendThemes->getTheme($themeName))
{
// Legacy theme detected.
return $this->Template->getResponse();
return $objTemplate->getResponse();
}

$twig = $container->get('twig');
Expand Down
167,077 changes: 167,076 additions & 1 deletion core-bundle/src/Resources/public/theme/app.css

Large diffs are not rendered by default.

36 changes: 34 additions & 2 deletions core-bundle/src/Resources/public/theme/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,39 @@
{
"bundles/contaocore/theme/app.css": "/bundles/contaocore/theme/app.css",
"bundles/contaocore/theme/app.js": "/bundles/contaocore/theme/app.js",
"bundles/contaocore/theme/images/contao-logo.svg": "/bundles/contaocore/theme/images/contao-logo.svg",
"bundles/contaocore/theme/app.svg": "/bundles/contaocore/theme/images/theme_import.fe613350.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/theme_import.svg": "/bundles/contaocore/theme/images/theme_import.fe613350.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/hints.svg": "/bundles/contaocore/theme/images/hints.1829d374.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/arrow_left.svg": "/bundles/contaocore/theme/images/arrow_left.35e11d94.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/arrow_right.svg": "/bundles/contaocore/theme/images/arrow_right.5c636b8c.svg",
"bundles/contaocore/theme/images/logo.svg": "/bundles/contaocore/theme/images/logo.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/newfolder.svg": "/bundles/contaocore/theme/images/newfolder.b1212530.svg",
"bundles/contaocore/theme/images/logo-white.svg": "/bundles/contaocore/theme/images/logo-white.svg",
"bundles/contaocore/theme/images/logo.svg": "/bundles/contaocore/theme/images/logo.svg"
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/filemounts.svg": "/bundles/contaocore/theme/images/filemounts.2309e7e5.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/clipboard.svg": "/bundles/contaocore/theme/images/clipboard.287cc8ab.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/deleteAll.svg": "/bundles/contaocore/theme/images/deleteAll.62d960c7.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/featured.svg": "/bundles/contaocore/theme/images/featured.8cde09ce.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/all.svg": "/bundles/contaocore/theme/images/all.fd5d7d8e.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/rss.svg": "/bundles/contaocore/theme/images/rss.86dde3c9.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/pagemounts.svg": "/bundles/contaocore/theme/images/pagemounts.eb7606ca.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/loading.svg": "/bundles/contaocore/theme/images/loading.01c46037.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/cssimport.svg": "/bundles/contaocore/theme/images/cssimport.fd00e44d.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/sync.svg": "/bundles/contaocore/theme/images/sync.e70f7bb1.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/folPlus.svg": "/bundles/contaocore/theme/images/folPlus.37d35577.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/articles.svg": "/bundles/contaocore/theme/images/articles.b3a7cc61.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/filter-apply.svg": "/bundles/contaocore/theme/images/filter-apply.613e2366.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/filter-reset.svg": "/bundles/contaocore/theme/images/filter-reset.caaae8bb.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/new.svg": "/bundles/contaocore/theme/images/new.f5e49558.svg",
"bundles/contaocore/theme/images/contao-logo.svg": "/bundles/contaocore/theme/images/contao-logo.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/back.svg": "/bundles/contaocore/theme/images/back.9ca67974.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/store.svg": "/bundles/contaocore/theme/images/store.fba1a7be.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/navexp.svg": "/bundles/contaocore/theme/images/navexp.c45324b0.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/error.svg": "/bundles/contaocore/theme/images/error.9112fffe.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/navcol.svg": "/bundles/contaocore/theme/images/navcol.f8d445bb.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/manager.svg": "/bundles/contaocore/theme/images/manager.2d6071a2.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/show.svg": "/bundles/contaocore/theme/images/show.a60feec3.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/ok.svg": "/bundles/contaocore/theme/images/ok.85252c63.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/profile.svg": "/bundles/contaocore/theme/images/profile.ca2d989c.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/debug.svg": "/bundles/contaocore/theme/images/debug.d2ab1e67.svg",
"bundles/contaocore/theme/../src/Resources/contao/themes/flexible/icons/preview.svg": "/bundles/contaocore/theme/images/preview.f59103bf.svg"
}
22 changes: 8 additions & 14 deletions core-bundle/src/Resources/views/Backend/Layout/login.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,16 @@
<img class="h-20 w-auto mx-auto" src="{{ asset('theme/images/contao-logo.svg', 'contao_core') }}" alt="">
</div>

{% if errors %}
{% if messages %}
<div class="rounded-md bg-red-100 p-4 mb-6 mt-6 shadow-sm">
<div class="flex">
<div class="flex-shrink-0">
<svg class="h-5 w-5 text-red-400" fill="currentColor" viewBox="0 0 20 20">
<path
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd" fill-rule="evenodd"></path>
</svg>
<span class="block h-5 w-5 text-red-400" aria-hidden="true">
{{ source('@ContaoCore/Backend/Icon/x-circle.solid.svg') }}
</span>
</div>
<div class="ml-2 text-sm leading-5 text-red-700">
{{ errors }}
{{ messages|raw }}
</div>
</div>
</div>
Expand Down Expand Up @@ -88,13 +86,9 @@
type="submit"
class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm leading-5 font-medium rounded-md text-white bg-primary-600 hover:bg-primary-500 focus:outline-none focus:border-primary-700 focus:shadow-outline-brand active:bg-primary-700 transition duration-150 ease-in-out">
<span class="absolute left-0 inset-y-0 flex items-center pl-3">
<svg
class="h-5 w-5 text-primary-500 group-hover:text-primary-400 transition ease-in-out duration-150"
fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd"
d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z"
clip-rule="evenodd"/>
</svg>
<span class="block h-5 w-5 text-primary-500 group-hover:text-primary-400 transition ease-in-out duration-150" aria-hidden="true">
{{ source('@ContaoCore/Backend/Icon/lock-closed.solid.svg') }}
</span>
</span>
{{ loginButton }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@

<div class="mt-4 flex items-center justify-between">
<div class="flex items-center">
<input id="trusted" name="trusted" value="1" type="checkbox"
class="form-checkbox h-4 w-4 text-primary-600 transition duration-150 ease-in-out"/>
<input
id="trusted"
name="trusted"
value="1"
type="checkbox"
class="form-checkbox h-4 w-4 text-primary-600 transition duration-150 ease-in-out"/>
<label for="trusted" class="ml-2 block text-sm leading-5 text-gray-900">
{{ 'MSC.twoFactorTrustDevice'|trans([], 'contao_default') }}
</label>
Expand Down
22 changes: 11 additions & 11 deletions core-bundle/src/Resources/views/Backend/Layout/main.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
{{ contao_backend_link_tags('app') }}

{# deprecated entries #}
<link rel="stylesheet" href="system/themes/flexible/fonts.css">
<link rel="stylesheet" href="assets/colorpicker/css/mooRainbow.min.css">
<link rel="stylesheet" href="assets/chosen/css/chosen.min.css">
<link rel="stylesheet" href="assets/simplemodal/css/simplemodal.min.css">
<link rel="stylesheet" href="assets/datepicker/css/datepicker.min.css">
<link rel="stylesheet" href="system/themes/flexible/basic.css">
<link rel="stylesheet" href="system/themes/flexible/main.css">
{% endblock %}

{% block javascripts %}
Expand All @@ -46,23 +43,26 @@
{{ javascripts|default|raw }}
{% endblock %}
</head>
<body>
<body class="font-sans">

<div class="relative min-h-screen flex flex-col">
<div class="relative min-h-screen flex flex-col bg-gray-100 dark:bg-gray-800">
{% include '@ContaoCore/Backend/Section/navbar.html.twig' %}

<div class="flex-grow flex overflow-hidden bg-gray-100 dark:bg-gray-800">
<div class="flex-grow flex overflow-hidden w-full max-w-8xl mx-auto">
{% include '@ContaoCore/Backend/Section/sidebar.html.twig' %}

<div class="flex flex-col min-w-0 flex-1 overflow-hidden">
<div class="flex-1 relative z-0 flex overflow-hidden pl-4 lg:pl-8 pt-4 lg:pt-8">
<div class="flex-1 relative z-0 flex overflow-hidden">
<main
id="main"
class="flex-1 relative z-0 focus:outline-none xl:order-last"
tabindex="0" aria-labelledby="main_headline">
class="flex-1 relative z-0 focus:outline-none xl:order-last lg:pl-8 xl:pl-12"
tabindex="0"
aria-labelledby="main_headline">

<h1 class="text-xl font-semibold text-gray-900 dark:text-gray-100 mb-2">{{ headline|raw }}</h1>
<div class="bg-white border-t rounded-l-md -mb-1 overflow-hidden shadow-lg">{{ main|raw }}</div>
<div class="px-4 lg:px-0 py-2">
<h1 class="text-xl font-semibold text-gray-900 dark:text-gray-100">{{ headline|raw }}</h1>
</div>
<div class="bg-white border-t lg:rounded-l-md overflow-hidden shadow-lg">{{ main|raw }}</div>
</main>
</div>
</div>
Expand Down

0 comments on commit cd336c8

Please sign in to comment.