1
0
Fork 0

improve projects page

This commit is contained in:
Moritz Ruth 2019-03-10 18:29:09 +01:00
parent fa14506eaa
commit 2d8318633c
5 changed files with 102 additions and 43 deletions

View file

@ -1,6 +1,12 @@
$desktop-min-breakpoint: 640px; $desktop-min-breakpoint: 640px;
$mobile-max-breakpoint: $desktop-min-breakpoint - 1px; $mobile-max-breakpoint: $desktop-min-breakpoint - 1px;
@mixin mobile {
@media only screen and (max-width: $mobile-max-breakpoint) {
@content
}
}
@mixin desktop { @mixin desktop {
@media only screen and (min-width: 640px) { @media only screen and (min-width: 640px) {
@content @content

View file

@ -13,7 +13,11 @@ body {
font-size: 16px; font-size: 16px;
background-color: $c-background; background-color: $c-background;
color: $c-text color: $c-text;
}
::selection {
background-color: rgba(255, 255, 255, 0.1);
} }
*, *,

View file

@ -1,5 +1,7 @@
<template> <template>
<div class="project"> <div class="project">
<span class="type">{{ type }}</span>
<div class="padded">
<span class="title">{{ title }}</span> <span class="title">{{ title }}</span>
<div class="links"> <div class="links">
<div v-for="(link, index) in links" :key="link.name" class="link"> <div v-for="(link, index) in links" :key="link.name" class="link">
@ -17,6 +19,7 @@
<slot></slot> <slot></slot>
</p> </p>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -28,7 +31,8 @@
required: true required: true
}, },
npm: String, npm: String,
github: String github: String,
type: String
}, },
computed: { computed: {
links() { links() {
@ -56,19 +60,37 @@
<style scoped lang="scss"> <style scoped lang="scss">
@import "~@/assets/_colors"; @import "~@/assets/_colors";
@import "~@/assets/_responsive";
.project { .project {
margin: 20px; margin: 20px;
height: fit-content; height: fit-content;
text-align: center; text-align: center;
padding: 20px;
border: 1px solid darken($c-background, 2); border: 1px solid darken($c-background, 2);
border-radius: 5px; border-radius: 5px;
width: 400px; width: 400px;
.type {
margin: 20px 0 5px;
display: inline-block;
font-size: 14px;
font-family: monospace;
width: 100%;
text-align: center;
background-color: darken($c-background, 2);
}
.padded {
padding: 0 20px 20px 20px;
}
.title { .title {
display: block; display: block;
font-size: 60px; font-size: 30px;
@include desktop {
font-size: 40px;
}
} }
.links { .links {
@ -98,5 +120,10 @@
.description { .description {
font-size: 18px; font-size: 18px;
} }
transition: box-shadow 0.3s ease;
&:hover {
box-shadow: 0 2px 10px 0 rgba(0,0,0,0.2);
}
} }
</style> </style>

View file

@ -1,6 +1,8 @@
<template> <template>
<div id="layout"> <div id="layout">
<nuxt-link class="button" to="/"></nuxt-link> <div class="top-bar">
<nuxt-link class="button" to="/">Back</nuxt-link>
</div>
<div class="content"> <div class="content">
<nuxt/> <nuxt/>
</div> </div>
@ -19,11 +21,30 @@
@import "~@/assets/_mixins"; @import "~@/assets/_mixins";
#layout { #layout {
.top-bar {
@include mobile {
background-color: darken($c-background, 1);
width: 100%;
position: sticky;
top: 0;
right: 0;
}
.button { .button {
@include mobile {
margin: 10px 10px;
}
@include desktop {
position: fixed;
top: 40px;
left: 40px;
}
&::before { &::before {
content: ""; content: "";
display: inline-block; display: inline-block;
margin-right: -5px; margin-right: 5px;
@include arrow(12px, -90deg, white); @include arrow(12px, -90deg, white);
} }
@ -32,24 +53,15 @@
border-color: $c-background; border-color: $c-background;
} }
} }
position: fixed;
top: 10px;
left: 10px;
@include desktop {
position: fixed;
top: 5vh;
left: 10vw;
} }
} }
.content { .content {
width: 100%; width: 100%;
padding: 65px 10px 0; padding: 0 10px;
@include desktop { @include desktop {
width: 50%; width: 70vw;
margin: 0 auto; margin: 0 auto;
padding-top: 20px; padding-top: 20px;
} }

View file

@ -5,21 +5,31 @@
title="pzl" title="pzl"
npm="@ctexxx/pzl" npm="@ctexxx/pzl"
github="ctexxx/pzl" github="ctexxx/pzl"
type="Node.js library"
> >
A tiny zero-configuration console logger Pretty zero-configuration console logger.
</CodingProject> </CodingProject>
<CodingProject <CodingProject
title="shxrt" title="shxrt"
github="ctexxx/shxrt" github="ctexxx/shxrt"
type="Node.js script"
> >
<p> <p>
A URL shortener service intended to be used with <a href="https://now.sh">now</a> and URL shortener service intended to be used with <a href="https://now.sh">now</a> and
<a href="https://graph.cool">graph.cool</a>. <a href="https://graph.cool">GraphCool</a>.
</p> </p>
<p> <p>
Powering <a href="https://go.ctexxx.dev">go.ctexxx.dev</a>. Powering <a href="https://go.ctexxx.dev">go.ctexxx.dev</a>.
</p> </p>
</CodingProject> </CodingProject>
<CodingProject
title="singleinstancelock"
npm="singleinstancelock"
github="ctexxx/singleinstancelock"
type="Node.js library"
>
Allow only one instance of your script at a time.
</CodingProject>
</div> </div>
</main> </main>
</template> </template>
@ -36,8 +46,8 @@
<style scoped lang="scss"> <style scoped lang="scss">
.projects { .projects {
display: flex; display: flex;
justify-content: space-evenly; justify-content: flex-start;
align-items: center; align-items: flex-start;
align-content: flex-start; align-content: flex-start;
flex-wrap: wrap; flex-wrap: wrap;
} }