Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement responsive content component #101

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/components/Config.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

<style>
.config {
margin: 10px auto;
margin: 10px 20px;
}
</style>
10 changes: 6 additions & 4 deletions frontend/components/Content.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
export let isShared: boolean;

function render(payload: string) {
const result = hexy(atob(payload), { width: 16 });
const result = hexy(atob(payload), { width: 8 });
const resultLines = result.split('\n');
let addressStr = '';
let hexStr = '';
let plainStr = '';
resultLines.forEach((item, idx) => {
if (item) {
addressStr += (idx > 0 ? '\n' : '') + item.substring(0, item.indexOf(':'));
hexStr += (idx > 0 ? '\n' : '') + item.substring(item.indexOf(':') + 2, 51);
plainStr += (idx > 0 ? '\n' : '') + item.substring(51);
hexStr += (idx > 0 ? '\n' : '') + item.substring(item.indexOf(':') + 2, 31);
plainStr += (idx > 0 ? '\n' : '') + item.substring(31);
}
});
return [
Expand Down Expand Up @@ -196,7 +196,7 @@
display: flex;
justify-content: flex-start;
gap: 20px;
min-width: 535px;
min-width: 355px;
font-family: monospace;
padding-top: 15px;
padding-bottom: 15px;
Expand All @@ -214,6 +214,8 @@
unicode-bidi: embed;
font-family: monospace;
white-space: pre;
text-wrap: wrap;
padding-top: 20px;
word-break: break-all;
}
</style>
2 changes: 2 additions & 0 deletions frontend/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
border-bottom-style: solid;
padding-bottom: 10px;
border-width: 1px;
margin-right: 20px;
margin-left: 20px;
}

.header__link {
Expand Down
2 changes: 0 additions & 2 deletions frontend/components/MessageList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@
.column {
flex: 50%;
padding: 15px 20px;
min-width: 300px;
}

#message-log {
width: 100%;
flex-grow: 1;
overflow-y: scroll;
}
Expand Down
6 changes: 6 additions & 0 deletions frontend/pages/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,10 @@
bottom: 0;
right: 0;
}

@media (width < 710px) {
.row {
flex-direction: column;
}
}
</style>
1 change: 0 additions & 1 deletion public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ body {
color: #333;
margin: 0;
box-sizing: border-box;
padding: 8px;;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

Expand Down