Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions components/Backpack.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<template>
<g id="backpack">
<path style="fill:#006D5D;" d="M384.64,492.847c44.865,0,66.299-23.305,76.379-42.854c10.602-20.561,10.711-41.043,10.711-41.906
l-22.918,0.015v-0.041c-0.001,0.163-0.205,16.433-8.504,32.082c-10.481,19.764-29.21,29.785-55.668,29.785v22.919H384.64z"/>
<path style="fill:#C70024;" d="M355.189,149.441l38.614-42.329c4.177,3.81,95.731,89.757,95.473,283.492
c-0.007,5.323-1.975,10.464-5.514,14.439l-17.026,19.131c-3.905,4.388-10.871,4.023-14.296-0.75l-15.975-22.261
c-2.906-4.05-4.478-8.91-4.507-13.895c-0.452-79.336-18.033-136.189-34.085-171.644
C377.556,170.745,355.189,149.441,355.189,149.441z"/>
<path style="fill:#A5001E;" d="M393.802,107.112c3.227,2.943,58.589,54.923,83.496,167.729
c-5.762,45.712-22.265,85.528-45.316,112.989c-0.005-0.188-0.024-0.373-0.025-0.56c-0.452-79.336-18.033-136.189-34.085-171.644
c-20.317-44.88-42.686-66.184-42.686-66.184L393.802,107.112z"/>
<path style="fill:#006D5D;" d="M127.36,492.847c-44.865,0-66.299-23.305-76.379-42.854c-10.602-20.561-10.711-41.043-10.711-41.906
l22.918,0.015v-0.041c0.001,0.163,0.205,16.433,8.504,32.082c10.481,19.764,29.21,29.785,55.668,29.785v22.919H127.36z"/>
<path style="fill:#C70024;" d="M156.811,149.441l-38.614-42.329c-4.177,3.81-95.731,89.757-95.473,283.492
c0.007,5.323,1.975,10.464,5.514,14.439l17.026,19.131c3.905,4.388,10.872,4.023,14.296-0.75l15.975-22.261
c2.906-4.05,4.478-8.91,4.507-13.895c0.452-79.336,18.033-136.189,34.085-171.644C134.444,170.745,156.811,149.441,156.811,149.441z
"/>
<path style="fill:#A5001E;" d="M118.198,107.112c-3.227,2.943-58.589,54.923-83.496,167.729
c5.762,45.712,22.265,85.528,45.316,112.989c0.005-0.188,0.024-0.373,0.025-0.56c0.452-79.336,18.033-136.189,34.085-171.644
c20.317-44.88,42.686-66.184,42.686-66.184L118.198,107.112z"/>
<path style="fill:#D80027;" d="M227.642,128.277V62.736c0-15.638,12.722-28.359,28.358-28.359c15.636,0,28.358,12.722,28.358,28.359
v65.541h34.377V62.736C318.736,28.231,290.505,0,256,0l0,0c-34.505,0-62.736,28.231-62.736,62.736v65.541H227.642z"/>
<g>
<path style="fill:#C70024;" d="M284.359,62.736v65.541h34.377V82.159c0,0-6.991-47.782-62.735-47.782
C271.637,34.377,284.359,47.098,284.359,62.736z"/>
<path style="fill:#C70024;" d="M227.642,128.277V62.736c0-15.638,12.722-28.359,28.358-28.359
c-55.745,0-62.736,47.782-62.736,47.782v46.118H227.642z"/>
</g>
<path style="fill:#D80027;" d="M374.021,512H137.979c-22.151,0-40.107-17.956-40.107-40.107V128.277h316.256v343.616
C414.128,494.044,396.172,512,374.021,512z"/>
<g>
<path style="fill:#C70024;" d="M182.093,471.893V128.277h-84.22v343.616c0,22.151,17.956,40.107,40.107,40.107h84.22
C200.049,512,182.093,494.044,182.093,471.893z"/>
<path style="fill:#C70024;" d="M97.872,370.993C109.574,379.179,123.794,384,139.125,384h233.75
c15.332,0,29.552-4.821,41.253-13.007V128.277H97.872V370.993z"/>
</g>
<path style="fill:#A5001E;" d="M97.872,128.277v242.716C109.573,379.179,123.794,384,139.125,384h42.967V128.277H97.872z"/>
<path style="fill:#9A4C00;" d="M121.718,432.733c-8.547,0-16.636,1.959-23.846,5.451v33.71c0,22.15,17.957,40.107,40.107,40.107
h32.745c3.689-7.37,5.777-15.68,5.777-24.483C176.502,457.26,151.974,432.733,121.718,432.733z"/>
<path style="fill:#AA6100;" d="M390.282,432.733c8.547,0,16.636,1.959,23.846,5.451v33.71c0,22.15-17.957,40.107-40.107,40.107
h-32.745c-3.689-7.37-5.777-15.68-5.777-24.483C335.498,457.26,360.026,432.733,390.282,432.733z"/>
<path style="fill:#FF0C38;" d="M372.875,353.095h-233.75c-22.689,0-41.253-18.564-41.253-41.253v-188.43
c0-22.689,18.564-41.253,41.253-41.253h233.75c22.689,0,41.253,18.564,41.253,41.253v188.43
C414.128,334.531,395.564,353.095,372.875,353.095z"/>
<path style="fill:#D80027;" d="M177.37,311.842v-188.43c0-22.689,18.564-41.253,41.253-41.253h-79.498
c-22.689,0-41.253,18.564-41.253,41.253v188.43c0,22.689,18.564,41.253,41.253,41.253h79.498
C195.934,353.095,177.37,334.531,177.37,311.842z"/>
<path style="fill:#EE8700;" d="M182.093,408.096L182.093,408.096c-12.289,0-22.345-10.055-22.345-22.345V239.97
c0-12.289,10.055-22.345,22.345-22.345l0,0c12.289,0,22.345,10.055,22.345,22.345v145.781
C204.436,398.04,194.382,408.096,182.093,408.096z"/>
<path style="fill:#CC7400;" d="M182.093,385.751V239.97c0-8.226,4.508-15.444,11.172-19.323c-3.292-1.916-7.108-3.02-11.172-3.02
l0,0c-12.289,0-22.344,10.055-22.344,22.344v145.781c0,12.289,10.055,22.345,22.344,22.345l0,0c4.064,0,7.88-1.105,11.172-3.021
C186.6,401.196,182.093,393.977,182.093,385.751z"/>
<path style="fill:#EE8700;" d="M328.875,408.096L328.875,408.096c-12.289,0-22.345-10.055-22.345-22.345V239.97
c0-12.289,10.055-22.345,22.345-22.345l0,0c12.289,0,22.345,10.055,22.345,22.345v145.781
C351.22,398.04,341.164,408.096,328.875,408.096z"/>
<path style="fill:#CC7400;" d="M328.875,385.751V239.97c0-8.226,4.508-15.444,11.172-19.323c-3.292-1.916-7.108-3.02-11.172-3.02
l0,0c-12.289,0-22.344,10.055-22.344,22.344v145.781c0,12.289,10.055,22.345,22.344,22.345l0,0c4.064,0,7.88-1.105,11.172-3.021
C333.383,401.196,328.875,393.977,328.875,385.751z"/>
<g>
<path style="fill:#006D5D;" d="M204.436,381.913h-44.688c-4.268,0-7.726-3.458-7.726-7.726v-44.688
c0-4.268,3.458-7.726,7.726-7.726h44.688c4.268,0,7.726,3.458,7.726,7.726v44.688C212.163,378.455,208.704,381.913,204.436,381.913
z M167.474,366.46h29.236v-29.236h-29.236V366.46z"/>
<path style="fill:#006D5D;" d="M351.22,381.913h-44.688c-4.268,0-7.726-3.458-7.726-7.726v-44.688c0-4.268,3.458-7.726,7.726-7.726
h44.688c4.268,0,7.726,3.458,7.726,7.726v44.688C358.946,378.455,355.487,381.913,351.22,381.913z M314.258,366.46h29.236v-29.236
h-29.236V366.46z"/>
</g>
<circle style="fill:#FFFFFF;" cx="256" cy="170.495" r="31.343"/>
<path style="fill:#D1E7F8;" d="M256,170.498c0-11.6,6.306-21.719,15.672-27.14c-4.611-2.669-9.961-4.204-15.672-4.204
c-17.311,0-31.344,14.033-31.344,31.343c0,17.311,14.033,31.344,31.344,31.344c5.711,0,11.06-1.535,15.672-4.204
C262.306,192.217,256,182.098,256,170.498z"/>
</g>
</template>

<script>
export default {
name: 'Backpack'
}
</script>

<style scoped>
g {
transform: translate(375px, 215px) scale(0.1) scaleX(-1);
}
</style>
6 changes: 6 additions & 0 deletions components/FlagFigure.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,29 @@
class="flag"
v-show="isHalfRaised"
/>
<Backpack />
<Wreath
v-show="hasWreath"
/>
<GraduationHat />
</svg>
</template>

<script>
import Flag from './Flag.vue'
import Pole from './Pole'
import Wreath from './Wreath'
import Backpack from "@/components/Backpack";
import GraduationHat from "@/components/GraduationHat";

const raisedState = 'Raised'
const halfRaisedState = 'HalfRaised'

export default {
name: 'FlagFigure',
components: {
GraduationHat,
Backpack,
Wreath,
Flag,
Pole
Expand Down
30 changes: 30 additions & 0 deletions components/GraduationHat.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<template>
<g id="backpack">
<line
id="shadow"
x1="-30"
y1="290"
x2="300"
y2="290"
stroke="#64A02B"
stroke-width="80"
stroke-linecap="round"
/>
<path d="m421 138.601562v116.398438c0 48.601562-84.902344 75-165 75s-165-26.398438-165-75v-116.398438c0-8.101562 6.597656-15 15-15h300c8.402344 0 15 6.898438 15 15zm0 0" fill="#444"/>
<path d="m421 138.601562v116.398438c0 48.601562-84.902344 75-165 75v-206.398438h150c8.402344 0 15 6.898438 15 15zm0 0" fill="#292929"/>
<path d="m512 105c0 6.300781-3.898438 12-9.601562 14.097656l-241 90c-1.796876.601563-3.597657.902344-5.398438.902344s-3.601562-.300781-5.398438-.902344l-241-90v-28.199218l241-90c1.796876-.597657 3.597657-.898438 5.398438-.898438s3.601562.300781 5.398438.898438l241 90c5.703124 2.101562 9.601562 7.800781 9.601562 14.101562zm0 0" fill="#6e6e6e"/>
<path d="m512 105c0 6.300781-3.898438 12-9.601562 14.097656l-241 90c-1.796876.601563-3.597657.902344-5.398438.902344v-210c1.800781 0 3.601562.300781 5.398438.898438l241 90c5.703124 2.101562 9.601562 7.800781 9.601562 14.101562zm0 0" fill="#5a5a5a"/><path d="m271 105c0 8.398438-6.597656 15-15 15h-226v222.597656l29.097656 87.601563c2.703125 7.796875-1.5 16.5-9.296875 18.898437-8.101562 2.703125-16.5-1.5-18.898437-9.300781l-.902344-2.695313c-1.199219 7.199219-7.5 12.898438-15 12.898438-8.402344 0-15-6.601562-15-15v-330c0-8.402344 6.597656-15 15-15h241c8.402344 0 15 6.597656 15 15zm0 0" fill="#fdbf00"/>
</g>
</template>

<script>
export default {
name: 'GraduationHat'
}
</script>

<style scoped>
g {
transform: translate(275px, 550px) scale(0.1) scaleX(-1);
}
</style>
1 change: 1 addition & 0 deletions functions/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export async function handler(event) {
if (event.httpMethod !== 'GET') {
return response.methodNotAllowed
}
return response.fallback

const date = new Date()
if (helpers.sundown(date)) {
Expand Down
3 changes: 2 additions & 1 deletion functions/date/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const loadConfig = (envData) => {
}

if (env.apiKey === undefined || env.projectId === undefined) {
return require('./firebaseConfig')
const configFile = require('./firebaseConfig')
return configFile.config
}

return env
Expand Down