Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ $navbar-dark-color: #DFDFDF;
transition: none !important;
}

.modal {
z-index: 9999;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {

Expand Down
43 changes: 34 additions & 9 deletions src/DataFixtures/PlantFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,41 @@ public function load(ObjectManager $manager)
// Create plants
$plant1 = new Plant();
$plant1->setName('Plant 1');
$plant1->setDate(new \DateTime('2024-06-27'));
$plant1->setDate(new \DateTime('now - 7 days'));
$plant1->setState('Vegetativ');
$plant1->setPlaceOfCultivation('Innen');
$plant1->setLighting('LED');
$plant1->setUser($user1);
$plant1->setStrain($strain1);
$plant1->setBreeder($breeder1);
$plant1->setGrowth(1);

// Get a random date between now and 7 days ago
$watering = new \DateTime('now - ' . random_int(0, 7) . ' days');
$wateringDateString = $watering->format('Y-m-d H:i:s');

$fertilize = new \DateTime('now - ' . random_int(0, 3) . ' days');
$fertilizeDateString = $fertilize->format('Y-m-d H:i:s');

$temperature = new \DateTime('now - ' . random_int(0, 5) . ' days');
$temperatureDateString = $temperature->format('Y-m-d H:i:s');

$plant1->setWeeklyTasks([
'water' => [
[
'date' => '2024-07-17 18:48:09',
'date' => $wateringDateString,
'task' => 'water',
],
],
'fertilize' => [
[
'date' => '2024-07-17 18:48:10',
'date' => $fertilizeDateString,
'task' => 'fertilize',
],
],
'temperature' => [
[
'date' => '2024-07-17 18:48:10',
'date' => $temperatureDateString,
'task' => 'temperature',
],
],
Expand All @@ -70,36 +81,50 @@ public function load(ObjectManager $manager)

$plant2 = new Plant();
$plant2->setName('BOB');
$plant2->setDate(new \DateTime('2024-07-10'));
$plant2->setDate(new \DateTime('now - 10 days'));
$plant2->setState('Blüte');
$plant2->setPlaceOfCultivation('Außen');
$plant2->setLighting('Natural');
$plant2->setUser($user1);
$plant2->setStrain($strain2);
$plant2->setBreeder($breeder2);
$plant2->setGrowth(1);

$watering = new \DateTime('now - ' . random_int(0, 7) . ' days');
$wateringDateString = $watering->format('Y-m-d H:i:s');

$fertilize = new \DateTime('now - ' . random_int(0, 3) . ' days');
$fertilizeDateString = $fertilize->format('Y-m-d H:i:s');

$temperature = new \DateTime('now - ' . random_int(0, 5) . ' days');
$temperatureDateString = $temperature->format('Y-m-d H:i:s');

$pesticide = new \DateTime('now - ' . random_int(0, 5) . ' days');
$pesticideDateString = $pesticide->format('Y-m-d H:i:s');

$plant2->setWeeklyTasks([
'water' => [
[
'date' => '2024-07-15 18:48:09',
'date' => $wateringDateString,
'task' => 'water',
],
],
'fertilize' => [
[
'date' => '2024-07-17 18:48:10',
'date' => $fertilizeDateString,
'task' => 'fertilize',
],
],
'temperature' => [
[
'date' => '2024-07-12 18:48:10',
'date' => $temperatureDateString,
'task' => 'temperature',
],
],

'pesticide' => [
[
'date' => '2024-07-15 18:48:10',
'date' => $pesticideDateString,
'task' => 'pesticide',
],
],
Expand Down
49 changes: 29 additions & 20 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,43 @@
<link rel="icon" type="image/png" sizes="96x96" href="{{ asset('build/images/favicon/favicon-96x96.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('build/images/favicon/favicon-16x16.png') }}">
<link rel="manifest" href="{{ asset('build/images/favicon/manifest.json') }}">
<link rel='canonical' href='https://weedwizard.de'>

<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ asset('build/images/favicon/ms-icon-144x144.png') }}">
<meta name="theme-color" content="#ffffff">

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="revisit-after" content="2 days" />
<meta http-equiv="content-Type" content="text/html; utf-8" />
<meta name="robots" content="INDEX,FOLLOW" />
<meta http-equiv="content-Language" content="de" />
<meta name="description" content="Dein Begleiter für sorgenfreien Cannabiskonsum" />
<meta name="keywords" content="cannabis, konsum, drogen, grass, Cannabis Deutschland, bubatzkarte, cannabis map, konsum map" />
<meta name="author" content="WeedWizard" />
<meta name="publisher" content="WeedWizard" />
<meta name="copyright" content="WeedWizard" />
<meta name="audience" content="Alle" />
<meta name="page-topic" content="Cannabis" />
<meta name="revisit-after" content="2 days" />

<meta property="og:title" content="WeedWizard">
<meta property="og:description" content="Dein Begleiter für sorgenfreien Cannabiskonsum">
<meta property="og:image" content="https://www.weedwizard.de/build/images/favicon/android-icon-192x192.png">
<meta property="og:url" content="https://www.weedwizard.de">
<meta property="og:type" content="website">
{% block meta %}
<meta name="title" content="WeedWizard">
<meta name="description" content="Dein Begleiter für sorgenfreien Cannabiskonsum" />
<meta name="keywords" content="cannabis, konsum, drogen, grass, Cannabis Deutschland, bubatzkarte, cannabis map, konsum map" />
<meta name="author" content="WeedWizard" />
<meta name="publisher" content="WeedWizard" />
<meta name="copyright" content="WeedWizard" />
<meta name="audience" content="Alle" />
<meta name="page-topic" content="Cannabis" />

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="WeedWizard">
<meta name="twitter:description" content="Dein Begleiter für sorgenfreien Cannabiskonsum">
<meta name="twitter:image" content="https://www.weedwizard.de/build/images/favicon/android-icon-192x192.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property='og:site_name' content='WeedWizard'>
<meta property='og:type' content='website'>
<meta property="og:title" content="WeedWizard">
<meta property="og:description" content="Dein Begleiter für sorgenfreien Cannabiskonsum">
<meta property="og:image" content="{{ asset('build/images/favicon/android-icon-144x144.png') }}">
<meta property="og:url" content="https://www.weedwizard.de">
<meta property="og:type" content="website">

<meta name="twitter:card" content="{{ asset('build/images/favicon/android-icon-144x144.png') }}">
<meta name="twitter:title" content="WeedWizard">
<meta name="twitter:description" content="Dein Begleiter für sorgenfreien Cannabiskonsum">
<meta name="twitter:image" content="{{ asset('build/images/favicon/android-icon-144x144.png') }}">
{% endblock %}

<meta name='mobile-web-app-capable' content='yes'>
<meta name='apple-mobile-web-app-capable' content='yes'>
</head>

{% include 'templates/_site_loader.hmtl.twig' %}
Expand Down
6 changes: 3 additions & 3 deletions templates/budBash_locator/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -82,20 +82,20 @@
<div class="col-md-12">
<input type="text" class="form-control mb-3" id="searchBudBash" placeholder="Suche nach Name...">
<div class="row mb-4">
<div class="col-4">
<div class="col-12 col-sm-4">
<div class="input-group mb-3">
<input type="number" id="entfernung" class="form-control" placeholder="Maximale Entfernung" aria-label="Maximale Entfernung" aria-describedby="Maximale Entfernung" value="{{ app.request.get('distance') }}">
<span class="input-group-text" id="entfernung_label">km</span>
</div>
</div>

<div class="col-5">
<div class="col-12 col-sm-5">
<div class="input-group mb-3">
<div class="w-100" id="priceSlider" data-min="{{ lowestEntranceFee }}" data-max="{{ highestEntranceFee }}"></div>
</div>
</div>

<div class="col-3">
<div class="col-12 col-sm-3">
<select class="form-select" id="sortBy">
<option value="id_ASC">Neuste</option>
<option value="id_DESC">Älteste</option>
Expand Down
2 changes: 1 addition & 1 deletion templates/canna_consultant/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="chat-container overflow-y-auto overflow-x-hidden mb-3" id="chat" data-userPhotoPath="{{ userProfilePicture }}" data-username="{{ app.user.username }}">
{% if app.environment == 'dev' %}
<div class="alert alert-warning position-fixed mt-3 d-none d-sm-block" style="z-index: 90; left: 50%; transform: translate(-50%, 0);" role="alert">
Bitte denkt dran, dass wir jede Anfrage an den Canna-Consultant bezahlen müssen. Bitte nicht so viele Anfragen stellen, bin leider (noch) kein Millionär. Ihr könnt <a href="https://openai.com/api/pricing/" target="_blank">hier</a> nachlesen wie teuer die Anfragen an OpenAI sind. Wir benutzen gerade das Model GPT-3.5 Turbo.
Bitte denkt dran, dass wir jede Anfrage an den Canna-Consultant bezahlen müssen. Bitte nicht so viele Anfragen stellen, bin leider (noch) kein Millionär. Ihr könnt <a href="https://openai.com/api/pricing/" target="_blank">hier</a> nachlesen wie teuer die Anfragen an OpenAI sind. Wir benutzen gerade das Model GPT-4o mini.
</div>
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="breeder-logo rounded-top-3">
<a href="{{ path('weedwizard_cannastrain-library_breeder-view', {breeder_id: seedfinder_id }) }}">
<img src="https://de.seedfinder.eu/pics/00breeder/{{ image }}" class="breeder-logo-img"
alt="Logo of the breeder shown below">
alt="Logo of the breeder shown below" loading="lazy">
</a>
</div>

Expand Down
5 changes: 0 additions & 5 deletions templates/cannastrain_library/partials/_header.html.twig

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="card rounded-3 mb-4" style="width: auto;">
<div class="cropped-img rounded-top-3 position-relative">
<a href="{{ btnLink }}">
<img src="{{ image }}" class="card-img-top" alt="{{ name }}">
<img src="{{ image }}" class="card-img-top" alt="{{ name }}" loading="lazy">
</a>
<div class="type-overlay bg-secondary">{{ type }}</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion templates/cannastrain_library/strain/showStrain.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
<div class="cropped-img user-img-container rounded-3">
<img src="{{ strainInfo.pic }}"
class="card-img-top user-img"
alt="User img for selected strain from SeedFinder">
alt="User img for selected strain from SeedFinder"
loading="lazy">
</div>

{# Forward / backward btn #}
Expand Down
4 changes: 2 additions & 2 deletions templates/grow_mate/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</td>
{% endif %}
{% if plant.strain.pics %}
<td rowspan="2"><img src="{{ plant.strain.breederInfo['pic'] }}" class="card-img-top" alt="Bild der Pflanze" style="height:12rem; width: 9rem; float: right"></td>
<td rowspan="2"><img src="{{ plant.strain.breederInfo['pic'] }}" class="card-img-top" alt="Bild der Pflanze" style="height:12rem; width: 9rem; float: right" loading="lazy"></td>
{% endif %}
</tr>
</table>
Expand Down Expand Up @@ -111,7 +111,7 @@
<h4 class="offcanvas-title" id="offcanvasLabel-{{ plant.id }}" style="color: white">Pflanzendetails</h4>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body" style="overflow: hidden">
<div class="offcanvas-body">
<div class="container-fluid">
<div class="row">
<!-- Oben links: Name, erstellt vor, Entwicklungsphase -->
Expand Down
37 changes: 32 additions & 5 deletions templates/knowledge_base/entry.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,38 @@
{{ entry.articleName }}
{% endblock %}

{% if entry.user.profilePicture %}
{% set profilePicture = '/uploads/profile_pictures/' ~ entry.user.profilePicture %}
{% else %}
{% set profilePicture = '/build/images/userAvatar-placeholder.png' %}
{% endif %}

{% block meta %}
<meta name="title" content="{{ entry.articleName }}">
<meta name="description" content="{{ entry.articleContent|striptags|slice(0, 100) }}">
<meta name="keywords" content="{{ entry.articleName }}">
<meta name="author" content="{{ entry.user.username }}">
<meta name="publisher" content="{{ entry.user.username }}">
<meta name="copyright" content="WeedWizard" />
<meta name="audience" content="Alle">
<meta name="page-topic" content="{{ ('knowledge_base.categories.'~category)|trans([], 'weedwizard', 'de') }}">

<meta property='og:site_name' content='WeedWizard'>
<meta property='og:type' content='website'>
<meta property="og:title" content="{{ entry.articleName }}">
<meta property="og:description" content="{{ entry.articleContent|striptags|slice(0, 100) }}">
<meta property="og:image" content="{{ asset('build/images/favicon/android-icon-144x144.png') }}">
<meta property="og:url" content="{{ path('weedwizard_knowledge_base_entry', {'category': category, 'id': entry.id}) }}">
<meta property="og:type" content="website">

<meta name="twitter:card" content="{{ asset('build/images/favicon/android-icon-144x144.png') }}">
<meta name="twitter:title" content="{{ entry.articleName }}">
<meta name="twitter:description" content="{{ entry.articleContent|striptags|slice(0, 100) }}">
<meta name="twitter:image" content="{{ profilePicture }}">

<meta name="article:author" content="{{ entry.user.username }}">
{% endblock %}

{% block body %}
{% include 'templates/_header.html.twig' with {
'title': ('knowledge_base.categories.'~category)|trans([], 'weedwizard', 'de')
Expand All @@ -14,11 +46,6 @@
<h1>{{ entry.articleName }}</h1>
</div>
<div class="col-12">
{% if entry.user.profilePicture %}
{% set profilePicture = '/uploads/profile_pictures/' ~ entry.user.profilePicture %}
{% else %}
{% set profilePicture = '/build/images/userAvatar-placeholder.png' %}
{% endif %}

<div class="d-flex align-items-center mb-2">
<div style="background: url('{{ profilePicture }}'); height: 20px; width: 20px; background-repeat: no-repeat; background-size: cover; background-position: center" class="rounded-circle me-2"></div>
Expand Down
2 changes: 1 addition & 1 deletion templates/templates/_navbar.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<nav class="navbar navbar-expand-lg bd-navbar" id="navbar">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<a class="navbar-brand" href="{{ path('weedwizard_compliance_map') }}">
<img src="{{ asset('build/images/logo.webp') }}" alt="Logo" style="height: 85px;" class="rounded-circle">
<!-- Adjust the logo URL and size -->
</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/user_profile/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
<div class="col-5">
<h3 class="m-b-0">{{ userProfile.firstname }} {{ userProfile.lastname }} <small class="text-muted h6">{{ userProfile.username }}</small></h3>
<p class="text-muted text-truncate" data-bs-toggle="tooltip" data-bs-title="{{ userProfile.bio }}">
<p class="text-muted text-truncate" data-bs-toggle="tooltip" data-bs-title="{{ userProfile.bio|default("Keine Bio") }}">
{{ userProfile.bio }}
</p>
{% if app.user != userProfile %}
Expand Down