From 5a3d07336fdaca27b77d8535ca6acdf2d48400fe Mon Sep 17 00:00:00 2001 From: les Date: Wed, 7 Aug 2019 19:15:15 +0200 Subject: [PATCH] refactoring --- docs/{ => _drafts}/admin.md | 2 +- docs/{ => _drafts}/contribute.md | 0 docs/{ => _drafts}/usage.md | 0 docs/_site/404.html | 42 ---- docs/_site/admin.html | 318 ------------------------- docs/_site/assets/js/search-data.json | 57 ++--- docs/_site/config.html | 42 ---- docs/_site/contribute.html | 319 -------------------------- docs/_site/dev.html | 48 ---- docs/_site/dev/migration.html | 42 ---- docs/_site/dev/structure.html | 42 ---- docs/_site/feed.xml | 2 +- docs/_site/index.html | 42 ---- docs/_site/install.html | 42 ---- docs/_site/install/debian.html | 42 ---- docs/_site/install/docker.html | 42 ---- docs/_site/install/nginx.html | 42 ---- docs/_site/instances.html | 42 ---- docs/_site/usage.html | 309 ------------------------- locales/en.js | 90 +++----- locales/it.js | 5 +- package.json | 1 + pages/event/_id.vue | 11 +- pages/export.vue | 7 + views/feed/rss.pug | 9 +- 25 files changed, 71 insertions(+), 1527 deletions(-) rename docs/{ => _drafts}/admin.md (91%) rename docs/{ => _drafts}/contribute.md (100%) rename docs/{ => _drafts}/usage.md (100%) delete mode 100644 docs/_site/admin.html delete mode 100644 docs/_site/contribute.html delete mode 100644 docs/_site/usage.html diff --git a/docs/admin.md b/docs/_drafts/admin.md similarity index 91% rename from docs/admin.md rename to docs/_drafts/admin.md index e57b4963..1884e866 100644 --- a/docs/admin.md +++ b/docs/_drafts/admin.md @@ -16,4 +16,4 @@ nav_order: 5 ## Add user ## Enable registration ## Confirm registration -## Confirm event \ No newline at end of file +## Confirm event diff --git a/docs/contribute.md b/docs/_drafts/contribute.md similarity index 100% rename from docs/contribute.md rename to docs/_drafts/contribute.md diff --git a/docs/usage.md b/docs/_drafts/usage.md similarity index 100% rename from docs/usage.md rename to docs/_drafts/usage.md diff --git a/docs/_site/404.html b/docs/_site/404.html index 28a41640..2fcb2420 100644 --- a/docs/_site/404.html +++ b/docs/_site/404.html @@ -140,12 +140,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -166,26 +160,6 @@ - - - - - - - - - - - - @@ -241,16 +209,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - - @@ -164,26 +158,6 @@ - - - - - - - - - - - - @@ -239,16 +207,6 @@ - - - - - -
  • Se hai Android, ti consigliamo Flym o Feeder
  • -
  • Per iPhone/iPad puoi usare Feed4U
  • -
  • Per il computer fisso/portatile consigliamo Feedbro, da installare all'interno di Firefox o di Chrome e compatibile con tutti i principali sistemi operativi.
  • -
    - Aggiungendo questo link al tuo lettore di feed, rimarrai aggiornata.`, - ical_description: `I computer e gli smartphone sono comunemente attrezzati con un'applicazione per gestire un calendario. A questi programmi solitamente è possibile far importare un calendario remoto.`, - list_description: `Se hai un sito web e vuoi mostrare una lista di eventi, puoi usare il seguente codice` +

    With rss feeds you use a special app to receive updates from the sites that interest you most. It's a good way to follow many sites very quickly, without the need to create an account or other complications.

    + +
  • If you have Android, we recommend Flym or Feeder
  • +
  • For iPhone / iPad you can use Feed4U
  • +
  • For the desktop / laptop we recommend Feedbro, to be installed in Firefox or Chrome and compatible with all major operating systems.
  • +
    +Adding this link to your feed reader will keep you up to date.`, + ical_description: `Computers and smartphones are commonly equipped with an application to manage a calendar. These programs can usually be used to import a remote calendar.`, + list_description: `If you have a website and want to show a list of events, you can use the following code` }, register: { - description: `I movimenti hanno bisogno di organizzarsi e autofinanziarsi.
    Questo è un dono per voi, usatelo solo per eventi non commerciali e ovviamente antifascisti, antisessisti, antirazzisti. -
    Prima di poter pubblicare dobbiamo approvare l'account, considera che dietro questo sito ci sono delle persone di - carne e sangue, scrivici quindi due righe per farci capire che eventi vorresti pubblicare.`, + description: ` + Social movements need to organize and self-finance.
    This is a gift for you, use it only for non-commercial and obviously anti-fascist, anti-sexist, anti-racist events. +
    Before you can publish we must approve the account , consider that behind this site there are people of + flesh and blood, so write us two lines to let us know what events you would like to publish.`, error: 'Error: ', complete: 'Registration has to be confirmed.' }, event: { anon: 'Anon', - anon_description: `Puoi inserire un evento senza registrarti o fare il login, - ma in questo caso dovrai aspettare che qualcuno lo legga confermando che si - tratta di un evento adatto a questo spazio, delegando questa scelta. Inoltre non sarà possibile modificarlo.

    - Puoi invece fare il login o registrarti, - altrimenti vai avanti e riceverai una risposta il prima possibile. `, - same_day: 'Same day', - what_description: 'Event\'s name', + anon_description: `You can add an event without registering or logging in, but in this case you will have to wait for someone to read it + confirming that it is an event suitable for this space, delegating this choice. Furthermore it will not be possible to modify it.

    + You can instead log in or register, otherwise go ahead and get an answer as soon as possible.`, + same_day: 'on same day', + what_description: 'Title', description_description: 'Description', tag_description: 'Tag', - media_description: 'You could add an event\'s flyer (optional)', + media_description: 'You can add flyer (optional)', added: 'Event added', added_anon: 'Event added but has to be confirmed.', where_description: `Where's the event? If not present, write it and press enter. `, @@ -113,9 +112,12 @@ export default { remove_confirmation: `Are you sure to remove this event?`, recurrent: `Recurrent`, recurrent_description: 'Choose the frequency and select the days', - multidate_description: 'It\'s a festival? Choose when it starts and when it ends?', + multidate_description: 'It\'s a festival? Choose when it starts and when it ends', multidate: 'More days', normal: 'Normal', + each_week: 'Each week', + each_2w: 'Each two weeks', + each_month: 'Each month', normal_description: 'Choose the day.', recurrent_1w_days: 'Each {days}', recurrent_2w_days: 'A {days} each two', @@ -125,13 +127,13 @@ export default { recurrent_2m_ordinal: '|The {n} {days} a month each two|The {n} {days} a month each two', due: 'due', from: 'From', - image_too_big: 'Image too big! Max 4M', + image_too_big: 'Too big image! Max 4M', interact_with_me_at: 'Interact with me on fediverse at' }, admin: { - place_description: `Nel caso in cui un luogo sia errato o cambi indirizzo, puoi modificarlo.
    Considera che tutti gli eventi associati a questo luogo cambieranno indirizzo (anche quelli passati!)`, - event_confirm_description: 'Puoi confermare qui gli eventi inseriti da utenti anonimi', + place_description: `In the event that a place is incorrect or change address, you can change it.
    Consider that all events associated with this place will change address (even past ones!)`, + event_confirm_description: 'You can confirm here the events entered by anonymous users', delete_user: 'Remove', remove_admin: 'Remove admin', delete_user_confirm: 'Are you sure to remove this user?', @@ -154,8 +156,8 @@ export default { change_password: 'Modify your password', password_updated: 'Password updated', danger_section: 'Dangerous section', - remove_account: 'Premendo il seguente tasto il tuo utente verrà eliminato. Gli eventi da te pubblicati invece no.', - remove_account_confirm: 'Stai per eliminare definitivamente il tuo account', + remove_account: 'By pressing the following button your user will be deleted. The events you published instead no.', + remove_account_confirm: 'You are about to permanently delete your account', }, err: { @@ -172,36 +174,6 @@ export default { }, about: ` -

    - Gancio is a shared agenda for local communities. - - Gancio e' un progetto dell'underscore hacklab e uno dei - servizi di cisti.org.

    - -
    Cos'è gancio?
    -

    Uno strumento di condivisione di eventi per comunità radicali. - Dentro gancio puoi trovare e inserire eventi. - Gancio, come tutto cisti.org è uno strumento - antisessista, antirazzista, antifascista e anticapitalista, riflettici quando - pubblichi un evento.

    - -
    Ok, ma cosa vuol dire gancio?
    -

    - Se vieni a Torino e dici: "ehi, ci diamo un gancio alle 8?" nessuno si presenterà con i guantoni per fare a mazzate. - Darsi un gancio vuol dire beccarsi alle ore X in un posto Y.

    - - - - -
    Contatti
    -

    - Hai scritto una nuova interfaccia per gancio? Vuoi aprire un nuovo nodo di gancio nella tua città? - C'è qualcosa che vorresti migliorare? Per contribuire i sorgenti sono liberi e disponibili - qui. Aiuti e suggerimenti sono sempre benvenuti, puoi scriverci - su underscore chicciola autistici.org

    +

    Gancio is a shared agenda for local communities.

    ` -} - +} \ No newline at end of file diff --git a/locales/it.js b/locales/it.js index 0c1ed24d..d50c2a67 100644 --- a/locales/it.js +++ b/locales/it.js @@ -99,7 +99,7 @@ export default { anon_description: `Puoi inserire un evento senza registrarti o fare il login, ma in questo caso dovrai aspettare che qualcuno lo legga confermando che si tratta di un evento adatto a questo spazio, delegando questa scelta. Inoltre non sarà possibile modificarlo.

    - Puoi invece fare il login o registrarti, + Puoi invece fare il login o registrarti, altrimenti vai avanti e riceverai una risposta il prima possibile. `, same_day: 'Stesso giorno', what_description: 'Nome evento', @@ -209,5 +209,4 @@ export default { su underscore chicciola autistici.org

    ` -} - +} \ No newline at end of file diff --git a/package.json b/package.json index 20ce6adf..24b54962 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "start": "cross-env sequelize db:migrate && NODE_ENV=production node server/cli.js", "lint": "eslint --ext .js,.vue --ignore-path .gitignore .", "doc": "cd docs && bundle exec jekyll b", + "doc:dev": "cd docs && bundle exec jekyll s --drafts", "migrate:dev": "sequelize db:migrate", "migrate": "NODE_ENV=production sequelize db:migrate" }, diff --git a/pages/event/_id.vue b/pages/event/_id.vue index 9ca948bb..a31b75ea 100644 --- a/pages/event/_id.vue +++ b/pages/event/_id.vue @@ -39,9 +39,10 @@ el-button(plain type='danger' size='mini' @click.prevent='remove') {{$t('common.remove')}} el-button(plain type='primary' size='mini' @click='$router.replace(`/add/${event.id}`)') {{$t('common.edit')}} - small {{event.likes.length}} - {{event.boost.length}} //- comments from fediverse #comments.card-body(v-if='settings.enable_federation') + small.float-right 🔖 {{event.likes.length}} + small.float-right.mr-3 ✊ {{event.boost.length}}
    strong {{$t('common.comments')}} - {{$t('event.interact_with_me_at')}} {{event.user.username}}@{{settings.baseurl|url2host}} @@ -73,7 +74,7 @@ export default { head () { if (!this.event) return {} return { - title: this.event.title, + title: `${this.settings.title} - ${this.event.title}`, meta: [ // hid is used as unique identifier. Do not use `vmid` for it as it will not work { hid: 'description', name: 'description', @@ -100,9 +101,9 @@ export default { try { const [ id, start_datetime ] = params.id.split('_') const event = await $axios.$get(`/event/${id}`) - event.start_datetime = start_datetime ? start_datetime : event.start_datetime + event.start_datetime = start_datetime ? Number(start_datetime) : event.start_datetime event.end_datetime = event.end_datetime - return { event, id } + return { event, id: Number(id) } } catch(e) { error({ statusCode: 404, message: 'Event not found'}) } @@ -114,7 +115,7 @@ export default { let found = false const event = this.filteredEvents.find(e => { if (found) return e - if (e.start_datetime === this.event.start_datetime && e.id === this.event.id) found = true + found = (e.start_datetime === this.event.start_datetime && e.id === this.event.id) }) if (!event) return false if (event.recurrent) { diff --git a/pages/export.vue b/pages/export.vue index 188d2fdc..d620b346 100644 --- a/pages/export.vue +++ b/pages/export.vue @@ -9,6 +9,7 @@ Search el-tabs.mt-2(v-model='type') + //- TOFIX //- el-tab-pane.pt-1(label='email' name='email') //- p(v-html='$t(`export.email_description`)') //- el-form(@submit.native.prevent) @@ -45,6 +46,7 @@ el-button.float-right(plain v-clipboard:copy='listScript' type='primary' icon='el-icon-document') {{$t('common.copy')}} + //- TOFIX //- el-tab-pane.pt-1(label='calendar' name='calendar') //- p(v-html='$t(`export.calendar_description`)') //- //- no-ssr @@ -65,6 +67,11 @@ import { Message } from 'element-ui' export default { name: 'Export', components: { List, Search }, + head () { + return { + title: `${this.settings.title} - ${this.$t('common.export')}` + } + }, data () { return { type: 'feed', diff --git a/views/feed/rss.pug b/views/feed/rss.pug index 716b00ca..67f46d5f 100644 --- a/views/feed/rss.pug +++ b/views/feed/rss.pug @@ -5,18 +5,17 @@ rss(version='2.0') link #{config.baseurl} description #{config.description} language #{config.locale} - //- if events.length - lastBuildDate= new Date(posts[0].publishedAt).toUTCString() each event in events item - title [#{moment(event.start_datetime).format("D-MM-YY")}] #{event.title} @#{event.place.name} + title [#{moment.unix(event.start_datetime).format("YY-MM-DD")}] #{event.title} @#{event.place.name} link #{config.baseurl}/event/#{event.id} description | #{event.title} | #{event.place.name} - #{event.place.address} - | #{moment(event.start_datetime).format("dddd, D MMMM HH:mm")}
    - | + | (#{moment.unix(event.start_datetime).format("dddd, D MMMM HH:mm")})
    + if (event.image_path) + | |
    !{event.description}
    | ]]> pubDate= new Date(event.createdAt).toUTCString()