diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4014bae9e87bb63b3d0efe05f88116ae8f7edcf9..126e341893ea8a72fb737c274a8926541c77e18e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -77,6 +77,10 @@ review: variables: HELM_UPGRADE_VALUES_FILE: .gitlab/review-apps-values.yaml ROLLOUT_RESOURCE_TYPE: deployment + environment: + name: review/$CI_COMMIT_REF_NAME + on_stop: stop_review + auto_stop_in: 2 days rules: - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == ""' when: never @@ -89,6 +93,11 @@ review: - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH' stop_review: + variables: + GIT_STRATEGY: none + environment: + name: review/$CI_COMMIT_REF_NAME + action: stop rules: - if: '$CI_KUBERNETES_ACTIVE == null || $CI_KUBERNETES_ACTIVE == ""' when: never diff --git a/.gitlab/development-values.yaml b/.gitlab/development-values.yaml index 2a9382f2e426f7ccff44295c19791d77a19d7b53..fd4bf6adef22ea3a93cb950483c495e392bfd2e3 100644 --- a/.gitlab/development-values.yaml +++ b/.gitlab/development-values.yaml @@ -7,13 +7,26 @@ hpa: enabled: true minReplicas: 1 maxReplicas: 5 -resources: - limits: +resourcesPhpfpm: + requests: cpu: 500m + memory: 500M + limits: +resourcesNginx: + requests: + cpu: 100m + memory: 100M + limits: +resourcesRedis: + requests: + cpu: 100m memory: 1Gi + limits: +resourcesFetcher: requests: cpu: 500m - memory: 1Gi + memory: 100M + limits: podDisruptionBudget: enabled: true minAvailable: diff --git a/.gitlab/production-values.yaml b/.gitlab/production-values.yaml index 798cc5f559ec68f6ac92778a4c3b3560575f9a55..bdc9fb84de196d139abdf71cea97f79be2db2804 100644 --- a/.gitlab/production-values.yaml +++ b/.gitlab/production-values.yaml @@ -7,13 +7,6 @@ hpa: enabled: true minReplicas: 3 maxReplicas: 100 -resources: - limits: - cpu: 500m - memory: 1Gi - requests: - cpu: 500m - memory: 1Gi podDisruptionBudget: enabled: true minAvailable: @@ -23,6 +16,29 @@ podAnnotations: prometheus.io/path: /metrics prometheus.io/port: "80" deploymentApiVersion: apps/v1 +resources: + requests: + limits: +resourcesPhpfpm: + requests: + cpu: 500m + memory: 500M + limits: +resourcesNginx: + requests: + cpu: 100m + memory: 100M + limits: +resourcesRedis: + requests: + cpu: 100m + memory: 1Gi + limits: +resourcesFetcher: + requests: + cpu: 500m + memory: 100M + limits: ingress: annotations: cert-manager.io/cluster-issuer: letsencrypt-prod diff --git a/.gitlab/review-apps-values.yaml b/.gitlab/review-apps-values.yaml index 917ab1db980f75a0a74bbaa958759d7a20cefab9..a8a7331ba3b28d881b56dc6845c2124779a058b2 100644 --- a/.gitlab/review-apps-values.yaml +++ b/.gitlab/review-apps-values.yaml @@ -2,6 +2,9 @@ postgresql: enabled: false hpa: enabled: false +resources: + requests: + limits: ingress: annotations: kubernetes.io/tls-acme: "false" @@ -21,4 +24,16 @@ service: commonName: "" externalPort: 80 internalPort: 80 -deploymentApiVersion: apps/v1 \ No newline at end of file +deploymentApiVersion: apps/v1 +resourcesPhpfpm: + requests: + limits: +resourcesNginx: + requests: + limits: +resourcesRedis: + requests: + limits: +resourcesFetcher: + requests: + limits: \ No newline at end of file diff --git a/app/Http/Controllers/AdminInterface.php b/app/Http/Controllers/AdminInterface.php index 63e4b7d71f4a6b4f53a0ba60b542cd878c842674..19efccc428cd5eba19e096f1b4e1ee06ec9f6afd 100644 --- a/app/Http/Controllers/AdminInterface.php +++ b/app/Http/Controllers/AdminInterface.php @@ -31,7 +31,6 @@ class AdminInterface extends Controller if (strstr($key, "_time")) { $stati[$name]["fetcher"][$pid]["connection"][$key] = $val; } - } $stati[$name]["fetcher"][$pid]["poptime"] = $value[1]; } @@ -157,7 +156,7 @@ class AdminInterface extends Controller $now->minute = 0; $now->second = 0; - while($now->lessThanOrEqualTo(Carbon::now())){ + while ($now->lessThanOrEqualTo(Carbon::now())) { $sameTime += empty($stats->time->{$now->format('H:i')}->{$interface}) ? 0 : $stats->time->{$now->format('H:i')}->{$interface}; $now->addMinutes(5); } @@ -178,19 +177,38 @@ class AdminInterface extends Controller if ($size > 0) { $oldLogs[$key]['median'] = number_format(floatval(round($count / $size)), 0, ",", "."); } + } + $sameTimes = []; + $sum = 0; + foreach ($oldLogs as $index => $oldLog) { + if ($index % 7 === 0) { + $sameTime = $oldLog["sameTime"]; + $sameTime = str_replace(".", "", $sameTime); + $sameTime = \intval($sameTime); + $sameTimes[] = ($logToday - $sameTime); + $sum += ($logToday - $sameTime); + } + } + + $averageIncrease = 0; + if (sizeof($sameTimes) > 0) { + $averageIncrease = $sum / sizeof($sameTimes); } if ($request->input('out', 'web') === "web") { return view('admin.count') ->with('title', 'Suchanfragen - MetaGer') ->with('today', number_format(floatval($logToday), 0, ",", ".")) + ->with('averageIncrease', $averageIncrease) ->with('oldLogs', $oldLogs) ->with('minCount', $minCount) ->with('rekordCount', number_format(floatval($rekordTag), 0, ",", ".")) ->with('rekordTagSameTime', number_format(floatval($rekordTagSameTime), 0, ",", ".")) ->with('rekordDate', $rekordTagDate) - ->with('days', $days); + ->with('days', $days) + ->with('css', [mix('/css/count/style.css')]) + ->with('darkcss', [mix('/css/count/dark.css')]); } else { $result = ""; foreach ($oldLogs as $key => $value) { @@ -203,9 +221,7 @@ class AdminInterface extends Controller return response($result, 200) ->header('Content-Type', 'text/csv') ->header('Content-Disposition', 'attachment; filename="count.csv"'); - } - } public function countGraphToday() @@ -235,7 +251,6 @@ class AdminInterface extends Controller return response() ->view('admin.countGraphToday', ["data" => $result], 200) ->header('Content-Type', "image/svg+xml"); - } public function engineStats() diff --git a/app/Http/Controllers/StartpageController.php b/app/Http/Controllers/StartpageController.php index c5e4ff612abdbac0cd7e31dcf2ddcae4239d447e..05d8c6120e139e432a2ebe96a79d33051fe0588f 100644 --- a/app/Http/Controllers/StartpageController.php +++ b/app/Http/Controllers/StartpageController.php @@ -53,7 +53,8 @@ class StartpageController extends Controller ->with('request', $request->input('request', 'GET')) ->with('option_values', $option_values) ->with('autocomplete', $autocomplete) - ->with('pluginmodal', $request->input('plugin-modal', 'off')); + ->with('pluginmodal', $request->input('plugin-modal', 'off')) + ->with('darkcss', [mix('css/themes/startpage-only-dark.css')]); } public function loadPage($subpage) @@ -88,8 +89,9 @@ class StartpageController extends Controller } $response = Response::make( view('plugin') - ->with('link', $link) - , "200"); + ->with('link', $link), + "200" + ); $response->header('Content-Type', "application/opensearchdescription+xml"); return $response; } diff --git a/app/Jobs/ConvertCountFile.php b/app/Jobs/ConvertCountFile.php index d80142977c6458e356a9594cba5321bd288b40dd..78303ff036546622d6c626eb87614f648ac9f96c 100644 --- a/app/Jobs/ConvertCountFile.php +++ b/app/Jobs/ConvertCountFile.php @@ -95,15 +95,13 @@ class ConvertCountFile implements ShouldQueue fclose($fh); } - if (!$error) { - $oldUmask = umask(0); - // Write the result to a File - if (!file_exists($this->files["countPath"])) { - mkdir($this->files["countPath"], 0777, true); - } - file_put_contents($this->files["countFile"], json_encode($result, JSON_PRETTY_PRINT)); - umask($oldUmask); + $oldUmask = umask(0); + // Write the result to a File + if (!file_exists($this->files["countPath"])) { + mkdir($this->files["countPath"], 0777, true); } + file_put_contents($this->files["countFile"], json_encode($result, JSON_PRETTY_PRINT)); + umask($oldUmask); Redis::del(md5($this->files["countFile"])); } diff --git a/chart/templates/deployment.yaml b/chart/templates/deployment.yaml index 81570d51a2b9b28ea77644759d81a7d64e483da5..f287afaff6e23f97e903033917833bdaf2d47410 100644 --- a/chart/templates/deployment.yaml +++ b/chart/templates/deployment.yaml @@ -139,9 +139,7 @@ spec: subPath: adBlacklistDomains.txt readOnly: true resources: - requests: - cpu: 500m - memory: 500m +{{ toYaml .Values.resourcesPhpfpm | indent 12 }} # Nginx Container - name: {{ .Chart.Name }}-nginx image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -187,9 +185,7 @@ spec: initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} resources: - requests: - cpu: 100m - memory: 100m +{{ toYaml .Values.resourcesNginx | indent 12 }} # Redis Container - name: {{ .Chart.Name }}-redis image: "redis:5.0.3-alpine" @@ -208,9 +204,7 @@ spec: initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} resources: - requests: - cpu: 100m - memory: 1Gi +{{ toYaml .Values.resourcesRedis | indent 12 }} # Fetcher Container - name: {{ .Chart.Name }}-fetcher image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -237,7 +231,5 @@ spec: initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} resources: - requests: - cpu: 500m - memory: 100m +{{ toYaml .Values.resourcesFetcher | indent 12 }} {{- end -}} diff --git a/resources/lang/es/index.php b/resources/lang/es/index.php index dc3830e9f31be92c6765a3a5672d36f20866a211..49a8154427ef2534ffbe780f2782715118610860 100644 --- a/resources/lang/es/index.php +++ b/resources/lang/es/index.php @@ -1,37 +1,40 @@ -<?php return [ - "foki.web" => "Web", - "foki.bilder" => "Imágenes", - "foki.nachrichten" => "Informativos/PolÃtica", - "foki.science" => "Ciencia", - "foki.produkte" => "Productos", - "foki.angepasst" => "ajustado", - "foki.maps" => "Maps.metager.de", - "design" => "Escoger un diseño personalizado", - "conveyor" => "Comprar en tiendas que apoyan MetaGer ", - "partnertitle" => "Apoyar MetaGer, sin costos para usted", - "mapstitle" => "MetaGer - Servicio de tarjeta", - "plugin" => "Instalar MetaGer", - "plugin-title" => "Añadir MetaGer a su navegador", - "options.head" => "Administrar filtros", - "focus-creator.head" => "Adaptar búsqueda", - "focus-creator.description" => "Compilar motores de búsqueda", - "focus-creator.name-placeholder" => "Nombre de mis propios de búsqueda", - "focus-creator.save" => "Hacer búsqueda con mis propios de búsqueda", - "focus-creator.delete" => "Borrar mis propios de búsqueda", - "about.1.1" => "Privacidad garantizada", - "about.1.2" => "Con nosotros tiene control total sobre sus datos. No rastreamos y nuestro código fuente es gratuito.", - "about.2.1" => "Diversa y libre", - "about.2.2" => "MetaGer protege contra la censura al combinar los resultados de múltiples motores de búsqueda.", - "about.3.1" => "EnergÃa 100% renovable", - "about.3.2" => "Todos nuestros servicios se ejecutan con energÃa renovable. Sostenible y limpio.", - "about.4.1" => "Organización sin ánimo de lucro", - "about.4.2" => "¡Fortalécenos convirtiéndote en miembro o donando a nuestra organización sin fines de lucro!", - "lang.tooltip" => "Idioma de resultados", - "key.placeholder" => "Llave para buscar sin publicidad", - "key.tooltip" => "Llave para buscar sin publicidad", - "placeholder" => "MetaGer: Buscar & encontrar seguro", - "searchbutton" => "MetaGer - Búsqueda", - "tooltips.add-focus" => "Adaptar búsqueda", - "tooltips.edit-focus" => "Labra el atención actual", - "tooltips.settings" => "Ajuste general", +<?php + +return [ + "foki.web" => "Web", + "foki.bilder" => "Imágenes", + "foki.nachrichten" => "Informativos/PolÃtica", + "foki.science" => "Ciencia", + "foki.produkte" => "Productos", + "foki.angepasst" => "ajustado", + "foki.maps" => "Maps.metager.de", + "design" => "Escoger un diseño personalizado", + "conveyor" => "Comprar en tiendas que apoyan MetaGer ", + "partnertitle" => "Apoyar MetaGer, sin costos adicionales para usted", + "mapstitle" => "MetaGer - Servicio de tarjeta", + "plugin" => "Instalar MetaGer", + "plugin-title" => "Añadir MetaGer a su navegador", + "options.head" => "Administrar filtros", + "focus-creator.head" => "Adaptar búsqueda", + "focus-creator.description" => "Compilar motores de búsqueda", + "focus-creator.name-placeholder" => "Nombre de su propia búsqueda", + "focus-creator.save" => "Realize su propia búsqueda", + "focus-creator.delete" => "Borrar su propia búsqueda", + "focus-creator.focusname" => "Nombre de búsqueda", + "about.1.1" => "Privacidad garantizada", + "about.1.2" => "Con nosotros tiene control total sobre sus datos. No almacenamos y nuestro código fuente es gratuito.", + "about.2.1" => "Diversa y libre", + "about.2.2" => "MetaGer protege contra la censura al combinar los resultados de múltiples motores de búsqueda.", + "about.3.1" => "EnergÃa 100% renovable", + "about.3.2" => "Todos nuestros servicios se ejecutan con energÃa renovable. Sostenible y limpio.", + "about.4.1" => "Organización sin ánimo de lucro", + "about.4.2" => "¡Fortalécenos convirtiéndote en miembro o donando a nuestra organización sin fines de lucro!", + "lang.tooltip" => "Seleccionar idioma de resultados", + "key.placeholder" => "Introducir la clave para la búsqueda sin publicidad", + "key.tooltip" => "Introducir la clave para la búsqueda sin publicidad", + "placeholder" => "MetaGer: Buscar & encontrar de forma segura", + "searchbutton" => "MetaGer - Búsqueda", + "tooltips.add-focus" => "Adaptar búsqueda", + "tooltips.edit-focus" => "Editar el foco actual", + "tooltips.settings" => "Ajustes generales" ]; diff --git a/resources/lang/es/passwords.php b/resources/lang/es/passwords.php new file mode 100644 index 0000000000000000000000000000000000000000..1ad3b94c5f1f80ec5b21a0f39373014d09ceb85a --- /dev/null +++ b/resources/lang/es/passwords.php @@ -0,0 +1,9 @@ +<?php + +return [ + "password" => "Las contraseñas deben tener al menos 6 caracteres y coincidir con la confirmación.", + "reset" => "¡Tu contraseña ha sido restablecida!", + "sent" => "Tu enlace personal para restablecer tu contraseña acaba de ser enviado a tu dirección de correo electrónico.", + "token" => "Este token para restablecer su contraseña no es válido.", + "user" => "No podemos encontrar un usuario con esta dirección de correo electrónico." +]; diff --git a/resources/lang/es/plugin-desktop/desktop-chrome.php b/resources/lang/es/plugin-desktop/desktop-chrome.php index 0de2c359d9d4cba59ce0a08b538de6394df90c09..6c34c5c45de074e60fd0b4489084c0432e069761 100644 --- a/resources/lang/es/plugin-desktop/desktop-chrome.php +++ b/resources/lang/es/plugin-desktop/desktop-chrome.php @@ -1,14 +1,17 @@ <?php return [ - "default-search-v49.1" => "En la parte superior derecha de su aplicación Chrome haga clic en <i class = \"fas fa-bars\"></i> y en el menú desplegable siguiente haga clic en \"Configuración\" para abrir las configuraciones de su Chrome.", + "default-search-v49.1" => "En la parte superior derecha de la aplicación Chrome haga clic en <i class = \"fas fa-bars\"></i> y en el menú siguiente de opciones haga clic en \"Configuración\" para abrir las configuraciones de Chrome.", "default-search-v49.2" => "En \"Buscar\", haga clic en \"Administrar motores de búsqueda ...\".", - "default-search-v53.1" => "En la parte superior derecha de su aplicación Chrome haga clic en <i class=\"fa fa-ellipsis-v\"></i> y en el siguiente menú de opciones haga clic en \"Configuración\" para abrir las configuraciónes de su Chrome.", - "default-search-v53.2" => "En el área \"Buscar\", haga clic en \"Administrar buscadores...\".", - "default-search-v59.1" => "En la parte superior derecha de su aplicación Chrome haga clic en <i class=\"fa fa-ellipsis-v\"></i> y en el menú despegable siguiente haga clic en \"Configuración\" para abrir las configuraciónes de Chrome.\r\n", - "default-search-v59.2" => "En \"Buscador\", haga clic en \"Administrar buscadores...\"", + "default-search-v49.3" => "En la mitad inferior del menú que aparece, mueva el mouse sobre la página web de MetaGer y haga clic en el botón azul \"Establecer como predeterminado\" que aparece en el lado derecho", + "default-search-v53.1" => "En la parte superior derecha de la aplicación Chrome haga clic en <i class=\"fa fa-ellipsis-v\"></i> y en el siguiente menú de opciones haga clic en \"Configuración\" para abrir las configuraciónes de Chrome.", + "default-search-v53.2" => "En la sección \"Buscar\", haga clic en \"Administrar buscadores...\".", + "default-search-v53.3" => "En la mitad inferior del menú que aparece, mueva el mouse sobre la página web de MetaGer y haga clic en el botón azul \"Establecer como predeterminado\" que aparece en el lado derecho", + "default-search-v59.1" => "En la parte superior derecha de la aplicación Chrome haga clic en <i class=\"fa fa-ellipsis-v\"></i> y en el siguiente menú de opciones haga clic en \"Configuración\" para abrir las configuraciónes de Chrome.", + "default-search-v59.2" => "En la sección \"Motor de búsqueda\", haga clic en \"Administrar buscadores...\"", "default-search-v59.3" => "En la lista mostrada aparece \"MetaGer\". Mueva el ratón sobre \"MetaGer\" y haga clic a la derecha en <i class=\"fa fa-ellipsis-v\"></i> y después en \"Establecer como predeterminado\"", "default-page-v49.1" => "En la esquina superior derecha del navegador haga clic en <i class=\"fa fa-ellipsis-v\"></i> y abra la \"Configuración\".", - "default-page-v49.2" => "\"En inicio\", seleccione la opción \"Abrir una página especÃfica o conjunto de páginas\" y luego haga clic en el enlace \"Establecer páginas\".", - "default-page-v49.3" => "Ingrese \":link\" como URL en \"Agregar nueva página\"." + "default-page-v49.2" => "En la sección \"En inicio\", seleccione la opción \"Abrir una página especÃfica o conjunto de páginas\" y luego haga clic en el enlace \"Agregar nueva página\".", + "default-page-v49.3" => "Escriba \":link\" como URL de la página web en el cuadro \"Agregar nueva página\".", + "default-page-v49.4" => "NOTA:\r\nTodas las páginas web que aparecen en la lista actual se abrirà n cuando se inicie el navegador.\r\nPara eliminar una página web de la lista, mueva el mouse sobre la página web y haga clic en el botón \"X\" a la derecha." ]; diff --git a/resources/lang/es/spendenaufruf.php b/resources/lang/es/spendenaufruf.php new file mode 100644 index 0000000000000000000000000000000000000000..df7bd08940f87a4d3f0086528f483f093d2c2f25 --- /dev/null +++ b/resources/lang/es/spendenaufruf.php @@ -0,0 +1,8 @@ +<?php + +return [ + "heading" => "Junto con usted", + "text" => "desarrollamos y administramos MetaGer. Con su ayuda podemos asegurar la protección de datos y la privacidad al buscar en Internet:", + "button" => "Al llamamiento a hacer donaciones...", + "link" => "/llamamiento a hacer donaciones" +]; diff --git a/resources/lang/es/zitatsuche.php b/resources/lang/es/zitatsuche.php new file mode 100644 index 0000000000000000000000000000000000000000..90e79295d6e6c0d30c98c713ab57fea7da364cf1 --- /dev/null +++ b/resources/lang/es/zitatsuche.php @@ -0,0 +1,8 @@ +<?php + +return [ + "title" => "MetaGer - Búsqueda por citas", + "subtitle" => "Puede buscar citas o autores en nuestra base de datos en el campo de texto a continuación.", + "search-label" => "Ingresar los términos de búsqueda", + "results-label" => "Resultados de la búsqueda" +]; diff --git a/resources/less/metager/pages/count-dark.less b/resources/less/metager/pages/count-dark.less new file mode 100644 index 0000000000000000000000000000000000000000..54779a8c3f8d7a64b10abc2a08a7d47fd1f2ba62 --- /dev/null +++ b/resources/less/metager/pages/count-dark.less @@ -0,0 +1,7 @@ +text { + fill: white; +} + +table.table-striped > tbody > tr:nth-child(odd) { + background-color: #404040; +} \ No newline at end of file diff --git a/resources/less/metager/pages/count/style-dark.less b/resources/less/metager/pages/count/style-dark.less new file mode 100644 index 0000000000000000000000000000000000000000..54779a8c3f8d7a64b10abc2a08a7d47fd1f2ba62 --- /dev/null +++ b/resources/less/metager/pages/count/style-dark.less @@ -0,0 +1,7 @@ +text { + fill: white; +} + +table.table-striped > tbody > tr:nth-child(odd) { + background-color: #404040; +} \ No newline at end of file diff --git a/resources/less/metager/pages/count/style.less b/resources/less/metager/pages/count/style.less new file mode 100644 index 0000000000000000000000000000000000000000..3b6b65647b4f879f88040a1521346a001ab521e3 --- /dev/null +++ b/resources/less/metager/pages/count/style.less @@ -0,0 +1,7 @@ +td { + padding: 4px 8px; +} + +table.table-striped > tbody > tr:nth-child(odd) { + background-color: lightgrey; +} \ No newline at end of file diff --git a/resources/views/admin/count.blade.php b/resources/views/admin/count.blade.php index 769bb2fc9ffa5a67d604643125ab55e7bef50afe..cd73d3b8412a0c41f3ecceb671685958277aff16 100644 --- a/resources/views/admin/count.blade.php +++ b/resources/views/admin/count.blade.php @@ -88,15 +88,26 @@ @if( isset($today) ) <tr> <td>{{ Carbon::now()->format('D, d.m.Y') }}</td> - <td>{{ $today }}</td> + <td>{{ $today }} + @if(isset($averageIncrease)) + <span + @if($averageIncrease < 0) + style="color: red" + @else + style="color: green" + @endif + > + @if($averageIncrease < 0)-@else+@endif{{number_format(floatval($averageIncrease), 0, ",", ".")}} + </span> + @endif</td> <td>???</td> <td>???</td> </tr> @endif @foreach($oldLogs as $key => $value) - <tr> + <tr @if(Carbon::now()->dayOfWeek === Carbon::now()->subDays($key)->dayOfWeek)style="font-weight: bold;"@endif> <td>{{ Carbon::now()->subDays($key)->format('D, d.m.Y') }}</td> - <td>{{ $value['sameTime'] }}</td> + <td @if(Carbon::now()->dayOfWeek === Carbon::now()->subDays($key)->dayOfWeek)style="color: #e34b4b;"@endif>{{ $value['sameTime'] }}</td> <td>{{ $value['insgesamt'] }}</td> <td>{{ $value['median'] }}</td> </tr> diff --git a/resources/views/layouts/staticPages.blade.php b/resources/views/layouts/staticPages.blade.php index 55eee8b1749c6c90d386dbc2ebb234224196d8c4..04059176c7254111593b3bb3e93ad6c7a5933794 100644 --- a/resources/views/layouts/staticPages.blade.php +++ b/resources/views/layouts/staticPages.blade.php @@ -28,13 +28,20 @@ @endif <link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}"/> + @if (isset($css) && is_array($css)) + @foreach($css as $cssFile) + <link href="{{ $cssFile }}" rel="stylesheet" /> + @endforeach + @endif @if(isset($page) && $page === 'startpage') <link type="text/css" rel="stylesheet" href="{{ mix('css/themes/startpage-only-light.css') }}"/> @endif @if(Cookie::get('dark_mode') === "2") <link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager-dark.css') }}"/> - @if(isset($page) && $page === 'startpage') - <link type="text/css" rel="stylesheet" href="{{ mix('css/themes/startpage-only-dark.css') }}"/> + @if(!empty($darkcss) && is_array($darkcss)) + @foreach($darkcss as $cssFile) + <link rel="stylesheet" type="text/css" href="{{ $cssFile }}" /> + @endforeach @endif @elseif(Cookie::get('dark_mode') === "1") <link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}"/> @@ -43,8 +50,10 @@ @endif @else <link type="text/css" rel="stylesheet" media="(prefers-color-scheme:dark)" href="{{ mix('css/themes/metager-dark.css') }}"/> - @if(isset($page) && $page === 'startpage') - <link type="text/css" rel="stylesheet" media="(prefers-color-scheme:dark)" href="{{ mix('css/themes/startpage-only-dark.css') }}"/> + @if(!empty($darkcss) && is_array($darkcss)) + @foreach($darkcss as $cssFile) + <link rel="stylesheet" type="text/css" media="(prefers-color-scheme:dark)" href="{{ $cssFile }}" /> + @endforeach @endif @endif <link type="text/css" rel="stylesheet" href="{{ mix('css/utility.css') }}" /> @@ -53,13 +62,6 @@ <link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome-solid.css') }}" /> <script src="{{ mix('js/lib.js') }}"></script> <script src="{{ mix('js/utility.js') }}"></script> - @if (isset($css)) - @if(is_array($css)) - @foreach($css as $cssFile) - <link href="{{ $cssFile }}" rel="stylesheet" /> - @endforeach - @endif - @endif </head> <body> @if(Request::getHttpHost() === "metager3.de") diff --git a/webpack.mix.js b/webpack.mix.js index 85676019d600dfc381508f425f300acbd8bbf93f..9d6a8b62e129167cd0ad82bdc58b92ec6b26ff4c 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -46,6 +46,12 @@ mix .less("resources/less/utility.less", "public/css/utility.css", { strictMath: true }) + .less("resources/less/metager/pages/count/style-dark.less", "public/css/count/dark.css", { + strictMath: true + }) + .less("resources/less/metager/pages/count/style.less", "public/css/count/style.css", { + strictMath: true + }) // js .babel( [