Skip to content

Commit

Permalink
Merge pull request #219 from matrix-org/t3chguy/msc3266
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Aug 13, 2021
2 parents 2acec4f + acd8813 commit c25a9da
Show file tree
Hide file tree
Showing 33 changed files with 834 additions and 804 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
build
*.tar.gz
/.idea
52 changes: 26 additions & 26 deletions css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,31 @@ limitations under the License.
@import url('open.css');

:root {
--app-background: #f4f4f4;
--background: #ffffff;
--foreground: #000000;
--font: #333333;
--grey: #666666;
--accent: #0098d4;
--error: #d6001c;
--link: #0098d4;
--borders: #f4f4f4;
--app-background: #f4f4f4;
--background: #ffffff;
--foreground: #000000;
--font: #333333;
--grey: #666666;
--accent: #0098d4;
--error: #d6001c;
--link: #0098d4;
--borders: #f4f4f4;
--lightgrey: #E6E6E6;
--spinner-stroke-size: 2px;
}

html {
margin: 0;
padding: 0;
margin: 0;
padding: 0;
}

body {
background-color: var(--app-background);
background-image: url('../images/background.svg');
background-color: var(--app-background);
background-image: url('../images/background.svg');
background-attachment: fixed;
background-repeat: no-repeat;
background-size: auto;
background-position: center -50px;
background-repeat: no-repeat;
background-size: auto;
background-position: center -50px;
height: 100%;
width: 100%;
font-size: 14px;
Expand Down Expand Up @@ -89,12 +89,12 @@ input[type="checkbox"], input[type="radio"] {

.RootView {
margin: 0 auto;
max-width: 480px;
width: 100%;
max-width: 480px;
width: 100%;
}

.card {
background-color: var(--background);
background-color: var(--background);
border-radius: 16px;
box-shadow: 0px 18px 24px rgba(0, 0, 0, 0.06);
}
Expand All @@ -104,20 +104,20 @@ input[type="checkbox"], input[type="radio"] {
}

.hidden {
display: none !important;
display: none !important;
}


@media screen and (max-width: 480px) {
body {
background-image: none;
background-color: var(--background);
padding: 0;
background-image: none;
background-color: var(--background);
padding: 0;
}

.card {
border-radius: unset;
box-shadow: unset;
border-radius: unset;
box-shadow: unset;
}
}

Expand All @@ -141,7 +141,7 @@ input[type="checkbox"], input[type="radio"] {
}

a, button.text {
color: var(--link);
color: var(--link);
}

button.text {
Expand Down
4 changes: 4 additions & 0 deletions css/preview.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
height: 64px;
}

.PreviewView .mxSpace .avatar {
border-radius: 12px;
}

.PreviewView .defaultAvatar {
width: 64px;
height: 64px;
Expand Down
66 changes: 33 additions & 33 deletions images/client-icons/fluffychat.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>You're invited to talk on Matrix</title>
<meta name="description" content="You're invited to talk on Matrix">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" type="text/css" href="css/main.css">
<meta charset="utf-8">
<title>You're invited to talk on Matrix</title>
<meta name="description" content="You're invited to talk on Matrix">
<meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<script id="main" type="module">
import {main} from "./src/main.js";
main(document.body);
</script>
<script id="main" type="module">
import {main} from "./src/main.js";
main(document.body);
</script>
<noscript>
<h1>Please enable javascript</h1>
<p>Matrix.to is a preview service from chat rooms, people and communities on <a href="https://matrix.org">Matrix</a>.</p>
Expand Down
23 changes: 12 additions & 11 deletions scripts/serve-local.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,26 @@ const projectDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".

// Serve up parent directory with cache disabled
const serve = serveStatic(
projectDir,
{
etag: false,
setHeaders: res => {
res.setHeader("Pragma", "no-cache");
res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
res.setHeader("Expires", "Wed, 21 Oct 2015 07:28:00 GMT");
projectDir,
{
etag: false,
setHeaders: res => {
res.setHeader("Pragma", "no-cache");
res.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
res.setHeader("Expires", "Wed, 21 Oct 2015 07:28:00 GMT");
// same CSP as matrix.to server is using, so local testing happens under similar environment
res.setHeader("Content-Security-Policy", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src * data:; connect-src *; font-src 'self'; manifest-src 'self'; form-action 'self'; navigate-to *;");
},
index: ['index.html', 'index.htm']
}
},
index: ['index.html', 'index.htm']
}
);

// Create server
const server = http.createServer(function onRequest (req, res) {
console.log(req.method, req.url);
serve(req, res, finalhandler(req, res))
serve(req, res, finalhandler(req, res))
});

// Listen
server.listen(5000);
console.log("Listening on port 5000");
Loading

0 comments on commit c25a9da

Please sign in to comment.