From 7f4c53756442f737e2a1584d1f81f54abc33b6c7 Mon Sep 17 00:00:00 2001 From: elukjanovica Date: Sat, 20 Apr 2024 17:00:24 +0300 Subject: [PATCH] --- static/css/main.css | 70 ++++++++++++++++++++++++++++++++++++++++++-- templates/base.html | 2 +- templates/index.html | 8 ++--- templates/posts.html | 2 +- 4 files changed, 74 insertions(+), 8 deletions(-) diff --git a/static/css/main.css b/static/css/main.css index 9a9ed41..638c774 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -170,7 +170,7 @@ h2 { .featured-post, .latest-post { - padding: 20px 40px; + padding: 20px 35px; box-sizing: border-box; margin-bottom: 20px; text-align: center; @@ -193,6 +193,8 @@ h2 { .featured-post img, .latest-post img { + width: 500px; + height: 350px; margin-bottom: 10px; flex-shrink: 0; border-radius: 6px; @@ -291,6 +293,7 @@ input#password, input#username, textarea:hover { box-shadow: rgba(45, 35, 66, 0.4) 0 4px 8px, rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #D6D6E7 0 -3px 0 inset; transform: translateY(-2px); + min-width: 250px; } /* Button */ @@ -425,4 +428,67 @@ i.far.fa-comment { .gif-container:hover .tooltiptext { visibility: visible; opacity: 1; -} \ No newline at end of file +} + +.center { + text-align: center; +} + +/* Mobile-specific */ +@media only screen and (max-width: 767px) { + /* Navbar */ + nav { + padding: 0.7rem 0.5rem; + } + + nav li a, nav a.link { + padding: 0.1rem; + } + + .dropdown-content { + padding: 5px; + } + + nav ul li a { + font-size: 16px; + } + + nav ul li { + margin-right: 0.4rem; + } + + nav img { + max-width: 50px; + max-height: 50px; + } + + nav ul { + margin-right: 0.5rem; + } + + .logo { + min-width: 140px; + } + + /* Content */ + .content { + padding: 20px; + } + + /* Posts */ + .post { + padding: 15px; + } + + /* Featured and latest posts */ + .featured-post, + .latest-post { + padding: 20px; + } + + .featured-post img, + .latest-post img { + width: 100%; + height: auto; + } +} diff --git a/templates/base.html b/templates/base.html index 4c83c48..fff1e4e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -11,7 +11,7 @@