Team AACF:
| Name | C.P. | Contributions |
|---|---|---|
| Alessio Hu | 10683050 | Backend, Components(Carousel, Grid, Next/Prev), Pages (events, PoIs), Data Entry |
| Andrea Franchini | 10560276 | Backend, Layout, Refactoring (JS/CSS), Code QA, PR Reviews |
| Carlo L. Reinotti | 10840446 | Components, Pages (services, events), Data Entry |
| Fabio Camerota | 10864017 | Card, Pages (homepage, about, contacts, itineraries, error), Data Entry |
The projects has the classic Nuxt2 folder structure, in particular we used:
assetsserves the CSS stylesheets (understyles) and the images (underimages) (that in productions are converted by Webpack to the WebP format)componentscontains the Vue Templates we created.icons/*are simple HTML/CSS Vue templates to store SVG-in-HTML separately as components.ButtonPrimary.vueis a simple button that wraps a NuxtLink component.Cardis a card that contains a title, a subtitle, a thumbnail, a brief description. It receives an object containing those fields as a prop.GridViewexploits<slot />to render its children as elements of a CSS grid. It is used in the group-of-topics pages.HScrollViewis a horizontally scrollable container that acts as a carousel. It uses CSSscroll-snapto behave smoothly on desktop and mobile alike. It contains also JS code to dynamically display buttons that allow to scroll the content, should the user decide not to scroll natively (e.g. not using Shift+Scroll, dragging...)ImageLoaderwraps an<img>to reduce repetitions of the webpack import string.MapContainerwraps the<iframe>used to display an embed of Google Maps for the Itinerary and PoI pages.PageHeaderandPageFooterare quite self-explanatory.StepsNavigatoris the component shown at the end of Itinerary and PoI (in an Itineray) Pages. It consists of two links that point to the previous and next element of a collection.
layoutscontains the default layout that is used throughout the website, and the error page layout.mixinscontainsutils.jswhich is a collection of useful snippets of code that are used frequently in the website, mostly string operations and converting objects from the Database to Card props.pagesis divided in:events/,itineraries/,pois/,services/:_id.vueis the single page of a topicindex.vueis the group of topics page, basically a grid that lists all the entries.
about.vueandcontacts.vueare simple static pages.index.vueis the homepage.
staticto serve the favicon.
server/api contains the code that runs the server, and consist of:
index.js- Express API endpoints declarationsdatabase.js- Table definitionsseed.js- Populates the db from the JSON files inserver/api/data/*.json
We did not use the VueX/store functionality since our website simply displays results from the database, and therefore we don't need advanced state management.
We created components with the aim to minimize code repetitions (hence the ImageLoader, Card...) as well as to minimize CSS conflicts since each components styles only itself thanks to scoped styles.
We (obviously) decided to run our website with Server Side Rendering (SSR) because it's theoretically better for SEO, as the website content is immediately available without running JS.
The website was implemented as mobile-first, and we decided to not use Bootstrap/Tailwind for didactic purposes (learning CSS, mostly) while leveraging modern CSS features such as flexbox, grid, scroll-snap, variables (all of which have at least >90% adoption rate according to caniuse.com).
For example most of the media queries simply change variables such as the number of columns to adapt the page layout to bigger screens.
We tested the website through both Lighthouse and WAVE, and relevant ARIA attributes have been used (e.g.: for certain background images, and for the header menu when displayed on a small screen to tell whether it's collapsed or not).