Skip to content

Commit a80a1a1

Browse files
authored
Merge pull request #924 from ionous/beta-link
create a beta landing page
2 parents 6244575 + 860d9b8 commit a80a1a1

File tree

4 files changed

+45
-2
lines changed

4 files changed

+45
-2
lines changed

cal/src/CalBeta.vue

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!-- display a page describing the calendar beta -->
2+
<script>
3+
export default {
4+
emits: [ 'pageLoaded' ],
5+
mounted() {
6+
// have to tell CalMain that we finished loading okay
7+
this.$emit("pageLoaded", false); // pass false meaning no special data
8+
},
9+
}
10+
</script>
11+
<template>
12+
<article class="c-beta">
13+
<b>Welcome to the new Shift&nbsp;Calendar!</b>
14+
<p>We're trying out a new version of the Shift Calendar optimized for phones. It shows one week at a time, letting you navigate week to week. You can search rides, and even save your favorite rides.</p>
15+
<p>We consider it a beta -- where "beta" is a classy software term for "might have bugs".
16+
Try it out, and <a href="mailto:bikecal@shift2bikes.org">let us know</a> what you think: the good, the bad, and the "hey, it sort of works!"</p>
17+
<a class="c-beta__button" href="/events">Yes! Try it out!</a>
18+
<a class="c-beta__button" href="/calendar">No, get me out of here!</a>
19+
</article>
20+
</template>
21+
<style>
22+
.c-beta {
23+
b {
24+
font-size: larger;
25+
}
26+
display: flex;
27+
flex-direction: column;
28+
align-items: center;
29+
font-size: large;
30+
margin: 2em 1em;
31+
border: var(--orangey-border);
32+
color: var(--feature-text);
33+
background: var(--feature-bg);
34+
text-align: center;
35+
padding: 1em 1em;
36+
}
37+
</style>

cal/src/CalMain.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default {
107107
// ( the only problem would be how to parameterize the page with the error string
108108
// ( could pass it as a query string? or is that too messy? )
109109
this.error = error;
110-
} else {
110+
} else if (context) {
111111
this.page = context.page; // matches the format of siteConfig.defaultPageInfo
112112
this.shortcuts = context.shortcuts;
113113
scrollPos.restorePos(this.$route);

cal/src/calMain.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import CalList from './CalList.vue'
1313
import CalSearch from './CalSearch.vue'
1414
import CalFavorites from './CalFavorites.vue'
1515
import EventDetails from './EventDetails.vue'
16+
import CalBeta from './CalBeta.vue'
1617
// import Empty from './Empty.vue'
1718

1819
// the router reads and writes the user's address bar
@@ -45,6 +46,11 @@ const router = createRouter({
4546
path: '/events/:series_id(\\d+)/:caldaily_id(\\d+)/:slug?',
4647
component: EventDetails
4748
},
49+
{
50+
name: "beta",
51+
path: "/events/beta",
52+
component: CalBeta,
53+
},
4854
],
4955
})
5056

site/config/_default/hugo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ disableKinds = ["taxonomy", "term"]
3434
# Child of Calendar
3535
[[menu.main]]
3636
name = "Events (Beta)"
37-
url = "/events/"
37+
url = "/events/beta/"
3838
weight = 1
3939
identifier = ""
4040
parent = "Calendar"

0 commit comments

Comments
 (0)