✨ (notes) share notes
This commit is contained in:
8
src/assets/icons/share.svg
Normal file
8
src/assets/icons/share.svg
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-share" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3a47" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="6" cy="12" r="3" />
|
||||||
|
<circle cx="18" cy="6" r="3" />
|
||||||
|
<circle cx="18" cy="18" r="3" />
|
||||||
|
<line x1="8.7" y1="10.7" x2="15.3" y2="7.3" />
|
||||||
|
<line x1="8.7" y1="13.3" x2="15.3" y2="16.7" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 484 B |
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<main class="flux-note content note-container">
|
<main class="flux-note content note-container">
|
||||||
<div class="note readme">
|
<div class="note readme">
|
||||||
<header-note class="header" :user="user" :repo="repo" />
|
<header-note v-if="withHeader" class="header" :user="user" :repo="repo" />
|
||||||
<div class="repo-title-breadcrumb">
|
<div class="repo-title-breadcrumb">
|
||||||
<a @click.prevent="focus">{{ repo }}</a>
|
<a @click.prevent="focus">{{ repo }}</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,6 +36,8 @@
|
|||||||
:key="stackedNote"
|
:key="stackedNote"
|
||||||
:index="index"
|
:index="index"
|
||||||
:sha="stackedNote"
|
:sha="stackedNote"
|
||||||
|
:user="user"
|
||||||
|
:repo="repo"
|
||||||
:title="titles[stackedNote ?? '']"
|
:title="titles[stackedNote ?? '']"
|
||||||
/>
|
/>
|
||||||
</main>
|
</main>
|
||||||
@@ -73,7 +75,8 @@ export default defineComponent({
|
|||||||
props: {
|
props: {
|
||||||
user: { type: String, required: true },
|
user: { type: String, required: true },
|
||||||
repo: { type: String, required: true },
|
repo: { type: String, required: true },
|
||||||
content: { type: String, required: false, default: null }
|
content: { type: String, required: false, default: null },
|
||||||
|
withHeader: { type: Boolean, required: false, default: true }
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const refProps = toRefs(props)
|
const refProps = toRefs(props)
|
||||||
@@ -190,25 +193,26 @@ $header-height: 40px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 769px) {
|
// @media screen and (min-width: 769px) {
|
||||||
.repo-title-breadcrumb {
|
// .repo-title-breadcrumb {
|
||||||
padding: 0.5rem 1rem 0;
|
// padding: 0.5rem 1rem 0;
|
||||||
transform-origin: 0 0;
|
// transform-origin: 0 0;
|
||||||
transform: rotate(90deg);
|
// transform: rotate(90deg);
|
||||||
font-size: 0.8em;
|
// font-size: 0.8em;
|
||||||
|
|
||||||
a {
|
// a {
|
||||||
color: var(--font-color);
|
// color: var(--font-color);
|
||||||
display: block;
|
// display: block;
|
||||||
text-align: center;
|
// text-align: center;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
.note {
|
// .note {
|
||||||
min-width: var(--note-width);
|
// min-width: var(--note-width);
|
||||||
max-width: var(--note-width);
|
// max-width: var(--note-width);
|
||||||
}
|
// height: auto;
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
.loading {
|
.loading {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -222,12 +226,19 @@ $header-height: 40px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media print, screen {
|
||||||
|
.readme {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
|
||||||
.flux-note {
|
.flux-note {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
||||||
.note {
|
.note {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
|
height: auto;
|
||||||
|
position: static;
|
||||||
|
overflow-y: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,16 @@
|
|||||||
{{ displayedTitle }}
|
{{ displayedTitle }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="share">
|
||||||
|
<router-link
|
||||||
|
:to="{
|
||||||
|
name: 'ShareNotes',
|
||||||
|
params: { user: user, repo: repo, note: sha }
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<img src="@/assets/icons/share.svg" alt="share" />
|
||||||
|
</router-link>
|
||||||
|
</div>
|
||||||
<section class="note-content" v-html="content"></section>
|
<section class="note-content" v-html="content"></section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -27,6 +37,8 @@ import { useImages } from '@/hooks/useImages.hook'
|
|||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'StackedNote',
|
name: 'StackedNote',
|
||||||
props: {
|
props: {
|
||||||
|
user: { type: String, required: true },
|
||||||
|
repo: { type: String, required: true },
|
||||||
index: { type: Number, required: true },
|
index: { type: Number, required: true },
|
||||||
title: { type: String, required: true },
|
title: { type: String, required: true },
|
||||||
sha: { type: String, required: true }
|
sha: { type: String, required: true }
|
||||||
@@ -99,6 +111,13 @@ $border-color: rgba(18, 19, 58, 0.2);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.share {
|
||||||
|
float: right;
|
||||||
|
img {
|
||||||
|
vertical-align: bottom;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
.stacked-note {
|
.stacked-note {
|
||||||
padding: 0 1.5rem;
|
padding: 0 1.5rem;
|
||||||
|
|||||||
@@ -35,10 +35,18 @@ body {
|
|||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 769px) {
|
// @media screen and (min-width: 769px) {
|
||||||
|
// html,
|
||||||
|
// body {
|
||||||
|
// overflow-y: hidden;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
@media print, screen {
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
overflow-y: hidden;
|
overflow-y: auto;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user