From 1ff04d13bf6658e08e5be5f662748d7aeb0f891a Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Tue, 3 Oct 2023 03:44:11 -0300 Subject: [PATCH 1/5] feat: add marker A and market B in line on map --- .../frontend/maps/static/maps/js/maps.js | 111 ++++++++++-------- 1 file changed, 59 insertions(+), 52 deletions(-) diff --git a/app/contrib/frontend/maps/static/maps/js/maps.js b/app/contrib/frontend/maps/static/maps/js/maps.js index 1933f0a1..d62b213a 100644 --- a/app/contrib/frontend/maps/static/maps/js/maps.js +++ b/app/contrib/frontend/maps/static/maps/js/maps.js @@ -10,10 +10,10 @@ const lng = -46.63366; const mapWrapper = document.querySelector("#map"); +// Adiciona o mapa const map = L.map("map", config).setView([lat, lng], zoom); -// Used to load and display tile layers on the map -// Most tile servers require attribution, which you can set under `Layer` +// Carrega e mostra o layer L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { attribution: '© OpenStreetMap contributors', @@ -35,7 +35,7 @@ L.Control.Search = L.Control.extend({ container.insertAdjacentHTML( "beforeend", `
- +
` ); @@ -46,11 +46,48 @@ L.Control.Search = L.Control.extend({ new L.Control.Search().addTo(map); // -------------------------------------------------------------- +let startPoint, endPoint, polylineGeoJSON; let geojsonarray = []; +function addMarkers(coordinates) { + // Remove marcadores existentes + if (startPoint) map.removeLayer(startPoint); + if (endPoint) map.removeLayer(endPoint); + + // Adiciona marcadores nos pontos inicial e final + startPoint = L.marker([coordinates[0][1], coordinates[0][0]]); + endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]]); + + // Adiciona marcadores ao mapa + startPoint.addTo(map); + endPoint.addTo(map); +} + +function addPolyline(coordinates) { + // Remove linha existente + if (polylineGeoJSON) map.removeLayer(polylineGeoJSON); + + // Adiciona linha ao mapa + polylineGeoJSON = L.geoJSON({ + type: "LineString", + coordinates: coordinates, + }, { + style: { + color: "orange", + weight: 7, + opacity: 1, + fillOpacity: 0.5, + }, + onEachFeature: function (feature, layer) { + layer.bindPopup( + "Informações:
" + "oiee
" + "
" + ); + }, + }).addTo(map); +} + new Autocomplete("local", { onSearch: ({ currentValue }) => { - const api = mapWrapper.dataset.mapsGeojson; return new Promise((resolve) => { fetch(api) @@ -77,69 +114,39 @@ new Autocomplete("local", { return matches === 0 ? template : matches - .map((el) => { - const icon = - el.properties.type === "rectangle" - ? "polygon" - : el.properties.type.toLowerCase(); - return ` + .map((el) => { + return `
  • ${el.properties.title}
  • `; - }) - .join(""); + }) + .join(""); }, onSubmit: ({ object }) => { - const geojsonlayer = L.geoJSON(object, { - style: function (feature) { - return { - color: feature.properties.color || "red", - weight: 7, - opacity: 1, - fillOpacity: 0.7, - }; - }, - pointToLayer: (feature, latlng) => { - if (feature.properties.type === "circle") { - return new L.circle(latlng, { - radius: feature.properties.radius, - }); - } else if (feature.properties.type === "circlemarker") { - return new L.circleMarker(latlng, { - radius: 20, - }); - } else { - return new L.Marker(latlng); - } - }, - onEachFeature: function (feature, layer) { - // const infos = feature.properties.layer.toString(); - - layer.bindPopup( - "Informações:
    " + "oiee
    " + "
    " - ); - }, - }); + const coordinates = object.geometry.coordinates; + + // Adiciona marcadores nos pontos inicial e final + addMarkers(coordinates); - map.fitBounds(geojsonlayer.getBounds(), { padding: [150, 150] }); + // Adiciona linha ao mapa + addPolyline(coordinates); + + map.fitBounds(polylineGeoJSON.getBounds(), { padding: [150, 150] }); if (geojsonarray.includes(object.properties.id)) return; geojsonarray.push(object.properties.id); - - geojsonlayer.addTo(map); }, noResults: ({ currentValue, template }) => - template(`
  • No results found: "${currentValue}"
  • `), + template(`
  • Sem resultados: "${currentValue}"
  • `), onReset: () => { - // remove all layers - map.eachLayer(function (layer) { - if (!!layer.toGeoJSON) { - map.removeLayer(layer); - } - }); + // Remove marcadores e linha + if (startPoint) map.removeLayer(startPoint); + if (endPoint) map.removeLayer(endPoint); + if (polylineGeoJSON) map.removeLayer(polylineGeoJSON); + geojsonarray = []; }, }); From 620a5eb312feffb47f23335089ec289f811a3aea Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Thu, 5 Oct 2023 01:13:35 -0300 Subject: [PATCH 2/5] feat: add editable color and marker icon to map --- app/contrib/frontend/maps/models.py | 24 +++++++++++- .../frontend/maps/static/maps/js/maps.js | 39 +++++++++++++++---- .../maps/templates/maps/plugins/map.html | 7 +++- 3 files changed, 60 insertions(+), 10 deletions(-) diff --git a/app/contrib/frontend/maps/models.py b/app/contrib/frontend/maps/models.py index dc41fc1c..a919ecfb 100644 --- a/app/contrib/frontend/maps/models.py +++ b/app/contrib/frontend/maps/models.py @@ -2,5 +2,27 @@ from cms.plugin_base import CMSPlugin +from colorfield.fields import ColorField + +STYLED_COLOR_PALLETE = [ + ( + "#FFFFFF", + "white", + ), + ( + "#000000", + "black", + ), +] + class Maps(CMSPlugin): - geojson = models.FileField(upload_to="maps/geojson/") \ No newline at end of file + geojson = models.FileField(upload_to="maps/geojson/") + lineColor = ColorField( + verbose_name="Cor da borda", + samples=STYLED_COLOR_PALLETE, + format="hexa", + blank=True, + null=True, + ) + pointA = models.FileField(upload_to="maps/icons/") + pointB = models.FileField(upload_to="maps/icons/") diff --git a/app/contrib/frontend/maps/static/maps/js/maps.js b/app/contrib/frontend/maps/static/maps/js/maps.js index d62b213a..89dc43c2 100644 --- a/app/contrib/frontend/maps/static/maps/js/maps.js +++ b/app/contrib/frontend/maps/static/maps/js/maps.js @@ -2,6 +2,8 @@ let config = { minZoom: 7, maxZoom: 18, zoomControl: false, + autoPan: false, + scrollWheelZoom: false }; const zoom = 18; @@ -20,6 +22,7 @@ L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", { }).addTo(map); // ------------------------------------------------------------ + L.control.zoom({ position: "topright" }).addTo(map); // -------------------------------------------------------------- @@ -50,20 +53,33 @@ let startPoint, endPoint, polylineGeoJSON; let geojsonarray = []; function addMarkers(coordinates) { + let LeafIcon = L.Icon.extend({ + options: { + iconSize: [38, 95], + iconAnchor: [22, 94], + popupAnchor: [-3, -76] + } + }); + + let startIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointA}) + let endIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointB}) + // Remove marcadores existentes if (startPoint) map.removeLayer(startPoint); if (endPoint) map.removeLayer(endPoint); // Adiciona marcadores nos pontos inicial e final - startPoint = L.marker([coordinates[0][1], coordinates[0][0]]); - endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]]); + startPoint = L.marker([coordinates[0][1], coordinates[0][0]], {icon: startIcon}); + endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]], {icon: endIcon}); // Adiciona marcadores ao mapa startPoint.addTo(map); endPoint.addTo(map); } -function addPolyline(coordinates) { +function addPolyline(coordinates, properties) { + const lineColor = mapWrapper.dataset.lineColor; + // Remove linha existente if (polylineGeoJSON) map.removeLayer(polylineGeoJSON); @@ -73,15 +89,21 @@ function addPolyline(coordinates) { coordinates: coordinates, }, { style: { - color: "orange", + color: lineColor || "red", weight: 7, opacity: 1, fillOpacity: 0.5, }, onEachFeature: function (feature, layer) { - layer.bindPopup( - "Informações:
    " + "oiee
    " + "
    " - ); + const linhaNum = properties.ln_codigo.toString(); + const linhaName = properties.title.toString(); + const linhaEmpresa = properties.ln_empresa.toString(); + + layer.bindPopup( + "Número:\n" + linhaNum + "
    " + + "Nome:\n" + linhaName + "
    " + + "Empresa responsável:\n" + linhaEmpresa + "
    " + ); }, }).addTo(map); } @@ -125,12 +147,13 @@ new Autocomplete("local", { onSubmit: ({ object }) => { const coordinates = object.geometry.coordinates; + const properties = object.properties; // Adiciona marcadores nos pontos inicial e final addMarkers(coordinates); // Adiciona linha ao mapa - addPolyline(coordinates); + addPolyline(coordinates, properties); map.fitBounds(polylineGeoJSON.getBounds(), { padding: [150, 150] }); diff --git a/app/contrib/frontend/maps/templates/maps/plugins/map.html b/app/contrib/frontend/maps/templates/maps/plugins/map.html index dd21a8a7..a46de8c4 100644 --- a/app/contrib/frontend/maps/templates/maps/plugins/map.html +++ b/app/contrib/frontend/maps/templates/maps/plugins/map.html @@ -8,7 +8,12 @@ {% endaddtoblock %} -
    +
    +
    {% addtoblock "js" %} From dae17592989b4f96726164e83549ad61b3bd27b7 Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Thu, 5 Oct 2023 10:36:28 -0300 Subject: [PATCH 3/5] feat: add migrations to map --- .../migrations/0008_auto_20231005_1254.py | 39 +++++++++++++++++++ .../migrations/0002_auto_20231005_1254.py | 34 ++++++++++++++++ .../migrations/0003_auto_20231005_1327.py | 33 ++++++++++++++++ app/contrib/frontend/maps/models.py | 10 ++--- .../frontend/maps/static/maps/js/maps.js | 25 ++++++++---- .../maps/templates/maps/plugins/map.html | 6 +-- .../migrations/0004_auto_20231005_1254.py | 29 ++++++++++++++ 7 files changed, 160 insertions(+), 16 deletions(-) create mode 100644 app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py create mode 100644 app/contrib/frontend/maps/migrations/0002_auto_20231005_1254.py create mode 100644 app/contrib/frontend/maps/migrations/0003_auto_20231005_1327.py create mode 100644 app/contrib/frontend/migrations/0004_auto_20231005_1254.py diff --git a/app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py b/app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py new file mode 100644 index 00000000..7a73f02b --- /dev/null +++ b/app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py @@ -0,0 +1,39 @@ +# Generated by Django 3.2 on 2023-10-05 12:54 + +import colorfield.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('landpage', '0007_merge_0006_auto_20230821_2039_0006_auto_20230822_1436'), + ] + + operations = [ + migrations.AlterField( + model_name='block', + name='background_color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')]), + ), + migrations.AlterField( + model_name='footer', + name='background_color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor de fundo'), + ), + migrations.AlterField( + model_name='footer', + name='color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da fonte'), + ), + migrations.AlterField( + model_name='navbar', + name='background_color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor de fundo'), + ), + migrations.AlterField( + model_name='navbar', + name='color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da fonte'), + ), + ] diff --git a/app/contrib/frontend/maps/migrations/0002_auto_20231005_1254.py b/app/contrib/frontend/maps/migrations/0002_auto_20231005_1254.py new file mode 100644 index 00000000..2c0a8798 --- /dev/null +++ b/app/contrib/frontend/maps/migrations/0002_auto_20231005_1254.py @@ -0,0 +1,34 @@ +# Generated by Django 3.2 on 2023-10-05 12:54 + +import colorfield.fields +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('maps', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='maps', + name='lineColor', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da borda'), + ), + migrations.AddField( + model_name='maps', + name='pointA', + field=models.FileField(blank=True, null=True, upload_to='maps/icons/'), + ), + migrations.AddField( + model_name='maps', + name='pointB', + field=models.FileField(blank=True, null=True, upload_to='maps/icons/'), + ), + migrations.AlterField( + model_name='maps', + name='geojson', + field=models.FileField(blank=True, null=True, upload_to='maps/geojson/'), + ), + ] diff --git a/app/contrib/frontend/maps/migrations/0003_auto_20231005_1327.py b/app/contrib/frontend/maps/migrations/0003_auto_20231005_1327.py new file mode 100644 index 00000000..39e3609b --- /dev/null +++ b/app/contrib/frontend/maps/migrations/0003_auto_20231005_1327.py @@ -0,0 +1,33 @@ +# Generated by Django 3.2 on 2023-10-05 13:27 + +import colorfield.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('maps', '0002_auto_20231005_1254'), + ] + + operations = [ + migrations.RenameField( + model_name='maps', + old_name='pointB', + new_name='point_a', + ), + migrations.RenameField( + model_name='maps', + old_name='pointA', + new_name='point_b', + ), + migrations.RemoveField( + model_name='maps', + name='lineColor', + ), + migrations.AddField( + model_name='maps', + name='line_color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da linha'), + ), + ] diff --git a/app/contrib/frontend/maps/models.py b/app/contrib/frontend/maps/models.py index a919ecfb..80971811 100644 --- a/app/contrib/frontend/maps/models.py +++ b/app/contrib/frontend/maps/models.py @@ -16,13 +16,13 @@ ] class Maps(CMSPlugin): - geojson = models.FileField(upload_to="maps/geojson/") - lineColor = ColorField( - verbose_name="Cor da borda", + geojson = models.FileField(upload_to="maps/geojson/", blank=True, null=True) + line_color = ColorField( + verbose_name="Cor da linha", samples=STYLED_COLOR_PALLETE, format="hexa", blank=True, null=True, ) - pointA = models.FileField(upload_to="maps/icons/") - pointB = models.FileField(upload_to="maps/icons/") + point_a = models.FileField(upload_to="maps/icons/", blank=True, null=True) + point_b = models.FileField(upload_to="maps/icons/", blank=True, null=True) diff --git a/app/contrib/frontend/maps/static/maps/js/maps.js b/app/contrib/frontend/maps/static/maps/js/maps.js index 89dc43c2..b546b8a1 100644 --- a/app/contrib/frontend/maps/static/maps/js/maps.js +++ b/app/contrib/frontend/maps/static/maps/js/maps.js @@ -55,22 +55,31 @@ let geojsonarray = []; function addMarkers(coordinates) { let LeafIcon = L.Icon.extend({ options: { - iconSize: [38, 95], - iconAnchor: [22, 94], + iconSize: [40, 40], + iconAnchor: [22, 50], popupAnchor: [-3, -76] } }); - let startIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointA}) - let endIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointB}) // Remove marcadores existentes if (startPoint) map.removeLayer(startPoint); if (endPoint) map.removeLayer(endPoint); + console.log(mapWrapper.dataset) + + startPoint = L.marker([coordinates[0][1], coordinates[0][0]]); + endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]]); + // Adiciona marcadores nos pontos inicial e final - startPoint = L.marker([coordinates[0][1], coordinates[0][0]], {icon: startIcon}); - endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]], {icon: endIcon}); + if (mapWrapper.dataset.mapsIconsPointA) { + let startIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointA}) + startPoint = L.marker([coordinates[0][1], coordinates[0][0]], {icon: startIcon}); + } + if (mapWrapper.dataset.mapsIconsPointB) { + let endIcon = new LeafIcon({iconUrl: mapWrapper.dataset.mapsIconsPointB}) + endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]], {icon: endIcon}); + } // Adiciona marcadores ao mapa startPoint.addTo(map); @@ -78,7 +87,7 @@ function addMarkers(coordinates) { } function addPolyline(coordinates, properties) { - const lineColor = mapWrapper.dataset.lineColor; + const lineColor = mapWrapper.dataset.linecolor; // Remove linha existente if (polylineGeoJSON) map.removeLayer(polylineGeoJSON); @@ -90,7 +99,7 @@ function addPolyline(coordinates, properties) { }, { style: { color: lineColor || "red", - weight: 7, + weight: 3, opacity: 1, fillOpacity: 0.5, }, diff --git a/app/contrib/frontend/maps/templates/maps/plugins/map.html b/app/contrib/frontend/maps/templates/maps/plugins/map.html index a46de8c4..850daa77 100644 --- a/app/contrib/frontend/maps/templates/maps/plugins/map.html +++ b/app/contrib/frontend/maps/templates/maps/plugins/map.html @@ -10,9 +10,9 @@
    + {% if instance.point_a %}data-maps-icons-point-A="{{ instance.point_a.url }}"{% endif %} + {% if instance.point_b %}data-maps-icons-point-B="{{ instance.point_b.url }}"{% endif %} + data-maps-linecolor="{{ instance.line_color }}">
    {% addtoblock "js" %} diff --git a/app/contrib/frontend/migrations/0004_auto_20231005_1254.py b/app/contrib/frontend/migrations/0004_auto_20231005_1254.py new file mode 100644 index 00000000..ff0862c6 --- /dev/null +++ b/app/contrib/frontend/migrations/0004_auto_20231005_1254.py @@ -0,0 +1,29 @@ +# Generated by Django 3.2 on 2023-10-05 12:54 + +import colorfield.fields +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('frontend', '0003_alter_button_font'), + ] + + operations = [ + migrations.AlterField( + model_name='button', + name='background_color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor de fundo'), + ), + migrations.AlterField( + model_name='button', + name='border_color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da borda'), + ), + migrations.AlterField( + model_name='button', + name='color', + field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da fonte'), + ), + ] From 41137685a0dc89f5afbdfccc5e39225bb70a1523 Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Thu, 5 Oct 2023 11:01:07 -0300 Subject: [PATCH 4/5] fix: add editable color to linestring map --- app/contrib/frontend/maps/static/maps/js/maps.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/contrib/frontend/maps/static/maps/js/maps.js b/app/contrib/frontend/maps/static/maps/js/maps.js index b546b8a1..2d31a501 100644 --- a/app/contrib/frontend/maps/static/maps/js/maps.js +++ b/app/contrib/frontend/maps/static/maps/js/maps.js @@ -61,13 +61,10 @@ function addMarkers(coordinates) { } }); - // Remove marcadores existentes if (startPoint) map.removeLayer(startPoint); if (endPoint) map.removeLayer(endPoint); - console.log(mapWrapper.dataset) - startPoint = L.marker([coordinates[0][1], coordinates[0][0]]); endPoint = L.marker([coordinates[coordinates.length - 1][1], coordinates[coordinates.length - 1][0]]); @@ -87,7 +84,7 @@ function addMarkers(coordinates) { } function addPolyline(coordinates, properties) { - const lineColor = mapWrapper.dataset.linecolor; + const lineColor = mapWrapper.dataset.mapsLinecolor; // Remove linha existente if (polylineGeoJSON) map.removeLayer(polylineGeoJSON); From e229428f315dbd2c2a004dbd74d6a075ffdcf87c Mon Sep 17 00:00:00 2001 From: miguelzinh3 Date: Thu, 5 Oct 2023 11:01:54 -0300 Subject: [PATCH 5/5] fix: remove landpage migration --- .../migrations/0008_auto_20231005_1254.py | 39 ------------------- 1 file changed, 39 deletions(-) delete mode 100644 app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py diff --git a/app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py b/app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py deleted file mode 100644 index 7a73f02b..00000000 --- a/app/contrib/frontend/landpage/migrations/0008_auto_20231005_1254.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 3.2 on 2023-10-05 12:54 - -import colorfield.fields -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('landpage', '0007_merge_0006_auto_20230821_2039_0006_auto_20230822_1436'), - ] - - operations = [ - migrations.AlterField( - model_name='block', - name='background_color', - field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')]), - ), - migrations.AlterField( - model_name='footer', - name='background_color', - field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor de fundo'), - ), - migrations.AlterField( - model_name='footer', - name='color', - field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da fonte'), - ), - migrations.AlterField( - model_name='navbar', - name='background_color', - field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor de fundo'), - ), - migrations.AlterField( - model_name='navbar', - name='color', - field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da fonte'), - ), - ]