Skip to content

Commit

Permalink
markup: Fix opening tag parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepy-monax committed Sep 13, 2024
1 parent 312cb8e commit 02fba13
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 2 deletions.
176 changes: 176 additions & 0 deletions dev/disclone.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
<title>Disclone | Home 🛜</title>
</head>

<body>
<header>
<h1>Disclone</h1>
<a href="/channels">
<div class="btn white">Open Disclone</div>
</a>
</header>
<section id="pres">
<img class="bg" src="static/home/bg.svg" alt="background" />
<h2>Ceci n'est pas Discord</h2>
<div class="side-text">
<h3>No ads</h3>
<h3>No trackers</h3>
<h3>No data-collection</h3>
</div>
<div class="img">
<img src="static/home/screen.png" alt="application screenshot" />
</div>
</section>
<footer>
<p>Choose the responsible, open source, tracker free discord.
create your account in 2 clicks and join our community
</p>
Lou ! x Carbonlab
</footer>
</body>

<style>
body {
margin: 0;
min-height: 100svh;
font-family: sans-serif;
display: flex;
flex-direction: column;
--blue: rgba(88, 101, 242, 1);
--blue-shadow: rgba(88, 101, 242, 0.6);
--white: #fcfcfc;
--black: #171715;
background: var(--black);
overflow: hidden;
}

header {
background: var(--black);
width: 100%;
height: 5rem;
display: flex;
color: var(--white);
flex-direction: row;
align-items: center;
justify-content: space-around;
}

h2 {
font-size: 4rem;
text-align: center;
font-weight: 900;
line-height: 3.7rem;
}

p {
width: 50%;
line-height: 2rem;
font-size: 1.2rem;
font-weight: 100;
text-align: center;
}

footer {
height: 20svh;
background: var(--black);
color: var(--white);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 2rem;
}

#pres {
background: var(--black);
height: fit-content;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
color: var(--white);
padding: 3rem 0 8rem 0;
}

.btn {
border-radius: 4rem;
padding: 0.6rem 1rem;
}

.white {
background: var(--white);
color: var(--black);
}

.black {
background: var(--black);
color: var(--white);
}

header .btn {
font-weight: 800;
font-size: 0.8rem;
}

#pres .btn {
font-size: 1.2rem;
padding: 1rem 2rem;
}

a:visited {
text-decoration: none;
}

a:link {
text-decoration: none;
}

.img {
height: calc(50svh + 2rem);
border-radius: 1rem;
overflow: hidden;
width: fit-content;
padding: 1rem;
background: #6370855e;
transform: translate(31%, 0);
backdrop-filter: blur(2px);
filter: drop-shadow(-3px 3px 8px #00000063);
user-select: none;
}

.img img {
height: 100%;
border-radius: 1rem;
}

.bg {
height: 172vh;
position: absolute;
right: 0;
transform: translate(8%, 3svh) rotate(322deg);
pointer-events: none;
}

.side-text {
position: absolute;
top: 45svh;
left: 13vw;
}

h3 {
font-size: 2.7rem;
margin: 1.5rem 0;
}

@media (max-aspect-ratio:11/9) {
.side-text {
visibility: hidden;

}
}
</style>

</html>
2 changes: 1 addition & 1 deletion src/paper-muncher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Async::Task<> entryPointAsync(Sys::Context &ctx) {

co_return Ui::runApp(
ctx,
PaperMuncher::Inspector::app(input, dom)
PaperMuncher::Inspector::app(input, dom) | Ui::inspector
);
} else {
Sys::errln("unknown verb: {} (expected: css-dump-stylesheet, css-dump-sst, css-dump-tokens, style-list-props, markup-dump-dom, markup-dump-tokens, inspector)\n");
Expand Down
2 changes: 1 addition & 1 deletion src/web/vaev-markup/xml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static bool _isNameChar(Rune r) {
return false;
}

static constexpr auto RE_NAME_CHAR = RE_NAME_START_CHAR & Re::zeroOrMore(Re::ctype(_isNameChar));
static constexpr auto RE_NAME_CHAR = RE_NAME_START_CHAR | Re::ctype(_isNameChar);

static constexpr auto RE_NAME = RE_NAME_START_CHAR & Re::zeroOrMore(RE_NAME_CHAR);

Expand Down

0 comments on commit 02fba13

Please sign in to comment.