Commit 4a56ddca authored by Phil Höfer's avatar Phil Höfer

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

Resolve "theme.css.php entfernen"

Closes #820

See merge request !1336
parents 58e91e5a 80bb6f6f
<?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() {
}
}
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() {
$('.result').find('a').click(function () {
var link = $(this).attr('href');
......@@ -127,11 +113,13 @@ function botProtection() {
newtab = true;
}
$.ajax({
url: '/img/cat.jpg',
type: 'post',
data: { mm: $('meta[name=mm]').attr('content') },
timeout: 2000
})
url: '/img/cat.jpg',
type: 'post',
data: {
mm: $('meta[name=mm]').attr('content')
},
timeout: 2000
})
.always(function () {
if (!newtab)
document.location.href = link;
......@@ -283,4 +271,4 @@ function initialLoadContent(fokus) {
$('#' + fokus).html(data);
getDocumentReadyForUse(fokus);
});
}
}
\ No newline at end of file
......@@ -17,18 +17,7 @@ $(document).ready(function () {
* Loads the user theme and stored settings from local storage
*/
function loadLocalStorage() {
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]);
}
}
setSettings();
}
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 @@
<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="/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="age-meta-label" content="age=18"/>
@include('parts.utility')
......
......@@ -16,7 +16,6 @@
<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/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/utility.js') }}"></script>
@if (isset($css))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment