From c2257739ef6cd972a70b1343377b0cb198b4f58b Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 8 Mar 2022 11:35:39 +0400 Subject: [PATCH] fix style --- .gitignore | 1 + src/main/java/ru/ulstu/model/News.java | 2 +- src/main/resources/public/css/main.css | 17 +++++++++++- src/main/resources/templates/default.html | 34 +++++++++++------------ src/main/resources/templates/index.html | 14 ++++++++-- 5 files changed, 46 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index 9f75cfa..4b55194 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .idea .idea/* .gradle +out build # Log file diff --git a/src/main/java/ru/ulstu/model/News.java b/src/main/java/ru/ulstu/model/News.java index e71af80..57f7130 100644 --- a/src/main/java/ru/ulstu/model/News.java +++ b/src/main/java/ru/ulstu/model/News.java @@ -3,7 +3,7 @@ package ru.ulstu.model; import java.util.Date; public class News { - private final static int MAX_NEWS_TEXT_PREVIEW_LENGTH = 100; + private final static int MAX_NEWS_TEXT_PREVIEW_LENGTH = 200; private final String title; private final Date date; private final String text; diff --git a/src/main/resources/public/css/main.css b/src/main/resources/public/css/main.css index 820444d..2e4d9cf 100644 --- a/src/main/resources/public/css/main.css +++ b/src/main/resources/public/css/main.css @@ -1,11 +1,26 @@ +@media (min-width: 1200px) { + .container { + max-width: 970px; + } +} + .news { margin-bottom: 50px; } .news-item { - margin: 10px; + margin: 20px; + position: relative; + text-align: justify; } .news-date { font-size: 10px; + position: absolute; + bottom: 0; + right: 25px; +} + +.news-image { + width: 300px; } \ No newline at end of file diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index f51def2..ab97906 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -10,7 +10,7 @@ app-name - + @@ -20,31 +20,31 @@ - +
-