style(site): spacing, colors, responsiveness
This commit is contained in:
parent
0140f79339
commit
80b678da27
3 changed files with 46 additions and 19 deletions
|
@ -1,14 +1,31 @@
|
||||||
<header
|
<header class="my-header">
|
||||||
style="
|
<h1><slot /></h1>
|
||||||
|
<slot name="description" />
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.my-header {
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background: linear-gradient(45deg, #3054bf, #416fff);
|
background: linear-gradient(45deg, #3054bf, #416fff);
|
||||||
color: white;
|
color: white;
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
"
|
|
||||||
>
|
& a {
|
||||||
<a style="color: white" href="/">
|
color: white;
|
||||||
<h1><slot /></h1>
|
}
|
||||||
</a>
|
}
|
||||||
<slot name="description" />
|
|
||||||
</header>
|
@media only screen and (max-device-width: 376px) {
|
||||||
|
.my-header {
|
||||||
|
& h1 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
line-clamp: 1;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 1em;
|
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
@ -19,12 +18,27 @@
|
||||||
border: 1px solid var(--color-primary);
|
border: 1px solid var(--color-primary);
|
||||||
padding: 0.75em;
|
padding: 0.75em;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
&#primary {
|
&#primary {
|
||||||
background-color: var(--color-primary);
|
background: #3054bf;
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
width: 40%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-device-width: 376px) {
|
||||||
|
.call-to-action {
|
||||||
|
flex-direction: column;
|
||||||
|
& a:not(#primary) {
|
||||||
|
padding: 0.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -27,16 +27,12 @@
|
||||||
<main>
|
<main>
|
||||||
<section style="font-size: larger;">
|
<section style="font-size: larger;">
|
||||||
<p>
|
<p>
|
||||||
Our
|
Our <a href="https://www.npmjs.com/package/web-component-base">tiny package</a> provides a zero-dependency, ~600 Bytes (minified & gzipped), JS base class for creating reactive custom elements easily.
|
||||||
<a href="https://www.npmjs.com/package/web-component-base">
|
|
||||||
tiny package
|
|
||||||
</a>
|
|
||||||
provides zero-dependency, ~600 Bytes (minified & gzipped), JS base class
|
|
||||||
for creating reactive custom elements easily.
|
|
||||||
</p>
|
</p>
|
||||||
<call-to-action />
|
<call-to-action />
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<hr style="margin: 2em 0;" />
|
||||||
|
<section style="font-size: large;">
|
||||||
<p>
|
<p>
|
||||||
When you extend the WebComponent class for your component, you only have to define the template and properties. Any change in any property value will automatically cause just the component UI to render.
|
When you extend the WebComponent class for your component, you only have to define the template and properties. Any change in any property value will automatically cause just the component UI to render.
|
||||||
</p>
|
</p>
|
||||||
|
@ -65,7 +61,7 @@ customElements.define("my-counter", Counter);
|
||||||
<my-footer>
|
<my-footer>
|
||||||
<!-- <p>View page <a href="https://github.com/ayoayco/web-component-base/blob/main/site/src/pages/index.html">source code</a></p> -->
|
<!-- <p>View page <a href="https://github.com/ayoayco/web-component-base/blob/main/site/src/pages/index.html">source code</a></p> -->
|
||||||
<span>This site is built with
|
<span>This site is built with
|
||||||
<a href="https://github.com/ayoayco/McFly">McFly</a>, the no-framework framework
|
<a href="https://github.com/ayoayco/McFly">McFly</a>, the no-framework framework;
|
||||||
</span><br />
|
</span><br />
|
||||||
<span>
|
<span>
|
||||||
A project by <a href="{{ author.url }}">{{ author.name }}</a>
|
A project by <a href="{{ author.url }}">{{ author.name }}</a>
|
||||||
|
|
Loading…
Reference in a new issue