Skip to content
Snippets Groups Projects
Commit 4a56ddca authored by Phil Höfer's avatar Phil Höfer
Browse files

Merge branch '820-theme-css-php-entfernen' into 'development'

Resolve "theme.css.php entfernen"

Closes #820

See merge request !1336
parents 58e91e5a 80bb6f6f
No related branches found
No related tags found
1 merge request!1365Resolve "Filter Options for MetaGer"
<?php
header("Content-type: text/css");
$color = "@metager-orange";
$colorRGBA = "rgba(255, 128, 0, 1)";
if (isset($_GET['r']) && isset($_GET['g']) && isset($_GET['b']) && isset($_GET['a'])) {
$color = "rgb(" . $_GET['r'] . "," . $_GET['g'] . "," . $_GET['b'] . ")";
$colorRGBA = "rgba(" . $_GET['r'] . "," . $_GET['g'] . "," . $_GET['b'] . "," . $_GET['a'] . ")";
}
?>
@CHARSET "UTF-8";
input[type=text]:focus, textarea:focus, input[type=email]:focus, input[type=tel]:focus {
outline-color: <?=$color?>;
-webkit-box-shadow: 0px 0px 2px 2px <?=$colorRGBA?>;
-moz-box-shadow: 0px 0px 2px 2px <?=$colorRGBA?>;
box-shadow: 0px 0px 2px 2px <?=$colorRGBA?>;
border-color: <?=$colorRGBA?>;
}
.logo h1{
color: <?=$color?>;
}
.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus{
background-color: <?=$color?>;
border-color: <?=$color?>;
}
.pagination > li > a, .pagination > li > span{
color: <?=$color?>;
}
.pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus{
color: <?=$color?>;
}
.navbar, #navbar-static-pages {
border-bottom: 3px solid <?=$color?>;
}
.lSPrev > i, .lSNext > i {
color: <?=$color?>;
}
\ No newline at end of file
...@@ -105,20 +105,6 @@ function pluginInfo() { ...@@ -105,20 +105,6 @@ function pluginInfo() {
} }
} }
function theme() {
if (localStorage) {
var theme = localStorage.getItem('theme');
if (theme != null) {
if ((theme.match(/,/g) || []).length != 3) {
localStorage.removeItem('theme');
} else {
theme = theme.split(',');
$('#theme').attr('href', '/css/theme.css.php?r=' + theme[0] + '&g=' + theme[1] + '&b=' + theme[2] + '&a=' + theme[3]);
}
}
}
}
function botProtection() { function botProtection() {
$('.result').find('a').click(function () { $('.result').find('a').click(function () {
var link = $(this).attr('href'); var link = $(this).attr('href');
...@@ -127,11 +113,13 @@ function botProtection() { ...@@ -127,11 +113,13 @@ function botProtection() {
newtab = true; newtab = true;
} }
$.ajax({ $.ajax({
url: '/img/cat.jpg', url: '/img/cat.jpg',
type: 'post', type: 'post',
data: { mm: $('meta[name=mm]').attr('content') }, data: {
timeout: 2000 mm: $('meta[name=mm]').attr('content')
}) },
timeout: 2000
})
.always(function () { .always(function () {
if (!newtab) if (!newtab)
document.location.href = link; document.location.href = link;
...@@ -283,4 +271,4 @@ function initialLoadContent(fokus) { ...@@ -283,4 +271,4 @@ function initialLoadContent(fokus) {
$('#' + fokus).html(data); $('#' + fokus).html(data);
getDocumentReadyForUse(fokus); getDocumentReadyForUse(fokus);
}); });
} }
\ No newline at end of file
...@@ -17,18 +17,7 @@ $(document).ready(function () { ...@@ -17,18 +17,7 @@ $(document).ready(function () {
* Loads the user theme and stored settings from local storage * Loads the user theme and stored settings from local storage
*/ */
function loadLocalStorage() { function loadLocalStorage() {
if (localStorage) { setSettings();
var theme = localStorage.getItem('theme');
if (theme != null) {
if ((theme.match(/,/g) || []).length != 3) {
localStorage.removeItem('theme');
} else {
theme = theme.split(',');
$('#theme').attr('href', '/css/theme.css.php?r=' + theme[0] + '&g=' + theme[1] + '&b=' + theme[2] + '&a=' + theme[3]);
}
}
setSettings();
}
} }
/** /**
......
/*
Test Kommentar
*/
if (localStorage) {
var theme = localStorage.getItem('theme');
if (theme != null) {
if ((theme.match(/,/g) || []).length != 3) {
localStorage.removeItem('theme');
} else {
theme = theme.split(',');
document.getElementById('theme').setAttribute('href', '/css/theme.css.php?r=' + theme[0] + '&g=' + theme[1] + '&b=' + theme[2] + '&a=' + theme[3]);
}
}
}
\ No newline at end of file
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
<link rel="search" type="application/opensearchdescription+xml" title="{!! trans('resultPage.opensearch') !!}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}"> <link rel="search" type="application/opensearchdescription+xml" title="{!! trans('resultPage.opensearch') !!}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}">
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/default.css') }}" /> <link type="text/css" rel="stylesheet" href="{{ mix('css/themes/default.css') }}" />
<link type="text/css" rel="stylesheet" href="/fonts/liberation-fonts/liberation-fonts.css" /> <link type="text/css" rel="stylesheet" href="/fonts/liberation-fonts/liberation-fonts.css" />
<link id="theme" type="text/css" rel="stylesheet" href="/css/theme.css.php" />
<meta name="referrer" content="origin"> <meta name="referrer" content="origin">
<meta name="age-meta-label" content="age=18"/> <meta name="age-meta-label" content="age=18"/>
@include('parts.utility') @include('parts.utility')
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<link type="text/css" rel="stylesheet" href="/fonts/liberation-fonts/liberation-fonts.css" /> <link type="text/css" rel="stylesheet" href="/fonts/liberation-fonts/liberation-fonts.css" />
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/default.css') }}" /> <link type="text/css" rel="stylesheet" href="{{ mix('css/themes/default.css') }}" />
<link type="text/css" rel="stylesheet" href="{{ mix('css/utility.css') }}" /> <link type="text/css" rel="stylesheet" href="{{ mix('css/utility.css') }}" />
<link id="theme" type="text/css" rel="stylesheet" href="/css/theme.css.php" />
<script src="{{ mix('js/lib.js') }}"></script> <script src="{{ mix('js/lib.js') }}"></script>
<script src="{{ mix('js/utility.js') }}"></script> <script src="{{ mix('js/utility.js') }}"></script>
@if (isset($css)) @if (isset($css))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment