Merge pull request #65 from ayoayco/style/footer-improvements

style: footer improvements
This commit is contained in:
Ayo Ayco 2023-06-24 11:03:29 +02:00 committed by GitHub
commit c7910ee2a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 28 deletions

View file

@ -2,31 +2,30 @@
import Icon from 'astro-iconify' import Icon from 'astro-iconify'
--- ---
<footer class="footer"> <footer>
<section>
Remove distractions.<br />Save for later.
</section>
<p>Remove distractions. Save for later.</p>
<p>No sign-ups. No setups. It just works.</p> <section class="attribution">
<p> <a href="http://ayos.blog/building-a-cozy-web/">Hand-crafted</a> with <Icon name="line-md:heart" /> by <a href="https://ayo.ayco.io">Ayo Ayco</a>
<br />
<a href="https://github.com/ayoayco/cozy">Star on GitHub to support!</a> <a href="https://github.com/ayoayco/cozy">Star on GitHub to support!</a>
</p> </section>
<p class="footer__attribution">
<a href="http://ayos.blog/building-a-cozy-web/">Hand-crafted</a> with <Icon name="line-md:heart" /> by <a href="https://ayo.ayco.io">Ayo Ayco</a
>
</p>
<p class="footer__disclaimer">All content rights and credits are reserved to their respective owners.</p>
<section class="disclaimer">All rights reserved to content owners.</section>
</footer> </footer>
<style lang="scss"> <style lang="scss">
.footer { footer {
width: 100%; width: 100%;
max-width: 350px;
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
color: #333; color: #333;
font-size: small; font-size: small;
padding-bottom: 1rem; display: flex;
border-top: 1px solid #eee;
svg { svg {
width: 1.25rem; width: 1.25rem;
@ -37,13 +36,20 @@ import Icon from 'astro-iconify'
color: red; color: red;
} }
&__disclaimer, &__attribution { section {
padding: 1rem 0 0; flex: 1;
} padding: 1rem 1rem 0;
&__title { &.attribution {
font-weight: bold; flex: 2;
font-size: 1.2rem; }
}
}
@media (max-width: 600px) {
footer {
flex-direction: column;
max-width: 350px;
} }
} }
</style> </style>

View file

@ -69,11 +69,11 @@ const datePublished =
pre { pre {
white-space: pre-wrap; white-space: pre-wrap;
} &:has(code) {
pre:has(code) { padding: 1em;
padding: 1em; background: #f6f8fa;
background: #f6f8fa; border-radius: 5px;
border-radius: 5px; }
} }
} }
</style> </style>

View file

@ -50,8 +50,8 @@ const appTitle = `Cozy 🧸${meta.title && ` | ${meta.title}`}`;
<slot name="library" /> <slot name="library" />
</div> </div>
</div> </div>
<slot name="footer">
</div> </div>
<Footer />
</body> </body>
</html> </html>

View file

@ -4,6 +4,7 @@ import AddressBar from "../components/AddressBar.astro";
import Post from "../components/Post.astro"; import Post from "../components/Post.astro";
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
import Library from "../components/Library.astro"; import Library from "../components/Library.astro";
import Footer from "../components/Footer.astro";
const params = Astro.url.searchParams; const params = Astro.url.searchParams;
const url = params.get('url') || ''; const url = params.get('url') || '';
@ -39,5 +40,6 @@ if (url === '') {
<Layout meta={article}> <Layout meta={article}>
<AddressBar url={url} /> <AddressBar url={url} />
<Post slot="post" article={article} /> <Post slot="post" article={article} />
<Library skipSave={skipSave} slot="library" postDivSelector="#post"/> <Library slot="library" skipSave={skipSave} postDivSelector="#post"/>
<Footer slot="footer" />
</Layout> </Layout>