All Projects → opendata-stuttgart → sensor.community

opendata-stuttgart / sensor.community

Licence: MIT license
✨ new shiny website built with svelte ❤️ for dust and noise measuring project 👉 https://sensor.community

Programming Languages

Svelte
593 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to sensor.community

cakcuk
A Command Bot Interface builder, CLI-based to easily create your CLI commands for your Workspace
Stars: ✭ 13 (-71.11%)
Mutual labels:  svelte, sapper
sapper-httpclient
An isomorphic http client for Sapper
Stars: ✭ 48 (+6.67%)
Mutual labels:  svelte, sapper
sirix-svelte-frontend
A GUI console for SirixDB, using Svelte/Sapper.
Stars: ✭ 23 (-48.89%)
Mutual labels:  svelte, sapper
year-in-dev
A web tool tool that displays a summary of your DEV.to blog's stats!
Stars: ✭ 22 (-51.11%)
Mutual labels:  svelte, sapper
blog-template
A markdown-style blog template for Sapper
Stars: ✭ 29 (-35.56%)
Mutual labels:  svelte, sapper
svelte-cloudinary
Cloudinary SDK for Svelte
Stars: ✭ 13 (-71.11%)
Mutual labels:  svelte, sapper
sapper-typescript-esbuild-template
Sapper template with ESBuild and TypeScript
Stars: ✭ 18 (-60%)
Mutual labels:  svelte, sapper
svelte-commerce
Svelte ecommerce - Headless, Authentication, Cart & Checkout, TailwindCSS, Server Rendered, Proxy + API Integrated, Animations, Stores, Lazy Loading, Loading Indicators, Carousel, Instant Search, Faceted Filters, Typescript, Open Source, MIT license. 1 command deploy to your own server, 1 click deploy to netlify.
Stars: ✭ 695 (+1444.44%)
Mutual labels:  svelte, sapper
svelteit
Svelteit is a minimalistic UI/UX component library for Svelte and Sapper projects
Stars: ✭ 64 (+42.22%)
Mutual labels:  svelte, sapper
svelte3-translation-ru
Russian translation of the official Svelte resources
Stars: ✭ 49 (+8.89%)
Mutual labels:  svelte, sapper
auth
Sapper Authentication Implementation for Wordpress
Stars: ✭ 18 (-60%)
Mutual labels:  svelte, sapper
sapper-template-rollup
Starter Rollup template for Sapper apps using postcss, cssnano, tailwindcss, and svelte-preprocess.
Stars: ✭ 32 (-28.89%)
Mutual labels:  svelte, sapper
upswyng
UpSwyng is a mobile-ready, digital directory of resources to assist the unhoused and at-risk communities of Boulder, CO
Stars: ✭ 19 (-57.78%)
Mutual labels:  svelte, sapper
form-validation
FormValidation, the best validation library for JavaScript
Stars: ✭ 137 (+204.44%)
Mutual labels:  svelte, sapper
status-page
⬆️🌐 Static status page website for Upptime
Stars: ✭ 94 (+108.89%)
Mutual labels:  svelte, sapper
sapper-postcss-template
A template that includes Sapper for Svelte and PostCSS preprocessing with Tailwind CSS
Stars: ✭ 84 (+86.67%)
Mutual labels:  svelte, sapper
SENT-template
Skip setup and start code with SENT (Sapper Express Node Template) and other tools
Stars: ✭ 69 (+53.33%)
Mutual labels:  svelte, sapper
Svelte Forms Lib
📝. A lightweight library for managing forms in Svelte
Stars: ✭ 238 (+428.89%)
Mutual labels:  svelte
sapper-authentication-demo
A demonstration of Auth with Sapper + JWT + Server Side Rendering + RBAC
Stars: ✭ 102 (+126.67%)
Mutual labels:  sapper
Svelte Mui
Simple Svelte 3 UI components
Stars: ✭ 234 (+420%)
Mutual labels:  svelte

sensor.community website

new shiny website for dust and noise measuring project 👉 sensor.community

How to install

Prerequisites

Get started

inside the folder install the dependencies...

npm install

or with yarn

yarn install

...then start Rollup:

npm run dev or sapper dev

alternative use yarn

yarn install
yarn dev or sapper dev

Navigate to localhost:3000. You should see your app running. Edit a component file in src, save it, and reload the page to see your changes.

By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv commands in package.json to include the option --host 0.0.0.0.

Getting started with Svelte & Sapper

Website is based on Svelte 3 and Sapper. Please consider reading the documentation.

Translation

1. Create locale file

duplicate locales/en.json file and rename it to language by iso-3166-alpha2 coding, for example fr for French. Translate the values in the locale file:

{
    "nav": {
      "home": "Accueil", <- "Accueil" is the value
        ...
    },

Now duplicate content/airrohr/en folder and rename it again to language by iso-3166-alpha2 coding. Also duplicate content/dnms/enfor the DNMS guide. Translate both

assembly guide

It's written in markdown. To get used to the markdown syntax, visit www.markdownguide.org.

FYI You can leave the filename. The title will be taken from the beginning of each file, see picture above.

2. Add new language to the init18n.js

Go to src/utils/initI18n.js. Add the new language, in this case it's French. First add the path to the locale file, then add it to the resources.

import fr from '../../locales/fr';  // path to the locale file

function initI18n(lng = 'en') {
  i18next.init({
    lng,
    resources: {
      en,
      de
      de,
      fr
    },

Go to src/routes/[lang]/_layout.svelte and extend the array with the new language.

<script context="module">
   const LANGUAGES = ["en", "de", "fr"];  // <- add new lanuage in the array
   const DEFAULT_LANGUAGE = "en";
   export async function preload(page) {...

3. Add language to the navbar

To add the language in the navbar go to src/components/LanguageSwitcher.svelte. Scroll down to around Line 24 and add this line with the corresponding language.

const langauges = [
        "gb", "de", "fr", "it", "sk", "ru" // <- add new lanuage in the array
    ]

4. Add endpoints

Duplicate inside src/routes/endpoints/airrohr or src/routes/endpoints/dnms then en folder to the iso-3166-alpha2, e.g. fr. Inside the index.json.js file change line 8.

import send from '@polka/send';
import generate_docs from '../../../../utils/generate_docs.js';

let json;

export function get(req, res) {
   if (!json || process.env.NODE_ENV !== 'production') {
       json = JSON.stringify(generate_docs('airrohr/fr'));  // <- change the lanuage iso-code 
   }

   send(res, 200, json, {
       'Content-Type': 'application/json'
   });
   
}

Bugs and feedback

The website is in early development, and may have the rough edge here and there.

Deployment

yarn export or sapper export

copy content of __sapper__/export to a ftp server

Happy coding 🎉 🙌

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].