Rework homepage and add a (fancy) about section

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2019-10-07 16:48:13 +02:00
parent bcab397b4f
commit fa781fc840
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
24 changed files with 624 additions and 347 deletions

View file

@ -10,8 +10,10 @@ config :mobilizon,
ecto_repos: [Mobilizon.Storage.Repo] ecto_repos: [Mobilizon.Storage.Repo]
config :mobilizon, :instance, config :mobilizon, :instance,
name: System.get_env("MOBILIZON_INSTANCE_NAME") || "Localhost", name: System.get_env("MOBILIZON_INSTANCE_NAME") || "My Mobilizon Instance",
description: System.get_env("MOBILIZON_INSTANCE_DESCRIPTION") || "This is a Mobilizon instance", description:
System.get_env("MOBILIZON_INSTANCE_DESCRIPTION") ||
"Change this to a proper description of your instance",
version: "1.0.0-dev", version: "1.0.0-dev",
hostname: System.get_env("MOBILIZON_INSTANCE_HOST") || "localhost", hostname: System.get_env("MOBILIZON_INSTANCE_HOST") || "localhost",
registrations_open: System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_OPEN") || false, registrations_open: System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_OPEN") || false,

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View file

@ -33,7 +33,8 @@ A simple card for an event
<div class="tag-container" v-if="event.tags"> <div class="tag-container" v-if="event.tags">
<b-tag v-for="tag in event.tags.slice(0, 3)" :key="tag.slug" type="is-secondary">{{ tag.title }}</b-tag> <b-tag v-for="tag in event.tags.slice(0, 3)" :key="tag.slug" type="is-secondary">{{ tag.title }}</b-tag>
</div> </div>
<img src="https://picsum.photos/g/400/225/?random" /> <img v-if="event.picture" :src="event.picture.url" />
<img v-else src="https://picsum.photos/g/400/225/?random" />
</figure> </figure>
</div> </div>
<div class="content"> <div class="content">
@ -78,7 +79,6 @@ import { IEvent, ParticipantRole } from '@/types/event.model';
import { Component, Prop, Vue } from 'vue-property-decorator'; import { Component, Prop, Vue } from 'vue-property-decorator';
import DateCalendarIcon from '@/components/Event/DateCalendarIcon.vue'; import DateCalendarIcon from '@/components/Event/DateCalendarIcon.vue';
import { IActor, IPerson, Person } from '@/types/actor'; import { IActor, IPerson, Person } from '@/types/actor';
const lineClamp = require('line-clamp');
export interface IEventCardOptions { export interface IEventCardOptions {
hideDate: boolean; hideDate: boolean;
@ -91,9 +91,6 @@ export interface IEventCardOptions {
components: { components: {
DateCalendarIcon, DateCalendarIcon,
}, },
mounted() {
lineClamp(this.$refs.title, 3);
},
}) })
export default class EventCard extends Vue { export default class EventCard extends Vue {
@Prop({ required: true }) event!: IEvent; @Prop({ required: true }) event!: IEvent;
@ -124,9 +121,35 @@ export default class EventCard extends Vue {
@import "../../variables"; @import "../../variables";
a.card { a.card {
border: none; display: block;
background: $secondary; background: $secondary;
&:hover {
// box-shadow: 0 0 5px 0 rgba(0, 0, 0, 1);
transform: scale(1.01, 1.01);
&:after {
opacity: 1;
}
}
border-radius: 5px;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
&:after {
content: "";
border-radius: 5px;
position: absolute;
z-index: -1;
top: 0;
left: 0;
width: 100%;
height: 100%;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
opacity: 0;
transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}
div.tag-container { div.tag-container {
position: absolute; position: absolute;
top: 10px; top: 10px;
@ -166,11 +189,14 @@ export default class EventCard extends Vue {
} }
.title { .title {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
font-weight: 400; font-weight: 400;
line-height: 1em;
font-size: 1.6em; font-size: 1.6em;
padding-bottom: 5px;
margin-top: auto; margin-top: auto;
min-height: 3.5rem;
} }
} }
span.organizer-place-wrapper { span.organizer-place-wrapper {

View file

@ -52,14 +52,14 @@ export default {
<template> <template>
<article class="box"> <article class="box">
<div class="title-wrapper">
<div class="date-component" v-if="!mergedOptions.hideDate">
<date-calendar-icon :date="participation.event.beginsOn" />
</div>
<h2 class="title" ref="title">{{ participation.event.title }}</h2>
</div>
<div class="columns"> <div class="columns">
<div class="content column"> <div class="content column">
<div class="title-wrapper">
<div class="date-component" v-if="!mergedOptions.hideDate">
<date-calendar-icon :date="participation.event.beginsOn" />
</div>
<h2 class="title" ref="title">{{ participation.event.title }}</h2>
</div>
<div> <div>
<span v-if="participation.event.physicalAddress && participation.event.physicalAddress.locality">{{ participation.event.physicalAddress.locality }} - </span> <span v-if="participation.event.physicalAddress && participation.event.physicalAddress.locality">{{ participation.event.physicalAddress.locality }} - </span>
<span v-if="participation.actor.id === participation.event.organizerActor.id">{{ $t("You're organizing this event") }}</span> <span v-if="participation.actor.id === participation.event.organizerActor.id">{{ $t("You're organizing this event") }}</span>
@ -211,6 +211,7 @@ export default class EventListCard extends mixins(ActorMixin, EventMixin) {
div.title-wrapper { div.title-wrapper {
display: flex; display: flex;
align-items: center;
div.date-component { div.date-component {
flex: 0; flex: 0;
@ -222,6 +223,7 @@ export default class EventListCard extends mixins(ActorMixin, EventMixin) {
line-height: 1em; line-height: 1em;
font-size: 1.6em; font-size: 1.6em;
padding-bottom: 5px; padding-bottom: 5px;
margin: auto 0;
} }
} }

View file

@ -97,6 +97,7 @@ query LoggedUserParticipations($afterDateTime: DateTime, $beforeDateTime: DateTi
uuid, uuid,
title, title,
picture { picture {
id,
url, url,
alt alt
}, },
@ -143,6 +144,7 @@ export const LOGGED_USER_DRAFTS = gql`
uuid, uuid,
title, title,
picture { picture {
id,
url, url,
alt alt
}, },

View file

@ -7,7 +7,8 @@ export const DASHBOARD = gql`
uuid, uuid,
title, title,
picture { picture {
alt id,
alt,
url url
}, },
}, },

View file

@ -110,6 +110,10 @@ export const FETCH_EVENT = gql`
uuid, uuid,
title, title,
beginsOn, beginsOn,
picture {
id,
url
}
physicalAddress { physicalAddress {
description description
}, },

View file

@ -25,6 +25,7 @@ export const REPORTS = gql`
uuid, uuid,
title, title,
picture { picture {
id,
url url
} }
}, },
@ -58,6 +59,7 @@ const REPORT_FRAGMENT = gql`
title, title,
description, description,
picture { picture {
id,
url url
} }
}, },

View file

@ -1,272 +1,298 @@
{ {
"A validation email was sent to {email}": "A validation email was sent to {email}", "A user-friendly, emancipatory and ethical tool for gathering, organising, and mobilising.": "A user-friendly, emancipatory and ethical tool for gathering, organising, and mobilising.",
"About this event": "About this event", "A validation email was sent to {email}": "A validation email was sent to {email}",
"About this instance": "About this instance", "About Mobilizon": "About Mobilizon",
"About": "About", "About this event": "About this event",
"Add a new profile": "Add a new profile", "About this instance": "About this instance",
"Add a tag": "Add a tag", "About": "About",
"Add an address": "Add an address", "Add a new profile": "Add a new profile",
"Add to my calendar": "Add to my calendar", "Add a tag": "Add a tag",
"Add": "Add", "Add an address": "Add an address",
"Additional comments": "Additional comments", "Add to my calendar": "Add to my calendar",
"Administration": "Administration", "Add": "Add",
"Allow all comments": "Allow all comments", "Additional comments": "Additional comments",
"Approve": "Approve", "Administration": "Administration",
"Are you going to this event?": "Are you going to this event?", "Allow all comments": "Allow all comments",
"Are you sure you want to cancel the event creation? You'll lose all modifications.": "Are you sure you want to cancel the event creation? You'll lose all modifications.", "Approve": "Approve",
"Are you sure you want to cancel the event edition? You'll lose all modifications.": "Are you sure you want to cancel the event edition? You'll lose all modifications.", "Are you going to this event?": "Are you going to this event?",
"Are you sure you want to cancel your participation at event \"{title}\"?": "Are you sure you want to cancel your participation at event \"{title}\"?", "Are you sure you want to cancel the event creation? You'll lose all modifications.": "Are you sure you want to cancel the event creation? You'll lose all modifications.",
"Are you sure you want to delete this event? This action cannot be reverted.": "Are you sure you want to delete this event? This action cannot be reverted.", "Are you sure you want to cancel the event edition? You'll lose all modifications.": "Are you sure you want to cancel the event edition? You'll lose all modifications.",
"Before you can login, you need to click on the link inside it to validate your account": "Before you can login, you need to click on the link inside it to validate your account", "Are you sure you want to cancel your participation at event \"{title}\"?": "Are you sure you want to cancel your participation at event \"{title}\"?",
"By {name}": "By {name}", "Are you sure you want to delete this event? This action cannot be reverted.": "Are you sure you want to delete this event? This action cannot be reverted.",
"Cancel creation": "Cancel creation", "Before you can login, you need to click on the link inside it to validate your account": "Before you can login, you need to click on the link inside it to validate your account",
"Cancel edition": "Cancel edition", "By {name}": "By {name}",
"Cancel my participation request…": "Cancel my participation request…", "Cancel creation": "Cancel creation",
"Cancel my participation…": "Cancel my participation…", "Cancel edition": "Cancel edition",
"Cancel": "Cancel", "Cancel my participation request…": "Cancel my participation request…",
"Category": "Category", "Cancel my participation…": "Cancel my participation…",
"Change my identity…": "Change my identity…", "Cancel": "Cancel",
"Change my password": "Change my password", "Category": "Category",
"Change password": "Change password", "Change my identity…": "Change my identity…",
"Change": "Change", "Change my password": "Change my password",
"Clear": "Clear", "Change password": "Change password",
"Click to select": "Click to select", "Change": "Change",
"Click to upload": "Click to upload", "Clear": "Clear",
"Close comments for all (except for admins)": "Close comments for all (except for admins)", "Click to select": "Click to select",
"Comments on the event page": "Comments on the event page", "Click to upload": "Click to upload",
"Comments": "Comments", "Close comments for all (except for admins)": "Close comments for all (except for admins)",
"Confirm my particpation": "Confirm my particpation", "Comments on the event page": "Comments on the event page",
"Confirmed: Will happen": "Confirmed: Will happen", "Comments": "Comments",
"Continue editing": "Continue editing", "Confirm my particpation": "Confirm my particpation",
"Country": "Country", "Confirmed: Will happen": "Confirmed: Will happen",
"Create a new event": "Create a new event", "Continue editing": "Continue editing",
"Create a new group": "Create a new group", "Country": "Country",
"Create a new identity": "Create a new identity", "Create a new event": "Create a new event",
"Create group": "Create group", "Create a new group": "Create a new group",
"Create my event": "Create my event", "Create a new identity": "Create a new identity",
"Create my group": "Create my group", "Create group": "Create group",
"Create my profile": "Create my profile", "Create my event": "Create my event",
"Create token": "Create token", "Create my group": "Create my group",
"Create your communities and your events": "Create your communities and your events", "Create my profile": "Create my profile",
"Create": "Create", "Create token": "Create token",
"Creator": "Creator", "Create your communities and your events": "Create your communities and your events",
"Current": "Current", "Create": "Create",
"Delete event": "Delete event", "Creator": "Creator",
"Delete this identity": "Delete this identity", "Current": "Current",
"Delete your identity": "Delete your identity", "Delete event": "Delete event",
"Delete {eventTitle}": "Delete {eventTitle}", "Delete this identity": "Delete this identity",
"Delete {preferredUsername}": "Delete {preferredUsername}", "Delete your identity": "Delete your identity",
"Delete": "Delete", "Delete {eventTitle}": "Delete {eventTitle}",
"Description": "Description", "Delete {preferredUsername}": "Delete {preferredUsername}",
"Didn't receive the instructions ?": "Didn't receive the instructions ?", "Delete": "Delete",
"Disallow promoting on Mobilizon": "Disallow promoting on Mobilizon", "Description": "Description",
"Display name": "Display name", "Didn't receive the instructions ?": "Didn't receive the instructions ?",
"Display participation price": "Display participation price", "Disallow promoting on Mobilizon": "Disallow promoting on Mobilizon",
"Displayed name": "Displayed name", "Display name": "Display name",
"Do you want to participate in {title}?": "Do you want to participate in {title}?", "Display participation price": "Display participation price",
"Draft": "Draft", "Displayed name": "Displayed name",
"Drafts": "Drafts", "Do you want to participate in {title}?": "Do you want to participate in {title}?",
"Edit": "Edit", "Draft": "Draft",
"Either the account is already validated, either the validation token is incorrect.": "Either the account is already validated, either the validation token is incorrect.", "Drafts": "Drafts",
"Email": "Email", "Edit": "Edit",
"Ends on…": "Ends on…", "Either the account is already validated, either the validation token is incorrect.": "Either the account is already validated, either the validation token is incorrect.",
"Enter some tags": "Enter some tags", "Email": "Email",
"Error while validating account": "Error while validating account", "Ends on…": "Ends on…",
"Event already passed": "Event already passed", "Enter some tags": "Enter some tags",
"Event list": "Event list", "Error while validating account": "Error while validating account",
"Event {eventTitle} deleted": "Event {eventTitle} deleted", "Event already passed": "Event already passed",
"Event {eventTitle} reported": "Event {eventTitle} reported", "Event list": "Event list",
"Event": "Event", "Event {eventTitle} deleted": "Event {eventTitle} deleted",
"Events nearby you": "Events nearby you", "Event {eventTitle} reported": "Event {eventTitle} reported",
"Events you're going at": "Events you're going at", "Event": "Event",
"Events": "Events", "Events nearby you": "Events nearby you",
"Exclude": "Exclude", "Events you're going at": "Events you're going at",
"Explore": "Explore", "Events": "Events",
"Features": "Features", "Exclude": "Exclude",
"Find an address": "Find an address", "Explore": "Explore",
"Forgot your password ?": "Forgot your password ?", "Featured events": "Featured events",
"From the {startDate} at {startTime} to the {endDate} at {endTime}": "From the {startDate} at {startTime} to the {endDate} at {endTime}", "Features": "Features",
"General information": "General information", "Find an address": "Find an address",
"Going as {name}": "Going as {name}", "Find an instance": "Find an instance",
"Group List": "Group List", "Forgot your password ?": "Forgot your password ?",
"Group full name": "Group full name", "From a birthday party with friends and family to a march for climate change, right now, our gatherings are <b>trapped inside the tech giants platforms</b>. How can we organize, how can we click “Attend,” without <b>providing private data</b> to Facebook or <b>locking ourselves up</b> inside MeetUp?": "From a birthday party with friends and family to a march for climate change, right now, our gatherings are <b>trapped inside the tech giants platforms</b>. How can we organize, how can we click “Attend,” without <b>providing private data</b> to Facebook or <b>locking ourselves up</b> inside MeetUp?",
"Group name": "Group name", "From the {startDate} at {startTime} to the {endDate} at {endTime}": "From the {startDate} at {startTime} to the {endDate} at {endTime}",
"Group {displayName} created": "Group {displayName} created", "Gather ⋅ Organize ⋅ Mobilize": "Gather ⋅ Organize ⋅ Mobilize",
"Group": "Group", "General information": "General information",
"Groups": "Groups", "Going as {name}": "Going as {name}",
"I create an identity": "I create an identity", "Group List": "Group List",
"I participate": "I participate", "Group full name": "Group full name",
"I want to approve every participation request": "I want to approve every participation request", "Group name": "Group name",
"Identities": "Identities", "Group {displayName} created": "Group {displayName} created",
"Identity {displayName} created": "Identity {displayName} created", "Group": "Group",
"Identity {displayName} deleted": "Identity {displayName} deleted", "Groups": "Groups",
"Identity {displayName} updated": "Identity {displayName} updated", "I create an identity": "I create an identity",
"Identity": "Identity", "I participate": "I participate",
"If an account with this email exists, we just sent another confirmation email to {email}": "If an account with this email exists, we just sent another confirmation email to {email}", "I want to approve every participation request": "I want to approve every participation request",
"If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.": "If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.", "Identities": "Identities",
"Join event {title}": "Join event {title}", "Identity {displayName} created": "Identity {displayName} created",
"Join": "Join", "Identity {displayName} deleted": "Identity {displayName} deleted",
"Last published event": "Last published event", "Identity {displayName} updated": "Identity {displayName} updated",
"Last week": "Last week", "Identity": "Identity",
"Learn more on {0}": "Learn more on {0}", "If an account with this email exists, we just sent another confirmation email to {email}": "If an account with this email exists, we just sent another confirmation email to {email}",
"Learn more on": "Learn more on", "If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.": "If this identity is the only administrator of some groups, you need to delete them before being able to delete this identity.",
"Leave event": "Leave event", "Installing Mobilizon will allow communities to free themselves from the services of tech giants by creating <b>their own event platform</b>.": "Installing Mobilizon will allow communities to free themselves from the services of tech giants by creating <b>their own event platform</b>.",
"Leave": "Leave", "Join event {title}": "Join event {title}",
"Leaving event \"{title}\"": "Leaving event \"{title}\"", "Join {instance}, a Mobilizon instance": "Join {instance}, a Mobilizon instance",
"Legal": "Legal", "Join": "Join",
"License": "License", "Last published event": "Last published event",
"Limited places": "Limited places", "Last week": "Last week",
"Load more": "Load more", "Learn more about Mobilizon": "Learn more about Mobilizon",
"Loading…": "Loading…", "Learn more on {0}": "Learn more on {0}",
"Locality": "Locality", "Learn more on": "Learn more on",
"Log in": "Log in", "Learn more": "Learn more",
"Log out": "Log out", "Leave event": "Leave event",
"Login": "Login", "Leave": "Leave",
"Manage participants": "Manage participants", "Leaving event \"{title}\"": "Leaving event \"{title}\"",
"Manage participations": "Manage participations", "Legal": "Legal",
"Members": "Members", "Let's create a new common": "Let's create a new common",
"Moderated comments (shown after approval)": "Moderated comments (shown after approval)", "License": "License",
"My account": "My account", "Limited places": "Limited places",
"My events": "My events", "Load more": "Load more",
"My identities": "My identities", "Loading…": "Loading…",
"Name": "Name", "Locality": "Locality",
"New password": "New password", "Log in": "Log in",
"No address defined": "No address defined", "Log out": "Log out",
"No events found": "No events found", "Login": "Login",
"No group found": "No group found", "Manage participants": "Manage participants",
"No groups found": "No groups found", "Manage participations": "Manage participations",
"No participants yet.": "No participants yet.", "Members": "Members",
"No results for \"{queryText}\"": "No results for \"{queryText}\"", "Mobilizon is a free/libre software that will allow communities to create <b>their own spaces</b> to publish events in order to better emancipate themselves from tech giants.": "Mobilizon is a free/libre software that will allow communities to create <b>their own spaces</b> to publish events in order to better emancipate themselves from tech giants.",
"Number of places": "Number of places", "Mobilizons licence": "Mobilizons licence",
"Old password": "Old password", "Moderated comments (shown after approval)": "Moderated comments (shown after approval)",
"One person is going": "No one is going | One person is going | {approved} persons are going", "My account": "My account",
"Only accessible through link and search (private)": "Only accessible through link and search (private)", "My events": "My events",
"Opened reports": "Opened reports", "My identities": "My identities",
"Organized by {name}": "Organized by {name}", "Name": "Name",
"Organized": "Organized", "New password": "New password",
"Organizer": "Organizer", "No address defined": "No address defined",
"Other stuff…": "Other stuff…", "No events found": "No events found",
"Otherwise this identity will just be removed from the group administrators.": "Otherwise this identity will just be removed from the group administrators.", "No group found": "No group found",
"Page limited to my group (asks for auth)": "Page limited to my group (asks for auth)", "No groups found": "No groups found",
"Participants": "Participants", "No participants yet.": "No participants yet.",
"Participate": "Participate", "No results for \"{queryText}\"": "No results for \"{queryText}\"",
"Participation approval": "Participation approval", "Number of places": "Number of places",
"Participation requested!": "Participation requested!", "Old password": "Old password",
"Password (confirmation)": "Password (confirmation)", "One person is going": "No one is going | One person is going | {approved} persons are going",
"Password change": "Password change", "Only accessible through link and search (private)": "Only accessible through link and search (private)",
"Password reset": "Password reset", "Opened reports": "Opened reports",
"Password": "Password", "Organize and take action, freely": "Organize and take action, freely",
"Past events": "Passed events", "Organized by {name}": "Organized by {name}",
"Pick an identity": "Pick an identity", "Organized": "Organized",
"Please be nice to each other": "Please be nice to each other", "Organizer": "Organizer",
"Please check you spam folder if you didn't receive the email.": "Please check you spam folder if you didn't receive the email.", "Other stuff…": "Other stuff…",
"Please contact this instance's Mobilizon admin if you think this is a mistake.": "Please contact this instance's Mobilizon admin if you think this is a mistake.", "Otherwise this identity will just be removed from the group administrators.": "Otherwise this identity will just be removed from the group administrators.",
"Please make sure the address is correct and that the page hasn't been moved.": "Please make sure the address is correct and that the page hasn't been moved.", "Page limited to my group (asks for auth)": "Page limited to my group (asks for auth)",
"Please read the full rules": "Please read the full rules", "Participants": "Participants",
"Please type at least 5 characters": "Please type at least 5 characters", "Participate": "Participate",
"Postal Code": "Postal Code", "Participation approval": "Participation approval",
"Private event": "Private event", "Participation requested!": "Participation requested!",
"Private feeds": "Private feeds", "Password (confirmation)": "Password (confirmation)",
"Promotion": "Promotion", "Password change": "Password change",
"Public RSS/Atom Feed": "Public RSS/Atom Feed", "Password reset": "Password reset",
"Public comment moderation": "Public comment moderation", "Password": "Password",
"Public event": "Public event", "Past events": "Passed events",
"Public feeds": "Public feeds", "Pick an identity": "Pick an identity",
"Public iCal Feed": "Public iCal Feed", "Please be nice to each other": "Please be nice to each other",
"Publish": "Publish", "Please check you spam folder if you didn't receive the email.": "Please check you spam folder if you didn't receive the email.",
"Published events": "Published events", "Please contact this instance's Mobilizon admin if you think this is a mistake.": "Please contact this instance's Mobilizon admin if you think this is a mistake.",
"RSS/Atom Feed": "RSS/Atom Feed", "Please make sure the address is correct and that the page hasn't been moved.": "Please make sure the address is correct and that the page hasn't been moved.",
"Region": "Region", "Please read the full rules": "Please read the full rules",
"Register an account on Mobilizon!": "Register an account on Mobilizon!", "Please type at least 5 characters": "Please type at least 5 characters",
"Register": "Register", "Postal Code": "Postal Code",
"Registration is currently closed.": "Registration is currently closed.", "Private event": "Private event",
"Reject": "Reject", "Private feeds": "Private feeds",
"Rejected participations": "Rejected participations", "Promotion": "Promotion",
"Rejected": "Rejected", "Public RSS/Atom Feed": "Public RSS/Atom Feed",
"Report this event": "Report this event", "Public comment moderation": "Public comment moderation",
"Report": "Report", "Public event": "Public event",
"Requests": "Requests", "Public feeds": "Public feeds",
"Resend confirmation email": "Resend confirmation email", "Public iCal Feed": "Public iCal Feed",
"Reset my password": "Reset my password", "Publish": "Publish",
"Save draft": "Save draft", "Published events": "Published events",
"Save": "Save", "RSS/Atom Feed": "RSS/Atom Feed",
"Search events, groups, etc.": "Search events, groups, etc.", "Read Framasofts statement of intent on the Framablog": "Read Framasofts statement of intent on the Framablog",
"Search results: \"{search}\"": "Search results: \"{search}\"", "Region": "Region",
"Search": "Search", "Register an account on Mobilizon!": "Register an account on Mobilizon!",
"Searching…": "Searching…", "Register": "Register",
"Send confirmation email again": "Send confirmation email again", "Registration is currently closed.": "Registration is currently closed.",
"Send email to reset my password": "Send email to reset my password", "Reject": "Reject",
"Send the report": "Send the report", "Rejected participations": "Rejected participations",
"Share this event": "Share this event", "Rejected": "Rejected",
"Show map": "Show map", "Report this event": "Report this event",
"Show remaining number of places": "Show remaining number of places", "Report": "Report",
"Sign up": "Sign up", "Requests": "Requests",
"Starts on…": "Starts on…", "Resend confirmation email": "Resend confirmation email",
"Status": "Status", "Reset my password": "Reset my password",
"Street": "Street", "Save draft": "Save draft",
"Tentative: Will be confirmed later": "Tentative: Will be confirmed later", "Save": "Save",
"The content came from another server. Transfer an anonymous copy of the report?": "The content came from another server. Transfer an anonymous copy of the report ?", "Search events, groups, etc.": "Search events, groups, etc.",
"The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.": "The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.", "Search results: \"{search}\"": "Search results: \"{search}\"",
"The event organizer didn't add any description.": "The event organizer didn't add any description.", "Search": "Search",
"The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved": "The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved", "Searching…": "Searching…",
"The event title will be ellipsed.": "The event title will be ellipsed.", "Send confirmation email again": "Send confirmation email again",
"The page you're looking for doesn't exist.": "The page you're looking for doesn't exist.", "Send email to reset my password": "Send email to reset my password",
"The password was successfully changed": "The password was successfully changed", "Send the report": "Send the report",
"The report will be sent to the moderators of your instance. You can explain why you report this content below.": "The report will be sent to the moderators of your instance. You can explain why you report this content below.", "Share this event": "Share this event",
"The {date} at {time}": "The {date} at {time}", "Show map": "Show map",
"The {date} from {startTime} to {endTime}": "The {date} from {startTime} to {endTime}", "Show remaining number of places": "Show remaining number of places",
"There are {participants} participants.": "There's only one participant | There are {participants} participants.", "Sign up": "Sign up",
"These events may interest you": "These events may interest you", "Software to the people": "Software to the people",
"This instance isn't opened to registrations, but you can register on other instances.": "This instance isn't opened to registrations, but you can register on other instances.", "Starts on…": "Starts on…",
"This will delete / anonymize all content (events, comments, messages, participations…) created from this identity.": "This will delete / anonymize all content (events, comments, messages, participations…) created from this identity.", "Status": "Status",
"Title": "Title", "Street": "Street",
"To confirm, type your event title \"{eventTitle}\"": "To confirm, type your event title \"{eventTitle}\"", "Tentative: Will be confirmed later": "Tentative: Will be confirmed later",
"To confirm, type your identity username \"{preferredUsername}\"": "To confirm, type your identity username \"{preferredUsername}\"", "The content came from another server. Transfer an anonymous copy of the report?": "The content came from another server. Transfer an anonymous copy of the report ?",
"Transfer to {outsideDomain}": "Transfer to {outsideDomain}", "The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.": "The event came from another instance. Your participation will be confirmed after we confirm it with the other instance.",
"Unfortunately, your participation request was rejected by the organizers.": "Unfortunately, your participation request was rejected by the organizers.", "The event organizer didn't add any description.": "The event organizer didn't add any description.",
"Unknown error.": "Unknown error.", "The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved": "The event organizer has chosen to approve manually the participations to this event. You will receive a notification when your participation has been approved",
"Unsaved changes": "Unsaved changes", "The event title will be ellipsed.": "The event title will be ellipsed.",
"Upcoming": "Upcoming", "The page you're looking for doesn't exist.": "The page you're looking for doesn't exist.",
"Update event {name}": "Update event {name}", "The password was successfully changed": "The password was successfully changed",
"Update my event": "Update my event", "The report will be sent to the moderators of your instance. You can explain why you report this content below.": "The report will be sent to the moderators of your instance. You can explain why you report this content below.",
"User logout": "User logout", "The {date} at {time}": "The {date} at {time}",
"Username": "Username", "The {date} from {startTime} to {endTime}": "The {date} from {startTime} to {endTime}",
"Users": "Users", "There are {participants} participants.": "There's only one participant | There are {participants} participants.",
"View event page": "View event page", "These events may interest you": "These events may interest you",
"View everything": "View everything", "This installation (called “instance“) can easily {interconnect}, thanks to {protocol}.": "This installation (called “instance“) can easily {interconnect}, thanks to {protocol}.",
"Visible everywhere on the web (public)": "Visible everywhere on the web (public)", "This instance isn't opened to registrations, but you can register on other instances.": "This instance isn't opened to registrations, but you can register on other instances.",
"Waiting for organization team approval.": "Waiting for organization team approval.", "This will delete / anonymize all content (events, comments, messages, participations…) created from this identity.": "This will delete / anonymize all content (events, comments, messages, participations…) created from this identity.",
"Waiting list": "Waiting list", "Title": "Title",
"We just sent an email to {email}": "We just sent an email to {email}", "To change the world, change the software": "To change the world, change the software",
"Website / URL": "Website / URL", "To confirm, type your event title \"{eventTitle}\"": "To confirm, type your event title \"{eventTitle}\"",
"Welcome back {username}": "Welcome back {username}", "To confirm, type your identity username \"{preferredUsername}\"": "To confirm, type your identity username \"{preferredUsername}\"",
"Welcome back!": "Welcome back!", "Transfer to {outsideDomain}": "Transfer to {outsideDomain}",
"Welcome on your administration panel": "Welcome on your administration panel", "Unfortunately, this instance isn't opened to registrations": "Unfortunately, this instance isn't opened to registrations",
"Who can view this event and participate": "Who can view this event and participate", "Unfortunately, your participation request was rejected by the organizers.": "Unfortunately, your participation request was rejected by the organizers.",
"World map": "World map", "Unknown error.": "Unknown error.",
"You and one other person are going to this event": "You're the only one going to this event | You and one other person are going to this event | You and {approved} persons are going to this event.", "Unsaved changes": "Unsaved changes",
"You announced that you're going to this event.": "You announced that you're going to this event.", "Upcoming": "Upcoming",
"You are already logged-in.": "You are already logged-in.", "Update event {name}": "Update event {name}",
"You are an organizer.": "You are an organizer.", "Update my event": "Update my event",
"You have been disconnected": "You have been disconnected", "User logout": "User logout",
"You have one event in {days} days.": "You have no events in {days} days | You have one event in {days} days. | You have {count} events in {days} days", "Username": "Username",
"You have one event today.": "You have no events today | You have one event today. | You have {count} events today", "Users": "Users",
"You have one event tomorrow.": "You have no events tomorrow | You have one event tomorrow. | You have {count} events tomorrow", "View event page": "View event page",
"You need to login.": "You need to login.", "View everything": "View everything",
"You're not going to any event yet": "You're not going to any event yet", "Visible everywhere on the web (public)": "Visible everywhere on the web (public)",
"You're organizing this event": "You're organizing this event", "Waiting for organization team approval.": "Waiting for organization team approval.",
"Your account has been validated": "Your account has been validated", "Waiting list": "Waiting list",
"Your account is being validated": "Your account is being validated", "We just sent an email to {email}": "We just sent an email to {email}",
"Your account is nearly ready, {username}": "Your account is nearly ready, {username}", "We want to develop a <b>digital common</b>, that everyone can make their own, which respects <b>privacy and activism by design</b>.": "We want to develop a <b>digital common</b>, that everyone can make their own, which respects <b>privacy and activism by design</b>.",
"Your local administrator resumed it's policy:": "Your local administrator resumed it's policy:", "We wont change the world from Facebook. The tool we dream of, surveillance capitalism corporations wont develop it, as they couldnt profit from it. This is an opportunity to build something better, by taking another approach.": "We wont change the world from Facebook. The tool we dream of, surveillance capitalism corporations wont develop it, as they couldnt profit from it. This is an opportunity to build something better, by taking another approach.",
"e.g. 10 Rue Jangot": "e.g. 10 Rue Jangot", "Website / URL": "Website / URL",
"iCal Feed": "iCal Feed", "Welcome back {username}": "Welcome back {username}",
"meditate a bit": "meditate a bit", "Welcome back!": "Welcome back!",
"with another identity…": "with another identity…", "Welcome on your administration panel": "Welcome on your administration panel",
"with {identity}": "with {identity}", "Who can view this event and participate": "Who can view this event and participate",
"{actor}'s avatar": "{actor}'s avatar", "World map": "World map",
"{approved} / {total} seats": "{approved} / {total} seats", "You and one other person are going to this event": "You're the only one going to this event | You and one other person are going to this event | You and {approved} persons are going to this event.",
"{count} participants": "{count} participants", "You announced that you're going to this event.": "You announced that you're going to this event.",
"{count} requests waiting": "{count} requests waiting", "You are already logged-in.": "You are already logged-in.",
"© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks" "You are an organizer.": "You are an organizer.",
"You have been disconnected": "You have been disconnected",
"You have one event in {days} days.": "You have no events in {days} days | You have one event in {days} days. | You have {count} events in {days} days",
"You have one event today.": "You have no events today | You have one event today. | You have {count} events today",
"You have one event tomorrow.": "You have no events tomorrow | You have one event tomorrow. | You have {count} events tomorrow",
"You need to login.": "You need to login.",
"You're not going to any event yet": "You're not going to any event yet",
"You're organizing this event": "You're organizing this event",
"Your account has been validated": "Your account has been validated",
"Your account is being validated": "Your account is being validated",
"Your account is nearly ready, {username}": "Your account is nearly ready, {username}",
"Your local administrator resumed it's policy:": "Your local administrator resumed it's policy:",
"a decentralised federation protocol": "a decentralised federation protocol",
"e.g. 10 Rue Jangot": "e.g. 10 Rue Jangot",
"iCal Feed": "iCal Feed",
"interconnect with others like it": "interconnect with others like it",
"its source code is public": "its source code is public",
"meditate a bit": "meditate a bit",
"respect of the fundamental freedoms": "respect of the fundamental freedoms",
"with another identity…": "with another identity…",
"with {identity}": "with {identity}",
"{actor}'s avatar": "{actor}'s avatar",
"{approved} / {total} seats": "{approved} / {total} seats",
"{count} participants": "{count} participants",
"{count} requests waiting": "{count} requests waiting",
"{license} guarantees {respect} of the people who will use it. Since {source}, anyone can audit it, which guarantees its transparency.": "{license} guarantees {respect} of the people who will use it. Since {source}, anyone can audit it, which guarantees its transparency.",
"© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks"
} }

View file

@ -268,5 +268,8 @@
"{approved} / {total} seats": "{approved} / {total} places", "{approved} / {total} seats": "{approved} / {total} places",
"{count} participants": "Un⋅e participant⋅e|{count} participant⋅e⋅s", "{count} participants": "Un⋅e participant⋅e|{count} participant⋅e⋅s",
"{count} requests waiting": "Un⋅e demande en attente|{count} demandes en attente", "{count} requests waiting": "Un⋅e demande en attente|{count} demandes en attente",
"© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© Les contributeurs de Mobilizon {date} - Fait avec Elixir, Phoenix, VueJS & et de l'amour et des semaines" "© The Mobilizon Contributors {date} - Made with Elixir, Phoenix, VueJS & with some love and some weeks": "© Les contributeurs de Mobilizon {date} - Fait avec Elixir, Phoenix, VueJS & et de l'amour et des semaines",
"Organize and take action, freely": "S'organiser et agir, librement",
"Join {instance}, a Mobilizon instance": "Rejoignez {instance}, une instance Mobilizon",
"Learn more": "En apprendre plus"
} }

View file

@ -15,6 +15,7 @@ Vue.use(Router);
enum GlobalRouteName { enum GlobalRouteName {
HOME = 'Home', HOME = 'Home',
ABOUT = 'About',
PAGE_NOT_FOUND = 'PageNotFound', PAGE_NOT_FOUND = 'PageNotFound',
SEARCH = 'Search', SEARCH = 'Search',
} }
@ -66,7 +67,12 @@ const router = new Router({
component: Home, component: Home,
meta: { requiredAuth: false }, meta: { requiredAuth: false },
}, },
{
path: '/about',
name: RouteName.ABOUT,
component: () => import(/* webpackChunkName: "about" */ '@/views/About.vue'),
meta: { requiredAuth: false },
},
{ {
path: '*', path: '*',
name: RouteName.PAGE_NOT_FOUND, name: RouteName.PAGE_NOT_FOUND,

199
js/src/views/About.vue Normal file
View file

@ -0,0 +1,199 @@
<template>
<div>
<div class="hero intro is-medium is-primary">
<div class="hero-body">
<div class="container">
<h1 class="title">{{ $t('About Mobilizon') }}</h1>
<p class="subtitle">
{{ $t('A user-friendly, emancipatory and ethical tool for gathering, organising, and mobilising.') }}
</p>
<b-button icon-left="open-in-new" size="is-large" type="is-secondary" tag="a" href="https://joinmobilizon.org">{{ $t('Learn more') }}</b-button>
</div>
</div>
</div>
<div class="container" id="mobilizon">
<section>
<div class="columns">
<div class="column has-text-left-desktop">
<h3 class="title">{{ $t('Gather ⋅ Organize ⋅ Mobilize') }}</h3>
<p class="content" v-html="$t('From a birthday party with friends and family to a march for climate change, right now, our gatherings are <b>trapped inside the tech giants platforms</b>. How can we organize, how can we click Attend, without <b>providing private data</b> to Facebook or <b>locking ourselves up</b> inside MeetUp?')" />
<p v-html="$t('Mobilizon is a free/libre software that will allow communities to create <b>their own spaces</b> to publish events in order to better emancipate themselves from tech giants.')" />
</div>
<div class="column has-text-right-desktop has-text-centered-mobile">
<img src="img/about/action-mobilizon.png" width="300" />
</div>
</div>
</section>
<section>
<div class="columns">
<div class="column has-text-right-desktop">
<h3 class="title">{{ $t("Let's create a new common") }}</h3>
<p v-html="$t('We want to develop a <b>digital common</b>, that everyone can make their own, which respects <b>privacy and activism by design</b>.')" />
<p>
<span v-html="$t('Installing Mobilizon will allow communities to free themselves from the services of tech giants by creating <b>their own event platform</b>.')" />
<i18n tag="span" path="This installation (called “instance“) can easily {interconnect}, thanks to {protocol}.">
<b slot="interconnect">{{ $t('interconnect with others like it') }}</b>
<a slot="protocol" href="https://en.wikipedia.org/wiki/ActivityPub">{{ $t('a decentralised federation protocol') }}</a>
</i18n>
</p>
</div>
<div class="column has-text-left-desktop has-text-centered-mobile">
<img src="img/about/common-mobilizon.png" width="300" />
</div>
</div>
</section>
</div>
<div class="hero quote is-secondary">
<div class="hero-body">
<div class="container">
<h3 class="title">{{ $t('To change the world, change the software') }}</h3>
<blockquote>
{{ $t('We wont change the world from Facebook. The tool we dream of, surveillance capitalism corporations wont develop it, as they couldnt profit from it. This is an opportunity to build something better, by taking another approach.') }}</blockquote>
<footer class="blockquote-footer">
<a href="https://framablog.org/2019/05/14/mobilizon-lets-finance-a-software-to-free-our-events-from-facebook/">
{{ $t('Read Framasofts statement of intent on the Framablog') }}
</a>
</footer>
</div>
</div>
</div>
<div class="container">
<section>
<div class="columns">
<div class="column">
<h3 class="title">{{ $t('Software to the people') }}</h3>
<i18n tag="p" path="{license} guarantees {respect} of the people who will use it. Since {source}, anyone can audit it, which guarantees its transparency.">
<a slot="license" href="https://choosealicense.com/licenses/agpl-3.0/">{{ $t('Mobilizons licence') }}</a>
<b slot="respect">{{ $t('respect of the fundamental freedoms') }}</b>
<a slot="source" href="https://framagit.org/framasoft/mobilizon">{{ $t('its source code is public') }}</a>
</i18n>
<p>
If the direction given by the development team does not suit you,
you have the legal right to create your own version of the software,
with your own governance choices.
</p>
<p>
Mobilizon is not developed by a secretive start-up, but by a group
of friends who strive to <a href="https://framasoft.org">change the world, one byte at a time</a>.
So while we do work slower, we remain attentive and in touch with our users.
</p>
</div>
<div class="column has-text-right-desktop has-text-centered-mobile">
<img src="img/about/software-to-the-people-mobilizon.png" width="300" />
</div>
</div>
</section>
<section>
<div class="columns">
<div class="column has-text-right-desktop">
<h3 class="title">Concieved with care for humans</h3>
<p>We asked professional designers to help us develop our vision for Mobilizon.
We took time to study the <b>digital habits of activists</b> in order to
understand the features they need to gather, organize, and mobilize.
</p>
<p>
So that, right from its conception, Mobilizon would <b>fit the needs and uses of
the people</b> who are going to use it.
</p>
</div>
<div class="column has-text-left-desktop has-text-centered-mobile">
<img src="img/about/concieved-mobilizon.png" width="300" />
</div>
</div>
</section>
</div>
<!-- We hide the "Find an instance button until https://joinmobilizon.org gets a instance picker -->
<div class="hero register is-primary is-medium" v-if="config && config.registrationsOpen">
<div class="hero-body">
<div class="container has-text-centered">
<div class="columns">
<div class="column">
<h2 class="title">Register on this instance</h2>
<b-button type="is-secondary" size="is-large" tag="router-link" :to="{ name: RouteName.REGISTER }">{{ $t('Register') }}</b-button>
</div>
<!-- <div class="column">
<h2 class="title">Find an instance</h2>
<b-button type="is-secondary" size="is-large" tag="a" href="https://joinmobilizon.org">{{ $t('Register') }}</b-button>
</div> -->
</div>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import {
Component,
Vue,
} from 'vue-property-decorator';
import { CONFIG } from '@/graphql/config';
import { IConfig } from '@/types/config.model';
import { RouteName } from '@/router';
@Component({
apollo: {
config: {
query: CONFIG,
},
},
})
export default class About extends Vue {
config!: IConfig;
RouteName = RouteName;
}
</script>
<style lang="scss" scoped>
@import "@/variables.scss";
.hero.register {
background: lighten($primary, 20%);
}
section {
padding: 3rem 0;
&:not(:last-child) {
border-bottom: 0.1rem dotted #777;
}
p {
margin-top: 1.5rem;
}
&:nth-child(odd) .columns {
flex-direction: row-reverse;
}
}
.hero.quote {
background: lighten($secondary, 20%);
h3 {
background: initial;
}
blockquote {
border-left: .2em solid #333;
display: block;
padding-left: 1em;
&:before {
content: "« ";
}
&:after {
content: " »";
}
}
.blockquote-footer a {
color: #6c757d;
&:before {
content: "\2014\00A0";
}
}
}
</style>

View file

@ -264,7 +264,7 @@ import { RouteName } from '@/router';
return []; return [];
}, },
skip() { skip() {
return !this.event.id || !this.currentActor.id; return !this.currentActor || !this.event || !this.event.id || !this.currentActor.id;
}, },
}, },
}, },

View file

@ -1,26 +1,25 @@
<template> <template>
<div> <div>
<section class="hero is-medium is-light is-bold" v-if="!currentUser.id || !currentActor.id"> <section class="hero is-medium is-light is-bold" v-if="config && (!currentUser.id || !currentActor.id)">
<div class="hero-body"> <div class="hero-body">
<div class="container"> <div class="container">
<div class="columns"> <h1 class="title">{{ $t('Gather ⋅ Organize ⋅ Mobilize') }}</h1>
<div class="column"> <p class="subtitle">{{ $t('Join {instance}, a Mobilizon instance', { instance: config.name }) }}
<h1 class="title">{{ config.name }}</h1> <p>{{ config.description }}</p>
<h2 class="subtitle">{{ config.description }}</h2> <!-- We don't invite to find other instances yet -->
<router-link class="button" :to="{ name: RouteName.REGISTER }" v-if="config.registrationsOpen"> <!-- <p v-if="!config.registrationsOpen">
{{ $t('Sign up') }} {{ $t("This instance isn't opened to registrations, but you can register on other instances.") }}
</router-link> </p> -->
<p v-else> <b-message type="is-danger" v-if="!config.registrationsOpen">
{{ $t("This instance isn't opened to registrations, but you can register on other instances.") }} {{ $t("Unfortunately, this instance isn't opened to registrations") }}
</p> </b-message>
</div> <div class="buttons">
<div class="column"> <b-button type="is-primary" tag="router-link" :to="{ name: RouteName.REGISTER }" v-if="config.registrationsOpen">
<div class="card-image"> {{ $t('Sign up') }}
<figure class="image is-square"> </b-button>
<img src="https://joinmobilizon.org/img/en/events-mobilizon.png" /> <!-- We don't invite to find other instances yet -->
</figure> <!-- <b-button v-else type="is-link" tag="a" href="https://joinmastodon.org">{{ $t('Find an instance') }}</b-button> -->
</div> <b-button type="is-text" tag="router-link" :to="{ name: RouteName.ABOUT }">{{ $t('Learn more about Mobilizon')}}</b-button>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -31,12 +30,12 @@
{{ $t('Welcome back {username}', { username: currentActor.displayName() }) }} {{ $t('Welcome back {username}', { username: currentActor.displayName() }) }}
</b-message> </b-message>
</section> </section>
<section v-else-if="currentActor && goingToEvents.size > 0" class="container"> <section v-if="currentActor && goingToEvents.size > 0" class="container">
<h3 class="title"> <h3 class="title">
{{ $t("Upcoming") }} {{ $t("Upcoming") }}
</h3> </h3>
<b-loading :active.sync="$apollo.loading"></b-loading> <b-loading :active.sync="$apollo.loading"></b-loading>
<div v-for="row in goingToEvents" class="upcoming-events" :key="row[0]"> <div v-for="row of goingToEvents" class="upcoming-events" :key="row[0]">
<span class="date-component-container" v-if="isInLessThanSevenDays(row[0])"> <span class="date-component-container" v-if="isInLessThanSevenDays(row[0])">
<date-component :date="row[0]"></date-component> <date-component :date="row[0]"></date-component>
<h3 class="subtitle" <h3 class="subtitle"
@ -79,8 +78,8 @@
/> />
</div> </div>
</section> </section>
<section> <section class="events-featured">
<h3 class="events-nearby title">{{ $t('Events nearby you') }}</h3> <h3 class="title">{{ $t('Featured events') }}</h3>
<b-loading :active.sync="$apollo.loading"></b-loading> <b-loading :active.sync="$apollo.loading"></b-loading>
<div v-if="events.length > 0" class="columns is-multiline"> <div v-if="events.length > 0" class="columns is-multiline">
<div class="column is-one-third-desktop" v-for="event in events.slice(0, 6)" :key="event.uuid"> <div class="column is-one-third-desktop" v-for="event in events.slice(0, 6)" :key="event.uuid">
@ -129,6 +128,22 @@ import { IConfig } from '@/types/config.model';
config: { config: {
query: CONFIG, query: CONFIG,
}, },
currentUserParticipations: {
query: LOGGED_USER_PARTICIPATIONS,
variables() {
const lastWeek = new Date();
lastWeek.setDate(new Date().getDate() - 7);
return {
afterDateTime: lastWeek.toISOString(),
};
},
update: (data) => {
return data.loggedUser.participations.map(participation => new Participant(participation));
},
skip() {
return this.currentUser.isLoggedIn === false;
},
},
}, },
components: { components: {
DateComponent, DateComponent,
@ -141,35 +156,19 @@ export default class Home extends Vue {
locations = []; locations = [];
city = { name: null }; city = { name: null };
country = { name: null }; country = { name: null };
currentUserParticipations: IParticipant[] = [];
currentUser!: ICurrentUser; currentUser!: ICurrentUser;
currentActor!: IPerson; currentActor!: IPerson;
config: IConfig = { description: '', name: '', registrationsOpen: false }; config!: IConfig;
RouteName = RouteName; RouteName = RouteName;
currentUserParticipations: IParticipant[] = [];
// get displayed_name() { // get displayed_name() {
// return this.loggedPerson && this.loggedPerson.name === null // return this.loggedPerson && this.loggedPerson.name === null
// ? this.loggedPerson.preferredUsername // ? this.loggedPerson.preferredUsername
// : this.loggedPerson.name; // : this.loggedPerson.name;
// } // }
async mounted() {
const lastWeek = new Date();
lastWeek.setDate(new Date().getDate() - 7);
if (this.currentUser.isLoggedIn === false) return;
const { data } = await this.$apollo.query({
query: LOGGED_USER_PARTICIPATIONS,
variables: {
afterDateTime: lastWeek.toISOString(),
},
});
if (data) {
this.currentUserParticipations = data.loggedUser.participations.map(participation => new Participant(participation));
}
}
isToday(date: Date) { isToday(date: Date) {
return (new Date(date)).toDateString() === (new Date()).toDateString(); return (new Date(date)).toDateString() === (new Date()).toDateString();
} }
@ -205,6 +204,7 @@ export default class Home extends Vue {
res.sort( res.sort(
(a: IParticipant, b: IParticipant) => a.event.beginsOn.getTime() - b.event.beginsOn.getTime(), (a: IParticipant, b: IParticipant) => a.event.beginsOn.getTime() - b.event.beginsOn.getTime(),
); );
return res.reduce((acc: Map<string, Map<string, IParticipant>>, participation: IParticipant) => { return res.reduce((acc: Map<string, Map<string, IParticipant>>, participation: IParticipant) => {
const day = (new Date(participation.event.beginsOn)).toDateString(); const day = (new Date(participation.event.beginsOn)).toDateString();
const participations: Map<string, IParticipant> = acc.get(day) || new Map(); const participations: Map<string, IParticipant> = acc.get(day) || new Map();
@ -281,8 +281,12 @@ export default class Home extends Vue {
color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);
} }
.events-nearby { .events-featured {
margin: 25px auto; margin: 25px auto;
.columns {
margin: 1rem auto 3rem;
}
} }
.date-component-container { .date-component-container {
@ -314,8 +318,7 @@ export default class Home extends Vue {
background: lighten($secondary, 20%); background: lighten($secondary, 20%);
.column figure.image img { .column figure.image img {
width: 480px; max-width: 400px;
height: 350px;
} }
} }
</style> </style>

View file

@ -5,6 +5,7 @@
"import-name": false, "import-name": false,
"ter-arrow-parens": false, "ter-arrow-parens": false,
"no-boolean-literal-compare": false, "no-boolean-literal-compare": false,
"object-shorthand-properties-first": false "object-shorthand-properties-first": false,
"space-in-parens": false
} }
} }

View file

@ -4177,9 +4177,9 @@ ejs@^2.6.1:
integrity sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ== integrity sha512-kS/gEPzZs3Y1rRsbGX4UOSjtP/CeJP0CxSNZHYxGfVM/VgLcv0ZqM7C45YyTj2DI2g7+P9Dd24C+IMIg6D0nYQ==
electron-to-chromium@^1.3.103, electron-to-chromium@^1.3.247: electron-to-chromium@^1.3.103, electron-to-chromium@^1.3.247:
version "1.3.275" version "1.3.277"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.275.tgz#19a38436e34216f51820fa2f4326d5ce141fa36f" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.277.tgz#38b7b297f9b3f67ea900a965c1b11a555de526ec"
integrity sha512-/YWtW/VapMnuYA1lNOaa1F4GhR1LBf+CUTp60lzDPEEh0XOzyOAyULyYZVF9vziZ3qSbTqCwmKwsyRXp66STbw== integrity sha512-Czmsrgng89DOgJlIknnw9bn5431QdtnUwGp5YYiPwU1DbZQUxCLF+rc1ZC09VNAdalOPcvH6AE8BaA0H5HjI/w==
elegant-spinner@^1.0.1: elegant-spinner@^1.0.1:
version "1.0.1" version "1.0.1"
@ -8494,7 +8494,7 @@ os-locale@^2.0.0:
lcid "^1.0.0" lcid "^1.0.0"
mem "^1.1.0" mem "^1.1.0"
os-locale@^3.0.0: os-locale@^3.0.0, os-locale@^3.1.0:
version "3.1.0" version "3.1.0"
resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a"
integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==
@ -9504,9 +9504,9 @@ prosemirror-utils@^0.9.6:
integrity sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA== integrity sha512-UC+j9hQQ1POYfMc5p7UFxBTptRiGPR7Kkmbl3jVvU8VgQbkI89tR/GK+3QYC8n+VvBZrtAoCrJItNhWSxX3slA==
prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.11.4: prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.11.4:
version "1.11.5" version "1.11.6"
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.11.5.tgz#ed06a485cce573eac49de7ad6fd1bc3d065e81b7" resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.11.6.tgz#8500fc20a06b9bf3e2f60c01d9a950bd61512db6"
integrity sha512-sfHnSbkT2jhhT8YPXuoMZzPPrfL+JA+qxe39IFgQM4VnyjCII26EfVfQlj8iq9DS489flEbZSLFmE0LFM9+ZiA== integrity sha512-QilemwGa8ib1n42JFFP4J4SEpzPan2IcMNUlllya/ye9gjuHy1Wt5R/o0zXK0Y0HRP4gNqqb9VrbLvi7UAILqQ==
dependencies: dependencies:
prosemirror-model "^1.1.0" prosemirror-model "^1.1.0"
prosemirror-state "^1.0.0" prosemirror-state "^1.0.0"
@ -13198,15 +13198,15 @@ yargs@^10.0.3:
yargs-parser "^8.1.0" yargs-parser "^8.1.0"
yargs@^11.0.0: yargs@^11.0.0:
version "11.1.0" version "11.1.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.1.tgz#5052efe3446a4df5ed669c995886cc0f13702766"
integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== integrity sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==
dependencies: dependencies:
cliui "^4.0.0" cliui "^4.0.0"
decamelize "^1.1.1" decamelize "^1.1.1"
find-up "^2.1.0" find-up "^2.1.0"
get-caller-file "^1.0.1" get-caller-file "^1.0.1"
os-locale "^2.0.0" os-locale "^3.1.0"
require-directory "^2.1.1" require-directory "^2.1.1"
require-main-filename "^1.0.1" require-main-filename "^1.0.1"
set-blocking "^2.0.0" set-blocking "^2.0.0"