diff --git a/.gitignore b/.gitignore index 2ea2de15..aa13309a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ config/development.json gancio_config.json config.json db.sqlite +thumb +docs/_site +.vscode ### Node template # Logs diff --git a/CHANGELOG b/CHANGELOG index c0ec4258..74edce93 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,93 @@ All notable changes to this project will be documented in this file. +### 0.24.0 +- New Euskara language from Basque Country, thanks @hacklabkelo +- fix feed with filters +- cleaner homepage +- fix next/prev for recurrent events +- fix some history navigation issue +- fix blank lines in description +- upgrade deps +- better custom logo management +- fix settings update + +### 0.23.0 +- send AP Event Object instead of Note +- show only future unconfirmed events in admin panel +- new polish locale +- add friendly instances (an additional menu is shown) +- use user's logo not project's logo in federation +- start WPGancio plugin +- support media upload via url (API only) +- confirm before remove a resource +- confirm before remove a friendly instance +- event description supports some html tag +- fix redirect after login + +### 0.22.0 +- add admin announcement support (fix #74) +- each instance has a specific timezone you can choose from admin's panel +- refactoring language management (you can choose a default instance's language): + usually UX language is choosen looking at Accepted-Language header but there + are messages not generated from an http request (eg. sending events via AP). + In those cases a default instance's language is choosen (default 'en'). +- use lazy loaded images +- better mobile experience for admins +- single day only recurring events +- fix user block in fediverse moderation +- filter and linkify content from fediverse +- add a lot of help strings in admin panel +- use html2text for event description in og: meta +- update deps +- fix a moment.js typo from/to issue +- fix #73 + +### 0.21.0 +- a new recurring events logic (a la taskwarrior): + - each occurrence of a recurring event could be personalized. + - occurrence of recurring events are skippable. + - occurrence generation could be paused. +- support `h-event` microformats! in homepage and in any single event's page +- add a background task manager (email, recurring events creation) +- sanitize html content coming from fediverse and event description with dompurify + - also remove `fbclid` params in links +- front end search optimization +- use oauth2 for everything, password flow for webclient, this also fix + some issue with authentication +- clickable tags / places @ home (to add them as filters) +- use a cleaner menububble for the new editor +- add local smtp and sendmail options on configuration setup +- check permission for resource removal request from fediverse +- add resource from fediverse also when inReplyTo is another resource +- automatic API documentation inclusion in docs +- split moderation in another tab inside admin panel +- use axios instead of fetch everywhere +- lot of ux improvements & error handling +- search links in event description with linkifyjs while add/edit events +- remove text templates for emails and use html2text instead +- fix email unique index for users! + + +### 0.20.0 + - New layout (navbar/footer/visible filters) + - two month calendar on large display + - admin could edit title, description, about, favicon & logo directly form admin panel + - new add event layout => https://demo.gancio.org/add + - new editor to describe events (bold, italic, link) supported also using copy/paste + - the editor also support live markdown (try using ### at line start) + - start oauth2 server implementation (documentation: https://gancio.org/dev/oauth) + - add fediverse moderation + - fix embedding an event via iframe + - images converted in .webp + - new catalan translation, thanks @fadelkon + +### 0.17.14 +- [locale] add catalan +- [fix] fedi outbox + +### 0.17.12 +- [ui] add admin section on event page in mobile #63 +- [fix] remove username from users ### 0.17.11 - [refactor] s/fed_user/ap_user diff --git a/assets/editor.less b/assets/editor.less new file mode 100644 index 00000000..b7b8c975 --- /dev/null +++ b/assets/editor.less @@ -0,0 +1,61 @@ + +.editor { + position: relative; + overflow-y: auto; + padding-top: 1.7em; + scrollbar-width: thin; + + &.with-border { + border: 1px solid #ddd; + border-radius: 5px; + } + + .content { + padding: 0px 5px 0px 5px; + flex: 1; + scrollbar-width: thin; + overflow-y: auto; + } + + .menububble { + position: absolute; + display: flex; + overflow: hidden; + opacity: 0; + z-index: 1; + background: #dddddd; + transform: translateX(-50%); + border-radius: 3px; + padding: 0.07rem; + transition: opacity 0.2s, visibility 0.2s, left .2s, bottom .2s; + visibility: hidden; + + &.is-active { + opacity: 1; + visibility: visible; + } + input { + padding: 0; + margin: 1px; + display: block; + border: 0; + color: #444; + font-size: .8em; + border-radius: 3px; + line-height: 100%; + transition: width .2s; + padding-left: 5px; + flex-grow: 1; + } + + .fa-icon { + width: auto; + font-size: 10px; + height: 1.4em; /* or any other relative font sizes */ + /* You would have to include the following two lines to make this work in Safari */ + // max-width: 100%; + max-height: 100%; + } + + } +} diff --git a/assets/event.less b/assets/event.less new file mode 100644 index 00000000..2bf07805 --- /dev/null +++ b/assets/event.less @@ -0,0 +1,56 @@ +// .event { +// width: 320px; +// max-width: 450px; +// flex-grow: 1; +// margin: .2em; +// background-color: #202020; +// overflow: hidden; + +// a:hover { +// text-decoration: none; +// .title { +// border-bottom: 1px solid #888; +// color: white; +// } +// } + +// .title { +// margin-left: 1rem; +// margin-top: 1rem; +// margin-right: 1rem; +// border-bottom: 1px solid #333; +// transition: border-color .5s; +// font-size: 1.2em; +// max-height: 3em; +// overflow: hidden; +// color: white; +// font-weight: bold; +// } + +// .card-footer { +// max-height: 4.5em; +// overflow: hidden; +// padding: .25rem 0.5rem; +// line-height: 1.8rem; +// min-height: 2.2rem; +// } + +// .card-body { +// overflow: hidden; +// } + +// .description { +// color: #999; +// font-size: 0.8em; +// overflow: hidden; +// max-height: 100%; +// } + +// .el-image { width: 100% } +// img { +// width: 100%; +// max-height: 250px; +// object-fit: cover; +// object-position: top; +// } +// } diff --git a/assets/helper.js b/assets/helper.js new file mode 100644 index 00000000..8c0ed801 --- /dev/null +++ b/assets/helper.js @@ -0,0 +1,39 @@ +import take from 'lodash/take' +import get from 'lodash/get' + +export function attributesFromEvents (_events, _tags) { + const colors = ['blue', 'orange', 'yellow', 'teal', 'indigo', 'green', 'red', 'purple', 'pink', 'gray'] + const tags = take(_tags, 10).map(t => t.tag) + let attributes = [] + attributes.push({ key: 'today', dates: new Date(), highlight: { color: 'green', fillMode: 'outline' } }) + + function getColor (event) { + const color = { class: 'vc-rounded-full', color: 'blue', fillMode: 'normal' } + const tag = get(event, 'tags[0]') + if (!tag) { return color } + const idx = tags.indexOf(tag) + if (idx < 0) { return color } + color.color = colors[idx] + return color + } + + attributes = attributes.concat(_events + .filter(e => !e.multidate) + .map(e => { + return { + key: e.id, + dot: getColor(e), + dates: new Date(e.start_datetime * 1000) + } + })) + + attributes = attributes.concat(_events + .filter(e => e.multidate) + .map(e => ({ + key: e.id, + highlight: getColor(e), + dates: { start: new Date(e.start_datetime * 1000), end: new Date(e.end_datetime * 1000) } + }))) + + return attributes +} diff --git a/assets/style.less b/assets/style.less index 5f4516ba..ff847188 100644 --- a/assets/style.less +++ b/assets/style.less @@ -1,116 +1,98 @@ -@home_background: #222C32; -@background: white; -@success: #c7ffbc; +html, body { + scrollbar-width: thin; + overflow: auto !important; + scrollbar-color: #FF4511 #111; + font-family: sans-serif; +} -#__nuxt, #__layout { - height: 100%; +li { + margin-left: 10px; +} + +.v-dialog .theme--dark.v-card { + background-color: #434343; +} + +.v-application .p-description.text-body-1 { + letter-spacing: normal !important; } #home { - background-color: @home_background; - min-height: 100%; + max-width: 1400px; + padding-right: 0px; + overflow: hidden; } -a, a:hover { - text-decoration: none; +#events { + margin: 0 auto; + display: flex; + flex-wrap: wrap; + justify-content: center; } -html, body { - margin: 0px; - background-color: @background; - width: 100%; - height: 100%; - box-sizing: border-box; - font-family: BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif !important; - font-size: 15px; +.container { + max-width: 1400px; } -* { - box-sizing: border-box; +.v-dialog { + width: 600px; + max-width: 800px; } -.el-form-item { - margin-bottom: 5px; +.theme--dark.v-list { + background-color: #333; } -.el-main { - max-width: 1000px; - border-radius: 0px; - margin: auto; - padding: 10px; - overflow: unset; +.v-autocomplete__content.v-menu__content { + scrollbar-width: thin; + scrollbar-color: #FF4511 #111; } -.el-select-dropdown { - max-width: 100%; - left: 0px; -} +// EVENT +.event { + display: flex; + position: relative; + flex-direction: column; + width: 330px; + max-width: 500px; + flex-grow: 1; + margin-top: .4em; + margin-right: .4em; + overflow: hidden; -.page-enter-active, .page-leave-active { - transition: opacity .2s, transform .3s; -} -.page-enter, .page-leave-active { - transition: opacity .3s, transform .2s; - opacity: 0; - transform: translateX(30px); -} - -pre { - font-family: BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif !important; - margin-bottom: 0px; - white-space: pre-line; - font-family: unset; -} - -.el-popover { - word-break: normal; -} - -.el-dialog { - z-index: 100; - max-width: 550px; - .el-dialog__body { - word-break: unset; + .title { + display: block; + max-height: 3.3em; + overflow: hidden; + margin: 0.5rem 1rem 0.5rem 1rem; + // color: white; + border-bottom: 1px solid rgba(4,4,4,0.2); + font-size: 1.2em !important; + line-height: 1.1em; + font-weight: 500; } - .el-dialog__headerbtn { - font-size: 27px; - top: 9px; - right: 10px; - .el-dialog__close { - color: red; - // padding: 5px; - // background-color: #f0f0f0; - // border-radius: 22px; - // border: 1px solid #f0f0f0; + + .body { + flex: 1 1 auto; + } + + .img { + width: 100%; + max-height: 250px; + object-fit: cover; + object-position: top; + } + + .place { + max-width: 100%; + span { + display: block; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } } - p { - font-size: 16px; + a { + text-decoration: none; } -} - -.el-input__icon { - font-size: 20px; -} - -@media only screen and (max-width: 768px) { - .el-dialog { - margin-top: 0px !important; - border-radius: 0px; - width: 100%; - } - - html { - font-size: 13px; - } - - .el-main { - margin-top: 0px !important; - border-radius: 0px; - padding: 5px; - } - - .el-menu-item { - padding: 0px 17px; - } -} +} \ No newline at end of file diff --git a/components/Announcement.vue b/components/Announcement.vue new file mode 100644 index 00000000..62a14fa0 --- /dev/null +++ b/components/Announcement.vue @@ -0,0 +1,20 @@ + + diff --git a/components/Calendar.vue b/components/Calendar.vue index fb7fba4f..4e49ebfa 100644 --- a/components/Calendar.vue +++ b/components/Calendar.vue @@ -1,107 +1,61 @@ diff --git a/components/Confirm.vue b/components/Confirm.vue new file mode 100644 index 00000000..57c5b279 --- /dev/null +++ b/components/Confirm.vue @@ -0,0 +1,84 @@ + + + + diff --git a/components/Editor.vue b/components/Editor.vue new file mode 100644 index 00000000..b2d353fc --- /dev/null +++ b/components/Editor.vue @@ -0,0 +1,319 @@ + + + diff --git a/components/Event.vue b/components/Event.vue index 3364b997..e8009b26 100644 --- a/components/Event.vue +++ b/components/Event.vue @@ -1,132 +1,46 @@ - + \ No newline at end of file diff --git a/pages/event/followMe.vue b/components/FollowMe.vue similarity index 54% rename from pages/event/followMe.vue rename to components/FollowMe.vue index a351e060..7b9ddc55 100644 --- a/pages/event/followMe.vue +++ b/components/FollowMe.vue @@ -1,42 +1,39 @@ @@ -60,4 +72,4 @@ export default { .instance_thumb { height: 20px; } - \ No newline at end of file + diff --git a/components/Footer.vue b/components/Footer.vue new file mode 100644 index 00000000..873cd5ca --- /dev/null +++ b/components/Footer.vue @@ -0,0 +1,33 @@ + + diff --git a/components/Home.vue b/components/Home.vue deleted file mode 100644 index 6f2918ca..00000000 --- a/components/Home.vue +++ /dev/null @@ -1,61 +0,0 @@ - - - - diff --git a/components/List.vue b/components/List.vue index 32821651..7984c837 100644 --- a/components/List.vue +++ b/components/List.vue @@ -1,22 +1,20 @@ -