Skip to content

Commit

Permalink
🐛 arreglar estilo
Browse files Browse the repository at this point in the history
  • Loading branch information
anattolia committed Sep 16, 2024
1 parent 64ce139 commit e5cce5c
Show file tree
Hide file tree
Showing 13 changed files with 108 additions and 153 deletions.
2 changes: 1 addition & 1 deletion aplicaciones/www/cuenco-unal/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import { RouterLink, RouterView } from 'vue-router';
</script>

<template>
Expand Down
73 changes: 36 additions & 37 deletions aplicaciones/www/cuenco-unal/src/components/ComponenteMapa.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script setup lang="ts">
import mapbox from 'mapbox-gl'
import type { Map } from 'mapbox-gl'
import type { FeatureCollection } from 'geojson'
import mapbox from 'mapbox-gl';
import type { Map } from 'mapbox-gl';
import type { FeatureCollection } from 'geojson';
defineProps<{}>()
defineProps<{}>();
import 'mapbox-gl/dist/mapbox-gl.css'
import { onMounted, ref, type Ref } from 'vue'
import 'mapbox-gl/dist/mapbox-gl.css';
import { onMounted, ref, type Ref } from 'vue';
// POR HACER: PASAR A ARCHIVO
const datosGeo: FeatureCollection = {
Expand All @@ -15,95 +15,94 @@ const datosGeo: FeatureCollection = {
{
type: 'Feature',
properties: { slug: 'amazonia', conteo: 9 },
geometry: { type: 'Point', coordinates: [-69.9435977, -4.1937385] }
geometry: { type: 'Point', coordinates: [-69.9435977, -4.1937385] },
},
{
type: 'Feature',
properties: { slug: 'bogota', conteo: 243 },
geometry: { type: 'Point', coordinates: [-74.0858796, 4.6363615] }
geometry: { type: 'Point', coordinates: [-74.0858796, 4.6363615] },
},
{
type: 'Feature',
properties: { slug: 'caribe', conteo: 5 },
geometry: { type: 'Point', coordinates: [-81.7127803, 12.5362943] }
geometry: { type: 'Point', coordinates: [-81.7127803, 12.5362943] },
},
{
type: 'Feature',
properties: { slug: 'de-la-paz', conteo: 9 },
geometry: { type: 'Point', coordinates: [-73.2029951, 10.3899886] }
geometry: { type: 'Point', coordinates: [-73.2029951, 10.3899886] },
},
{
type: 'Feature',
properties: { slug: 'manizales', conteo: 41 },
geometry: { type: 'Point', coordinates: [-75.4923199, 5.0425434] }
geometry: { type: 'Point', coordinates: [-75.4923199, 5.0425434] },
},
{
type: 'Feature',
properties: { slug: 'medellin', conteo: 85 },
geometry: { type: 'Point', coordinates: [-75.497473, 5.4558195] }
geometry: { type: 'Point', coordinates: [-75.497473, 5.4558195] },
},
{
type: 'Feature',
properties: { slug: 'nivel-internacional', conteo: 1 },
geometry: { type: 'Point', coordinates: [-74.1134451, 4.6359316] }
geometry: { type: 'Point', coordinates: [-74.1134451, 4.6359316] },
},
{
type: 'Feature',
properties: { slug: 'nivel-nacional', conteo: 10 },
geometry: { type: 'Point', coordinates: [-73.5163515, 3.54245] }
geometry: { type: 'Point', coordinates: [-73.5163515, 3.54245] },
},
{
type: 'Feature',
properties: { slug: 'orinoquia', conteo: 6 },
geometry: { type: 'Point', coordinates: [-70.7493953, 7.013354] }
geometry: { type: 'Point', coordinates: [-70.7493953, 7.013354] },
},
{
type: 'Feature',
properties: { slug: 'palmira', conteo: 20 },
geometry: { type: 'Point', coordinates: [-76.3099641, 3.5119486] }
geometry: { type: 'Point', coordinates: [-76.3099641, 3.5119486] },
},
{
type: 'Feature',
properties: { slug: 'palmira', conteo: 20 },
geometry: { type: 'Point', coordinates: [-76.3099641, 3.5119486] }
geometry: { type: 'Point', coordinates: [-76.3099641, 3.5119486] },
},
{
type: 'Feature',
properties: { slug: 'palmira-medellin', conteo: 1 },
geometry: { type: 'Point', coordinates: [-76.306479, 3.517151] }
geometry: { type: 'Point', coordinates: [-76.306479, 3.517151] },
},
{
type: 'Feature',
properties: { slug: 'tumaco', conteo: 4 },
geometry: { type: 'Point', coordinates: [-78.827125, 1.7099745] }
}
]
}
geometry: { type: 'Point', coordinates: [-78.827125, 1.7099745] },
},
],
};
const contenedorMapa: Ref<HTMLDivElement | null> = ref(null)
const contenedorMapa: Ref<HTMLDivElement | null> = ref(null);
onMounted(() => {
if (!contenedorMapa.value) return
let mapa: Map
if (!contenedorMapa.value) return;
let mapa: Map;
// POR HACER: Cambiar el estilo
const estilo = 'mapbox://styles/enflujo/clpcruhsj005z01qr10czhk1d'
mapbox.accessToken =
'pk.eyJ1IjoiZW5mbHVqbyIsImEiOiJjbDNrOXNndXQwMnZsM2lvNDd4N2x0M3dvIn0.eWs4BHs67PcETEUI00T66Q'
const estilo = 'mapbox://styles/enflujo/clpcruhsj005z01qr10czhk1d';
mapbox.accessToken = 'pk.eyJ1IjoiZW5mbHVqbyIsImEiOiJjbDNrOXNndXQwMnZsM2lvNDd4N2x0M3dvIn0.eWs4BHs67PcETEUI00T66Q';
mapa = new mapbox.Map({
container: contenedorMapa.value,
style: estilo,
center: [-73.8343, 3],
zoom: 4,
attributionControl: false
})
attributionControl: false,
});
mapa.on('load', () => {
mapa.addSource('colectivos-sedes', {
type: 'geojson',
data: datosGeo
})
data: datosGeo,
});
mapa.addLayer({
id: 'colectivos-layer',
Expand All @@ -113,13 +112,13 @@ onMounted(() => {
'circle-radius': 8,
'circle-stroke-width': 2,
'circle-color': '#c30a93',
'circle-stroke-color': 'white'
}
})
'circle-stroke-color': 'white',
},
});
// POR HACER: Clústers según cantidad de colectivos por sedes
})
})
});
});
</script>

<template>
Expand Down
41 changes: 0 additions & 41 deletions aplicaciones/www/cuenco-unal/src/components/HelloWorld.vue

This file was deleted.

10 changes: 5 additions & 5 deletions aplicaciones/www/cuenco-unal/src/components/ListaNodos.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script setup lang="ts">
import type { ElementoLista, Listas } from '../tipos'
import { nombresListas } from '../utilidades/cerebro'
import type { ElementoLista, Listas } from '../tipos';
import { nombresListas } from '../utilidades/cerebro';
defineProps<{
id: keyof Listas
lista: ElementoLista[]
}>()
id: keyof Listas;
lista: ElementoLista[];
}>();
</script>

<template>
Expand Down
20 changes: 10 additions & 10 deletions aplicaciones/www/cuenco-unal/src/components/ListasColectivos.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import type { Ref } from 'vue'
import ListaNodos from '../components/ListaNodos.vue'
import { Listas } from '@/tipos'
import { onMounted, ref } from 'vue';
import type { Ref } from 'vue';
import ListaNodos from '../components/ListaNodos.vue';
import { Listas } from '@/tipos';
defineProps<{}>()
defineProps<{}>();
const listas: Ref<Listas | undefined> = ref()
const listas: Ref<Listas | undefined> = ref();
onMounted(async () => {
try {
const datosListas = await fetch('datos/listasColectivos.json').then((res) => res.json())
if (datosListas) listas.value = datosListas
const datosListas = await fetch('datos/listasColectivos.json').then((res) => res.json());
if (datosListas) listas.value = datosListas;
} catch (error) {
console.error('Problema descargando datos de listas de colectivos', error)
console.error('Problema descargando datos de listas de colectivos', error);
}
})
});
</script>

<template>
Expand Down
20 changes: 10 additions & 10 deletions aplicaciones/www/cuenco-unal/src/components/ListasPublicaciones.vue
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import type { Ref } from 'vue'
import ListaNodos from '../components/ListaNodos.vue'
import { Listas } from '@/tipos'
import { onMounted, ref } from 'vue';
import type { Ref } from 'vue';
import ListaNodos from '../components/ListaNodos.vue';
import { Listas } from '@/tipos';
const listas: Ref<Listas | undefined> = ref()
const listas: Ref<Listas | undefined> = ref();
onMounted(async () => {
try {
const datosListas = await fetch('datos/listas.json').then((res) => res.json())
if (datosListas) listas.value = datosListas
const datosListas = await fetch('datos/listas.json').then((res) => res.json());
if (datosListas) listas.value = datosListas;
} catch (error) {
console.error('Problema descargando datos de listas de publicaciones', error)
console.error('Problema descargando datos de listas de publicaciones', error);
}
})
});
defineProps<{}>()
defineProps<{}>();
</script>

<template>
Expand Down
18 changes: 9 additions & 9 deletions aplicaciones/www/cuenco-unal/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import './scss/estilos.scss'
import './scss/estilos.scss';

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { createApp } from 'vue';
import { createPinia } from 'pinia';

import App from './App.vue'
import router from './router'
import App from './App.vue';
import router from './router';

const app = createApp(App)
const app = createApp(App);

app.use(createPinia())
app.use(router)
app.use(createPinia());
app.use(router);

app.mount('#app')
app.mount('#app');
20 changes: 10 additions & 10 deletions aplicaciones/www/cuenco-unal/src/router/index.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import { createRouter, createWebHistory } from 'vue-router'
import Inicio from '@/views/VistaInicio.vue'
import { createRouter, createWebHistory } from 'vue-router';
import Inicio from '@/views/VistaInicio.vue';

const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
name: 'inicio',
component: Inicio
component: Inicio,
},
{
path: '/colectivos-ambitos',
name: 'colectivos-ambitos',
// route level code-splitting
// this generates a separate chunk (Colectivos.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('../views/VistaColectivos.vue')
component: () => import('../views/VistaColectivos.vue'),
},
{
path: '/publicaciones',
name: 'publicaciones',
component: () => import('../views/VistaPublicaciones.vue')
component: () => import('../views/VistaPublicaciones.vue'),
},
{
path: '/encuentros',
name: 'encuentros',
component: () => import('../views/VistaEncuentros.vue')
}
]
})
component: () => import('../views/VistaEncuentros.vue'),
},
],
});

export default router
export default router;
14 changes: 7 additions & 7 deletions aplicaciones/www/cuenco-unal/src/stores/counter.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import { ref, computed } from 'vue';
import { defineStore } from 'pinia';

export const useCounterStore = defineStore('counter', () => {
const count = ref(0)
const doubleCount = computed(() => count.value * 2)
const count = ref(0);
const doubleCount = computed(() => count.value * 2);
function increment() {
count.value++
count.value++;
}

return { count, doubleCount, increment }
})
return { count, doubleCount, increment };
});
4 changes: 2 additions & 2 deletions aplicaciones/www/cuenco-unal/src/utilidades/cerebro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export const nombresListas = {
responsables: 'Responsables',
sedes: 'Sedes',
modalidades: 'Modalidades',
estados: 'Estado'
}
estados: 'Estado',
};
2 changes: 1 addition & 1 deletion aplicaciones/www/cuenco-unal/src/views/VistaColectivos.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import ListasColectivos from '@/components/ListasColectivos.vue'
import ListasColectivos from '@/components/ListasColectivos.vue';
</script>

<template>
Expand Down
Loading

0 comments on commit e5cce5c

Please sign in to comment.