startpage/templates/style.css

174 lines
3.2 KiB
CSS
Raw Normal View History

2022-05-08 14:32:13 +02:00
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url("/icons.ttf");
src: local('Material Icons'),
local('MaterialIcons-Regular'),
url("/icons.ttf") format('truetype');
}
.material-icons {
transform: translateY(3px);
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px; /* Preferred icon size */
display: inline-block;
line-height: 1;
text-transform: none;
letter-spacing: normal;
word-wrap: normal;
white-space: nowrap;
direction: ltr;
/* Support for all WebKit browsers. */
-webkit-font-smoothing: antialiased;
/* Support for Safari and Chrome. */
text-rendering: optimizeLegibility;
/* Support for Firefox. */
-moz-osx-font-smoothing: grayscale;
/* Support for IE. */
font-feature-settings: 'liga';
}
* {
margin: 0;
padding: 0;
}
html, body {
width: 100%;
2022-05-08 22:12:48 +02:00
min-height: 100vh;
2022-05-08 14:32:13 +02:00
font-size: 100%;
}
body {
background-color: {{ .Background }};
}
main {
width: 100%;
2022-05-08 22:12:48 +02:00
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
margin-bottom: 0.5em;
2022-05-08 14:32:13 +02:00
}
#bookmark-container {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: center;
}
#search {
2022-05-08 22:12:48 +02:00
margin: 3em auto;
2022-05-08 22:15:28 +02:00
max-width: calc(100% - 2em);
2022-05-08 14:32:13 +02:00
}
#search form {
--input-font-size: 1.2em;
2022-05-08 22:12:48 +02:00
--width: 30rem;
--height: 2.5rem;
position: relative;
display: block;
width: var(--width);
height: var(--height);
max-width: 100%;
2022-05-08 14:32:13 +02:00
}
#search form input[type="search"] {
2022-05-08 22:12:48 +02:00
position: absolute;
top: 0;
left: 0;
2022-05-08 14:32:13 +02:00
display: inline-block;
2022-05-08 22:12:48 +02:00
width: calc(100% - var(--height));
height: var(--height);
2022-05-08 14:32:13 +02:00
border: 1px solid black;
2022-05-08 22:12:48 +02:00
padding: 0 0.5em;
box-sizing: border-box;
2022-05-08 14:32:13 +02:00
outline: 0;
background-color: black;
color: white;
transition: all 0.2s ease-in-out;
border-radius: 0.25em 0 0 0.25em;
font-size: var(--input-font-size);
}
#search form input[type="search"]:focus {
box-shadow: 0px 0px 3px gray;
transition: all 0.2s ease-in-out;
}
#search form input[type="search"]:focus + label[for="submit"] {
background-color: #111;
box-shadow: 0px 0px 3px gray;
transition: all 0.2s ease-in-out;
}
#search form label[for="submit"] {
2022-05-08 22:12:48 +02:00
position: absolute;
top: 0;
right: 0;
display: inline-block;
width: var(--height);
height: var(--height);
2022-05-08 14:32:13 +02:00
margin-left: 0;
border: 1px solid black;
2022-05-08 22:12:48 +02:00
box-sizing: border-box;
2022-05-08 14:32:13 +02:00
background-color: black;
color: white;
transition: all 0.2s ease-in-out;
border-radius: 0 0.25em 0.25em 0;
font-size: var(--input-font-size);
cursor: pointer;
}
2022-05-08 22:12:48 +02:00
#search form label[for="submit"] span {
transform: translate(0.3em, 0.3em);
2022-05-08 14:32:13 +02:00
}
#search form input[type="submit"] {
display: none;
}
.bookmark {
display: block;
box-sizing: border-box;
transition: all 0.2s ease-in-out;
width: {{ .IconWidth }};
height: {{ .IconHeight }};
margin: {{ .IconMargin }};
padding: {{ .IconPadding }};
border-radius: {{ .BorderRadius }};
}
.bookmark:hover {
transform: scale(1.1, 1.1);
transition: all 0.2s ease-in-out;
}
.background {
width: 100%;
height: 100%;
background-position: center;
background-size: contain;
background-repeat: no-repeat;
2022-05-08 21:43:47 +02:00
border-radius: {{ .BorderRadius }};
2022-05-08 22:19:44 +02:00
}
@media screen and (max-width: 30em) {
.bookmark {
width: calc({{ .IconWidth }} * 0.5);
height: calc({{ .IconHeight }} * 0.5);
}
2022-05-08 14:32:13 +02:00
}