Create Nuxt version

This commit is contained in:
2020-08-08 20:08:44 -05:00
parent 9e80e528c9
commit 128c554ce5
194 changed files with 15155 additions and 12891 deletions

View File

@@ -0,0 +1,29 @@
<template>
<svg class="NuxtLogo" width="245" height="180" viewBox="0 0 452 342" xmlns="http://www.w3.org/2000/svg">
<path
d="M139 330l-1-2c-2-4-2-8-1-13H29L189 31l67 121 22-16-67-121c-1-2-9-14-22-14-6 0-15 2-22 15L5 303c-1 3-8 16-2 27 4 6 10 12 24 12h136c-14 0-21-6-24-12z"
fill="#00C58E"
/>
<path
d="M447 304L317 70c-2-2-9-15-22-15-6 0-15 3-22 15l-17 28v54l39-67 129 230h-49a23 23 0 0 1-2 14l-1 1c-6 11-21 12-23 12h76c3 0 17-1 24-12 3-5 5-14-2-26z"
fill="#108775"
/>
<path
d="M376 330v-1l1-2c1-4 2-8 1-12l-4-12-102-178-15-27h-1l-15 27-102 178-4 12a24 24 0 0 0 2 15c4 6 10 12 24 12h190c3 0 18-1 25-12zM256 152l93 163H163l93-163z"
fill="#2F495E"
/>
</svg>
</template>
<style>
.NuxtLogo {
animation: 1s appear;
margin: auto;
}
@keyframes appear {
0% {
opacity: 0;
}
}
</style>

View File

@@ -0,0 +1,19 @@
<template>
<footer>
A <strong><nuxt-link to="/">Bit Badger Solutions</nuxt-link></strong> original design
</footer>
</template>
<style scoped>
footer {
padding: 20px 15px 10px 15px;
text-align: right;
font-size: 1rem;
color: black;
clear: both;
background-image: linear-gradient(to bottom, #FFFAFA, lightgray);
}
footer a:link, footer a:visited {
color: black;
}
</style>

View File

@@ -0,0 +1,70 @@
<template>
<header class="site-header">
<div class="header-logo">
<nuxt-link to="/">
<img
src="/bitbadger.png"
alt="A cartoon badger looking at a computer screen, with his paw on a mouse"
title="Bit Badger Solutions">
</nuxt-link>
</div>
<div class="header-title">
<nuxt-link to="/">Bit Badger Solutions</nuxt-link>
</div>
<div class="header-spacer">
&nbsp;
</div>
<div class="header-social">
<a href="https://twitter.com/Bit_Badger" title="Bit_Badger on Twitter" target="_blank">
<img src="/twitter.png" alt="Twitter">
</a>&nbsp; &nbsp;<a href="https://www.facebook.com/bitbadger.solutions" title="Bit Badger Solutions on Facebook" _target="_blank">
<img src="/facebook.png" alt="Facebook">
</a>
</div>
</header>
</template>
<style scoped>
.site-header {
height: 100px;
display: flex;
flex-direction: row;
justify-content: space-between;
background-image: linear-gradient(to bottom, lightgray, #FFFAFA);
}
.site-header a, .site-header a:visited {
color: black;
}
.site-header a:hover {
border-bottom: none;
}
.header-title {
font-size: 3rem;
font-weight: bold;
line-height: 100px;
text-align: center;
}
.header-spacer {
flex-grow: 3;
}
.header-social {
padding: 25px .8rem 0 0;
}
.header-social img {
width: 50px;
height: 50px;
}
@media all and (max-width:40rem) {
.site-header {
height: auto;
flex-direction: column;
align-items: center;
}
.header-title {
line-height: 3rem;
}
.header-spacer {
display: none;
}
}
</style>

View File

@@ -0,0 +1,41 @@
<template>
<section>
<h3 @click="toggle()">
{{ heading }}<span class="arrow" v-html="label"></span>
</h3>
<slot v-if="isVisible"></slot>
</section>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
name: 'hidden-section',
props: [
'heading'
],
data () {
return {
isVisible: false,
label: '&#x25BC;'
}
},
methods: {
toggle () {
this.isVisible = !this.isVisible
this.label = this.isVisible ? '&#x25B2;' : '&#x25BC;'
}
}
})
</script>
<style scoped>
h3:hover {
cursor: hand;
cursor: pointer;
}
.arrow {
font-size: .75rem;
padding-left: 1rem;
}
</style>

View File

@@ -0,0 +1,108 @@
<template>
<aside class="app-sidebar">
<div v-for="cat in sortedCats" :key="cat">
<div class="app-sidebar-head" v-text="cat" />
<div v-for="sln in displayForCategegory(cat)" :key="sln.title">
<p class="app-sidebar-name">
<strong>{{ sln.title }}</strong><br>
<span v-if="!sln.noAboutLink">
<nuxt-link :to="`/solutions/${sln.slug}`" :title="aboutTitle(sln.title)">About</nuxt-link> &bull;
</span>
<a :href="sln.url" :title="sln.title" target="_blank">Visit</a>
</p>
<p class="app-sidebar-description" v-html="sln.frontPage.text" />
</div>
</div>
</aside>
</template>
<script lang="ts">
import Vue from 'vue'
/**
* Sort the categories in a specific order; any not addressed will appear at the bottom.
*/
const categoryOrder = (x: string, y: string) => {
if (x === 'Web Sites and Applications') { return -1 }
if (x === 'WordPress' && y !== 'Web Sites and Applications') { return -1 }
if (x === 'Static Sites' && y !== 'Web Sites and Applications' && y !== 'WordPress') { return -1 }
return 1
}
export default Vue.extend({
name: 'home-sidebar',
props: ['catNames', 'solutions'],
computed: {
sortedCats (): string[] {
return [...this.catNames].sort(categoryOrder)
}
},
methods: {
displayForCategegory (category: string): any[] {
return this.solutions
.filter((x: any) => x.category === category)
.sort((x: any, y: any) => x.frontPage.order - y.frontPage.order)
},
aboutTitle (name: string): string {
return `About ${name} | Bit Badger Solutions`
}
}
})
</script>
<style scoped>
.app-sidebar {
text-align: center;
border-top: dotted 1px lightgray;
padding-top: 1rem;
font-size: .9rem;
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
.app-sidebar > div {
width: 20rem;
padding-bottom: 1rem;
}
@media all and (min-width: 68rem) {
.app-sidebar {
width: 66rem;
margin: auto;
}
}
@media all and (min-width: 80rem) {
.app-sidebar {
width: 12rem;
border-top: none;
border-left: dotted 1px lightgray;
padding-top: 0;
padding-left: 2rem;
flex-direction: column;
}
.app-sidebar > div {
width: auto;
}
}
.app-sidebar a {
font-size: 10pt;
font-family: sans-serif;
}
.app-sidebar-head {
font-family: "Oswald", "Segoe UI", Ubuntu, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
font-weight: bold;
color: maroon;
margin-bottom: .8rem;
padding: 3px 12px;
border-bottom: solid 2px lightgray;
font-size: 1rem;
}
.app-sidebar-name, .app-sidebar-description {
margin: 0;
padding: 0;
}
.app-sidebar-description {
font-style: italic;
color: #555555;
padding-bottom: .6rem;
}
</style>

View File

@@ -0,0 +1,29 @@
<template>
<p>
<span class="app-name" v-html="solution.title"></span>
~ <nuxt-link :to="'/solutions/' + solution.slug">About</nuxt-link>
<span v-if="!solution.isInactive">~ <a :href="solution.url" target="_blank">Visit</a></span>
<span v-if="solution.isInactive && solution.archiveUrl">
~&nbsp;<a :href="solution.archiveUrl" target="_blank">Visit</a><em> (archive)</em>
</span>
<br>
<span v-html="solution.summary"></span>
</p>
</template>
<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
name: 'solution-item',
props: ['solution']
})
</script>
<style scoped>
.app-name {
font-family: "Oswald", "Segoe UI", Ubuntu, "DejaVu Sans", "Liberation Sans", Arial, sans-serif;
font-size: 1.3rem;
font-weight: bold;
color: maroon;
}
</style>

View File

@@ -0,0 +1,58 @@
<template>
<li>
<a v-if="hasLink(tech[0])" :href="techLinks[tech[0]]" target="_blank">{{ tech[0] }}</a>
<template v-else>{{ tech[0] }}</template>
for {{ tech[1] }}
</li>
</template>
<script lang="ts">
import Vue from 'vue'
/** Links to various technologies */
const techLinks: any = {
'ASP.NET MVC': 'https://dotnet.microsoft.com/apps/aspnet/mvc',
Azure: 'https://azure.microsoft.com/',
'BlogEngine.NET': 'http://www.dotnetblogengine.net/',
'Database Abstraction': 'https://github.com/danieljsummers/DatabaseAbstraction',
'Digital Ocean': 'https://www.digitalocean.com/',
Giraffe: 'https://github.com/giraffe-fsharp/Giraffe',
GitHub: 'https://github.com/',
'GitHub Pages': 'https://pages.github.com/',
Hexo: 'https://hexo.io/',
Hugo: 'https://gohugo.io/',
Jekyll: 'https://jekyllrb.com/',
MongoDB: 'https://www.mongodb.com/',
MySQL: 'https://www.mysql.com/',
myWebLog: 'https://github.com/bit-badger/myWebLog',
nginx: 'http://nginx.org/',
Orchard: 'https://orchardproject.net/',
PHP: 'https://www.php.net/',
PostgreSQL: 'https://www.postgresql.org/',
'Rackspace Cloud': 'https://www.rackspace.com/cloud',
RavenDB: 'https://ravendb.net/',
RethinkDB: 'https://rethinkdb.com/',
'SQL Server': 'https://www.microsoft.com/en-us/sql-server/',
'Vue.js': 'https://vuejs.org/',
WordPress: 'https://wordpress.org'
}
export default Vue.extend({
name: 'technology-item',
props: [ 'tech' ],
data () {
return { techLinks }
},
methods: {
/**
* Does the given technology have a known link?
*
* @param tech The technology to be checked
* @returns True if there is a link, false if not
*/
hasLink (tech: string): boolean {
return techLinks[tech] !== undefined
}
}
})
</script>