Skip to content

Commit

Permalink
Example of the social view can be displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgueriaud1 committed Mar 28, 2024
1 parent 2259b03 commit 59ac40f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 13 deletions.
13 changes: 13 additions & 0 deletions frontend/themes/apus/masonry.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.masonry {
--masonry-gap: var(--lumo-space-m);
--masonry-brick-width: 180px;
column-gap: var(--masonry-gap);
column-fill: initial;
column-width: var(--masonry-brick-width);
}
.masonry > * {
/* Sometimes elements get stuck between columns. */
break-inside: avoid;
/* add gap at bottom */
margin-bottom: var(--masonry-gap)
}
2 changes: 2 additions & 0 deletions frontend/themes/apus/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

@import url('./masonry.css');

:root {
background-color: #000000;
}
Expand Down
10 changes: 4 additions & 6 deletions frontend/themes/apus/views/message-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@

.message-view {
background-color: #84ddee;
border-radius: 5px;
display: inline-block;
width: 580px;
margin-left: 10px;
margin-bottom: 10px;
padding: 10px;
border-radius: var(--lumo-border-radius-s);
padding: var(--lumo-space-m);
}
.masonry .message-view {

}
.message-view img {
max-height: 200px;
max-width: 100%;
Expand Down
5 changes: 3 additions & 2 deletions frontend/themes/apus/views/social-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
position: absolute;
top: 0;
left: 1300px;
width: 620px;
height: 1080px;
width: 600px;
height: 1060px;
overflow: clip;
padding: 10px;
}

#social-view h2 {
Expand Down
8 changes: 3 additions & 5 deletions frontend/themes/apus/views/social-wall-view.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
*/

#social-wall-view {
position: absolute;
top: 0;
left: 0;
width: 1920px;
height: 1080px;
height:100vh;
width:100vw;
display: flex;
}
1 change: 1 addition & 0 deletions src/main/java/swiss/fihlon/apus/ui/view/SocialView.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public SocialView(@NotNull final SocialService socialService,
setId("social-view");
add(new H2("#JavaLand on Mastodon"));
add(messageContainer);
messageContainer.addClassName("masonry");
updateMessages();
final ScheduledFuture<?> updateScheduler = taskScheduler.scheduleAtFixedRate(this::updateScheduler, UPDATE_FREQUENCY);
addDetachListener(event -> updateScheduler.cancel(true));
Expand Down

0 comments on commit 59ac40f

Please sign in to comment.