Skip to content

Commit

Permalink
re-centralise stylesheets
Browse files Browse the repository at this point in the history
  • Loading branch information
Sup2point0 committed Mar 28, 2024
1 parent e9594ba commit 85d924f
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 2 deletions.
1 change: 1 addition & 0 deletions quarkdown/quarkify.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def export(text: str) -> dict:
path = os.path.join(root, "resources/core.html")
with open(path) as file:
content = file.read().format(
style = load.get("style", "default"),
darkness = load.get("polarity", "#LIGHT") == "#DARK",
header = load.get("header", ""),
content = content,
Expand Down
4 changes: 2 additions & 2 deletions quarkdown/resources/core.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<html>

<head>
<link href="nova.css" rel="stylesheet">
<link href="essence.css" rel="stylesheet">
<link href="https://github.com/Sup2point0/supcode/blob/sup/resources/Nova/Nova.css" rel="stylesheet">
<link href="https://github.com/Sup2point0/Quarkdown/blob/main/quarkdown/resources/essence.css" rel="stylesheet"><link href="https://github.com/Sup2point0/Quarkdown/blob/main/quarkdown/resources/{style}.css" rel="stylesheet">
</head>

<body style="--darkness: {darkness}">
Expand Down
63 changes: 63 additions & 0 deletions quarkdown/resources/default.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/* core */
body {
margin: 0px;
background-color: var(--blue-night);
color: #fff;
font-size: 1.44em;
font-family: var(--font-body);
}

p {
font-weight: 200;
}

h1 {
padding: 0px;
text-align: center;
font-size: 4em;
font-family: var(--font-title);
font-weight: 500;
}
h2 {
margin-top: 1em;
margin-bottom: 0em;
padding-bottom: 0.2em;
font-size: 2em;
font-family: var(--font-head);
font-weight: 600;
border-bottom: 3.5px solid var(--teal-elec)
}
h3 {
margin-top: 0.5em;
margin-bottom: 0em;
font-size: 1.69em;
font-family: var(--font-head);
font-weight: 500;
}

code {
color: var(--mellow-cresc);
font-size: 84%;
font-family: var(--font-code);
font-weight: 400;
}

td {
font-size: 80%;
}
th {
font-size: 80%;
font-family: var(--font-head);
font-weight: 500;
}

em {
font-variation-settings: "slnt" -2;
}
h1 em, h2 em, h3 em {
font-variation-settings: "slnt" -4;
}

strong {
font-weight: bolder;
}
66 changes: 66 additions & 0 deletions quarkdown/resources/essence.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* internal */
@import url('https://fonts.googleapis.com/css2?family=Geologica:slnt,wght@-12..0,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300..700;1,300..700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Abel&display=swap');

/* root */
html {
--font-title: 'Geologica', 'Segoe UI Semibold', system-ui, sans-serif;
--font-head: 'Montserrat', 'Segoe UI Semibold', system-ui, sans-serif;
--font-body: 'Geologica', 'Segoe UI', system-ui, sans-serif;
--font-code: 'SF Mono', 'Roboto Mono', 'Consolas', ui-monospace, system-ui, monospace;
--font-flavour: 'Abel', 'Segoe UI', system-ui, sans-serif;
}

/* core */
a {
display: inline-block;
position: relative;
text-decoration: none;
color: var(--blue-cresc);
transition: .2s;
}
a:after {
content: '';
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 0.05rem;
background-color: var(--blue-nova);
transform: scaleX(0);
transform-origin: right;
transition: transform .2s ease-out;
}
a:hover {
color: var(--blue-nova);
}
a:hover:after {
transform: scaleX(1);
transform-origin: left;
}
a:visited {
color: var(--lilac-cresc);
}
a:visited:after {
background-color: var(--lilac-nova);
}
a:visited:hover {
color: var(--lilac-nova);
}

/* specific */
#content {
margin: 0 min(169px, 20vw);
color: #fff;
}

#footer {
width: 100%;
margin-top: 1em;
padding: 2em 0em;
background-color: #00060e;
text-align: center;
color: var(--grey-nova);
font-family: var(--font-flavour);
}

0 comments on commit 85d924f

Please sign in to comment.