From 4e25454507da78442c84984f656491a203437e7c Mon Sep 17 00:00:00 2001 From: marko Date: Tue, 15 Jul 2025 11:04:38 +0200 Subject: [PATCH] responsive font sizes for cards, fixed ratio card-content to card-image, minor fixes --- homepage/cwsvJudo/docker-compose.yaml | 16 +++---- .../cwsvJudo/src/css/materialize/card.css | 43 +++++++++++++++++-- .../cwsvJudo/src/css/materialize/promo.css | 2 +- .../cwsvJudo/src/pages/responsive/index.php | 2 +- 4 files changed, 50 insertions(+), 13 deletions(-) diff --git a/homepage/cwsvJudo/docker-compose.yaml b/homepage/cwsvJudo/docker-compose.yaml index 9a732a0..9e7454b 100644 --- a/homepage/cwsvJudo/docker-compose.yaml +++ b/homepage/cwsvJudo/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '3.3' +version: "3.3" services: web: # check the php version you need for your project @@ -7,7 +7,7 @@ services: context: . dockerfile: PHP.dockerfile ports: - # this line maps your pc port to the container port + # this line maps your pc port to the container port - "8080:80" depends_on: # this line links this container to the db container @@ -22,11 +22,11 @@ services: image: mariadb:latest restart: always environment: - MYSQL_USER: "cwsvjudo_marko" - MYSQL_DATABASE: "cwsvjudo_main" - MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password - MYSQL_PASSWORD_FILE: /run/secrets/db_password - MYSQL_TCP_PORT: 3306 + MARIADB_USER: "cwsvjudo_marko" + MARIADB_DATABASE: "cwsvjudo_main" + MARIADB_ROOT_PASSWORD_FILE: /run/secrets/db_root_password + MARIADB_PASSWORD_FILE: /run/secrets/db_password + MARIADB_TCP_PORT: "3306" volumes: # this line maps the content of ./mysql_data in your pc to the /var/lib/mysql of the container - mysqldata:/var/lib/mysql @@ -55,4 +55,4 @@ secrets: db_root_password: file: db_root_password.txt db_password: - file: db_password.txt \ No newline at end of file + file: db_password.txt diff --git a/homepage/cwsvJudo/src/css/materialize/card.css b/homepage/cwsvJudo/src/css/materialize/card.css index 549fa99..69a5d6e 100644 --- a/homepage/cwsvJudo/src/css/materialize/card.css +++ b/homepage/cwsvJudo/src/css/materialize/card.css @@ -1,9 +1,46 @@ -.card.horizontal .card-image { - /* width: 38%; */ +.card.horizontal>.card-image { + width: 38.2%; +} +.card.horizontal>.card-content { + width: 61.2%; + hyphens: auto; } -.card.horizontal .card-image img { +.card.horizontal>.card-image>img { width: 100%; height: 100%; object-fit: cover; } + +/* responsive font sizes */ + +.card-content{ + font-size: 3cqw; +} + +@media only screen and (min-width: 600px) { +.card-content { + font-size: 2cqw; + } +} + +@media only screen and (min-width: 992px) { +.card-content { + font-size: 1.5cqw; + } +} + +@media only screen and (min-width: 1200px) { +.card-content { + font-size: 1.25cqw; + } +} + +.card .card-title { + font-size: 1.618em; +} + +.card time { + font-size: 0.618em; +} + diff --git a/homepage/cwsvJudo/src/css/materialize/promo.css b/homepage/cwsvJudo/src/css/materialize/promo.css index fb9d59b..ef3d4fd 100644 --- a/homepage/cwsvJudo/src/css/materialize/promo.css +++ b/homepage/cwsvJudo/src/css/materialize/promo.css @@ -2,5 +2,5 @@ width: 100%; } .promo>i { - font-size: 7rem; + font-size: 4rem; } diff --git a/homepage/cwsvJudo/src/pages/responsive/index.php b/homepage/cwsvJudo/src/pages/responsive/index.php index b82ed31..8043c3e 100644 --- a/homepage/cwsvJudo/src/pages/responsive/index.php +++ b/homepage/cwsvJudo/src/pages/responsive/index.php @@ -165,7 +165,7 @@ function main($sections, $wallpapers)
-