From ea04ceab582778c032c807bcd79f86c3b6c2712e Mon Sep 17 00:00:00 2001
From: Karl <Karl Hasselbring>
Date: Thu, 6 Oct 2016 11:36:06 +0200
Subject: [PATCH] =?UTF-8?q?Die=20dark.css=20l=C3=A4sst=20sich=20jetzt=20mi?=
 =?UTF-8?q?ttels=20Url-Parameter=20theme=3Ddark=20einbinden?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 public/css/{themeDark.css => themes/dark.css} | 59 ++++++++++---------
 resources/views/layouts/resultPage.blade.php  | 10 +---
 resources/views/layouts/staticPages.blade.php |  6 +-
 resources/views/quicktip.blade.php            |  6 +-
 4 files changed, 42 insertions(+), 39 deletions(-)
 rename public/css/{themeDark.css => themes/dark.css} (83%)

diff --git a/public/css/themeDark.css b/public/css/themes/dark.css
similarity index 83%
rename from public/css/themeDark.css
rename to public/css/themes/dark.css
index edd536694..01b296c40 100644
--- a/public/css/themeDark.css
+++ b/public/css/themes/dark.css
@@ -8,8 +8,7 @@ a, a:link, a:visited {
     text-decoration: none;
 }
 
-
-#foki input:checked + label{
+#foki input:checked + label {
     background-color: #707070;
 }
 
@@ -17,7 +16,7 @@ a, a:link, a:visited {
     background-color: #505050;
     border-color: #505050;
     border-bottom: 3px solid #707070;
-	box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
+    box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.2);
 }
 
 .navbar li a {
@@ -59,7 +58,7 @@ a, a:link, a:visited {
     color: antiquewhite;
 }
 
-a:link.mutelink, a:visited.mutelink{
+a:link.mutelink, a:visited.mutelink {
     color: antiquewhite;
 }
 
@@ -127,22 +126,26 @@ pre {
     color: antiquewhite;
 }
 
-.form-control::-webkit-input-placeholder { /* WebKit, Blink, Edge */
-    color:    #antiquewhite;
+.form-control::-webkit-input-placeholder {
+    /* WebKit, Blink, Edge */
+    color: #antiquewhite;
 }
 
-.form-control:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
-   color:    #antiquewhite;
-   opacity:  1;
+.form-control:-moz-placeholder {
+    /* Mozilla Firefox 4 to 18 */
+    color: #antiquewhite;
+    opacity: 1;
 }
 
-.form-control::-moz-placeholder { /* Mozilla Firefox 19+ */
-   color:    antiquewhite;
-   opacity:  1;
+.form-control::-moz-placeholder {
+    /* Mozilla Firefox 19+ */
+    color: antiquewhite;
+    opacity: 1;
 }
 
-.form-control:-ms-input-placeholder { /* Internet Explorer 10-11 */
-   color:    #antiquewhite;
+.form-control:-ms-input-placeholder {
+    /* Internet Explorer 10-11 */
+    color: #antiquewhite;
 }
 
 .panel-default {
@@ -167,6 +170,7 @@ pre {
     border-color: #68491c;
 }
 
+
 /* Result Page */
 
 .result .description {
@@ -196,7 +200,8 @@ pre {
 }
 
 .result > .number {
-    color: burlywood !important; /* Wird normalerweise inline gesetzt */
+    color: burlywood !important;
+    /* Wird normalerweise inline gesetzt */
 }
 
 .result .title {
@@ -294,32 +299,32 @@ a:hover {
     background-color: transparent;
 }
 
+
 /* Aus der theme.css */
 
-body{
-	background-color: #505050;
-	background-attachment: fixed;
+body {
+    background-color: #505050;
+    background-attachment: fixed;
 }
 
-body#resultBody{
-	background-image: inherit;
+body#resultBody {
+    background-image: inherit;
 }
 
-
 input[type=text]:focus, textarea:focus, input[type=email]:focus, input[type=tel]:focus, .form-control:focus {
     outline-color: #909090;
     -webkit-box-shadow: 0px 0px 2px 2px #909090;
-	-moz-box-shadow: 0px 0px 2px 2px #909090;
-	box-shadow: 0px 0px 2px 2px909090;
+    -moz-box-shadow: 0px 0px 2px 2px #909090;
+    box-shadow: 0px 0px 2px 2px909090;
     border: 1px solid #c0c0c0;
 }
 
 #mglogo > a {
-	background-image: linear-gradient(#707070 0%, #707070 250%);
+    background-image: linear-gradient(#707070 0%, #707070 250%);
     background-color: transparent;
     color: antiquewhite;
 }
 
-.logo h1{
-	color: antiquewhite;
-}
+.logo h1 {
+    color: antiquewhite;
+}
\ No newline at end of file
diff --git a/resources/views/layouts/resultPage.blade.php b/resources/views/layouts/resultPage.blade.php
index 2fe88510b..ed327ad15 100644
--- a/resources/views/layouts/resultPage.blade.php
+++ b/resources/views/layouts/resultPage.blade.php
@@ -1,6 +1,5 @@
 <!DOCTYPE html>
 <html>
-
 <head>
 	<title>{{ $metager->getQ() }} - MetaGer</title>
 	<link href="/css/bootstrap.css" rel="stylesheet" />
@@ -16,13 +15,10 @@
 	<meta content="{{ $eingabe }}" name="q" />
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 	<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()))])) }}">
-	@if( isset($metager->theme) && $metager->theme != "none" )
-	<link type="text/css" rel="stylesheet" href="/css/themes/{{ $metager->theme }}.css" />
-	@endif
+		@if( app('request')->input('theme', 'none') != "none" )
+		<link type="text/css" rel="stylesheet" href="/css/themes/{{ app('request')->input('theme', 'none') }}.css" />
+		@endif
 	<link type="text/css" rel="stylesheet" href="/css/lightslider.css" />
-
-	<!-- In Erprobung -->
-	<!-- <link href="/css/themeDark.css" rel="stylesheet" /> -->
 </head>
 <body id="resultBody">
 	@if( !isset($suspendheader) )
diff --git a/resources/views/layouts/staticPages.blade.php b/resources/views/layouts/staticPages.blade.php
index 7a6d13db7..5e157f52c 100644
--- a/resources/views/layouts/staticPages.blade.php
+++ b/resources/views/layouts/staticPages.blade.php
@@ -26,9 +26,11 @@
 				<link href="/css/{{ $css }}" rel="stylesheet" />
 			@endif
 		@endif
+		@if( app('request')->input('theme', 'none') != "none" )
+		<link type="text/css" rel="stylesheet" href="/css/themes/{{ app('request')->input('theme', 'none') }}.css" />
+		@else
 		<link id="theme" href="/css/theme.css.php" rel="stylesheet" />
-		<!-- In Erprobung -->
-		<!-- <link href="/css/themeDark.css" rel="stylesheet" /> -->
+		@endif
 	</head>
 
 	<body>
diff --git a/resources/views/quicktip.blade.php b/resources/views/quicktip.blade.php
index d64cbce5a..be6718df2 100644
--- a/resources/views/quicktip.blade.php
+++ b/resources/views/quicktip.blade.php
@@ -3,10 +3,10 @@
 		<title>{!! trans('quicktip.title') !!}</title>
 		<link rel="stylesheet" type="text/css" href="/css/bootstrap.css" />
 		<link rel="stylesheet" type="text/css" href="/css/style.css" />
+		@if( app('request')->input('theme', 'none') != "none" )
+		<link type="text/css" rel="stylesheet" href="/css/themes/{{ app('request')->input('theme', 'none') }}.css" />
+		@endif
 	</head>
-
-	<!-- In Erprobung -->
-	<!-- <link href="/css/themeDark.css" rel="stylesheet" /> -->
 	<body>
 		@if( $spruch !== "" )
 			<blockquote id="spruch">{!! $spruch !!}</blockquote>
-- 
GitLab