This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ! Co2 always in tons | |
| export function convertCO2Units(co2t: number): string { | |
| const units = ["g", "kg", "t"]; | |
| let co2g = co2t * 1_000_000; // convert to grams | |
| let unitIndex = 0; | |
| while (co2g > 1000 && unitIndex < units.length - 1) { | |
| co2g /= 1000; | |
| unitIndex++; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <el-table | |
| ref="table" | |
| row-key="someKey" | |
| @row-click="rowClick" | |
| @expand-change="expandChange" | |
| :data="data" | |
| > | |
| <el-table-column type="expand"> | |
| <template v-slot:default="{ row }"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Vue from "vue"; | |
| import VueI18n from "vue-i18n"; | |
| Vue.use(VueI18n); | |
| function loadLocaleMessages () { | |
| const locales = require.context("./locales", true, /[a-z]{2}-[A-Z]{2}.json$/i); | |
| const messages = {}; | |
| locales.keys().forEach(key => { | |
| const matched = key.match(/[a-z]{2}-[A-Z]{2}/i); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="sixteen-nine"> | |
| <div class="content"> | |
| insert content here | |
| this will maintain a 16:9 aspect ratio | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $materialize-red: ( | |
| "base": #e51c23, | |
| "lighten-5": #fdeaeb, | |
| "lighten-4": #f8c1c3, | |
| "lighten-3": #f3989b, | |
| "lighten-2": #ee6e73, | |
| "lighten-1": #ea454b, | |
| "darken-1": #d0181e, | |
| "darken-2": #b9151b, |
NewerOlder