Skip to content

Commit

Permalink
Implement responsive content page (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkumiszhan authored Nov 15, 2023
1 parent 2c5b454 commit d9d47b2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
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

0 comments on commit d9d47b2

Please sign in to comment.