a serif paper-style theme for ctext that uses inherited font glyphs for display.
Paper theme for CText by yanwenywan
Details
Authoryanwenywan
LicenseMIT
Categoryctext.org
Created
Updated
Size2.6 kB
Statistics
Learn how we calculate statistics in the FAQ.
Failed to fetch stats.
Description
Notes
Userstyle doesn't have notes.Source code
/* ==UserStyle==
@name Paper theme for CText
@version 20250218.13.34
@namespace uk.yanwenyuan
@description a serif paper-style theme for ctext that uses inherited font glyphs for display.
@author Yanwenyuan
@license MIT
==/UserStyle== */
@-moz-document url-prefix("https://ctext.org/") {
@import url('https://fonts.googleapis.com/css2?family=Cactus+Classical+Serif&family=Lora:ital,wght@0,400..700;1,400..700&display=swap');
:root {
--font: Lora, "Cactus Classical Serif", serif;
--bg: #eeeeee;
--green: #3a6342;
--page: #f1f2e9;
--pagedark: #e0e0cf;
}
body {
font-size: 1em;
font-family: var(--font);
background: var(--bg);
}
.etext {
font-size: 0.8em;
font-family: var(--font);
}
.menuitem {
font-size: 12pt;
}
#content {
padding-left: clamp(50px, (0.45 * 100vw) - 470px, 450px);
padding-right: clamp(0px, (0.45 * 100vw) - 470px, 400px);
background: var(--bg);
padding-top: 25px
}
.text {
margin-top: 25px;
background-color: var(--page);
padding: 40px;
border-left: 1px solid var(--green);
border-right: 1px solid var(--green);
box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.15);
}
#menubar {
width: 250px;
scrollbar-width: none;
background: linear-gradient(to right, #3334, transparent);
}
.menuitem.listhead {
background: transparent;
text-align: left;
}
#menu, #language, #search, #home, #searchbooks, #logininfo, #source, #rhsbar > * {
background-color: var(--pagedark);
border: 1px solid var(--green);
box-shadow: 0px 0px 5px 3px rgba(0, 0, 0, 0.15);
padding: 10px
}
@media (max-width: 768px) {
body {
font-size: min(6vw, 24px);
}
#menubar {
position: fixed;
left: 0;
top: 0;
width: 1em;
height: 100vh;
background: #3336;
transition: width 0.15s ease-in-out;
z-index: 1000;
}
#menubar > * {
visibility: hidden;
opacity: 0;
transition: opacity 0.15s ease-in-out;
}
#menubar:hover,
#menubar:focus-within {
width: 75vw;
max-width: 300px;
background: linear-gradient(to right, #3334, transparent);
}
#menubar:hover > *,
#menubar:focus-within > * {
visibility: visible;
opacity: 1;
}
#menubar input {
position: absolute;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
}
#content {
max-width: calc(100% - 40px);
margin: 0 auto;
padding: 20px;
box-sizing: border-box;
}
}
}