[websites/plasma-mobile-org] /: Overhaul frontpage hero
Devin Lin <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 163e59d98632bd5dfa05b78dc8b60eddbef9b926 by Devin Lin.
Committed on 23/07/2026 at 03:06.
Pushed by devinlin into branch 'master'.
Overhaul frontpage hero
M +240 -52 assets/scss/index.scss
M +5 -2 config.yaml
M +3 -2 i18n/en.yaml
M +34 -9 layouts/index.html
A +- -- static/img/plasma-home.png
https://invent.kde.org/websites/plasma-mobile-org/-/commit/163e59d98632bd5dfa05b78dc8b60eddbef9b926
diff --git a/assets/scss/index.scss b/assets/scss/index.scss
index 0b47d33b..02e04f2d 100644
--- a/assets/scss/index.scss
+++ b/assets/scss/index.scss
@@ -8,73 +8,261 @@ body {
overflow-x: hidden;
}
-section.home {
- background: radial-gradient(circle,#c203c5 0%,#4e02a7 80%);
- background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),url(https://kde.org/reusable-assets/home-blur.jpg);
+.pm-home {
+ font-family: "InterVariable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
- // curve background image
+ h1,
+ h2,
+ p {
+ margin-top: 0;
+ }
+
+ h1,
+ h2 {
+ color: inherit;
+ font-family: inherit;
+ }
+
+ a {
+ text-decoration: none;
+ }
+}
+
+.pm-container {
+ margin: 0 auto;
+ max-width: 1160px;
+ padding-left: 28px;
+ padding-right: 28px;
+ width: 100%;
+}
+
+.pm-actions {
+ align-items: center;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 12px 26px;
+}
+
+.pm-link {
+ color: #8fd4fb;
+ font-size: .88rem;
+ font-weight: 650;
+
+ span {
+ display: inline-block;
+ margin-left: 4px;
+ transition: transform .2s ease;
+ }
+
+ &:hover {
+ color: #c6eaff;
- background-size: cover;
+ span {
+ transform: translateX(3px);
+ }
+ }
+}
+
+.pm-hero {
+ background:
+ linear-gradient(90deg, rgba(8, 22, 29, .9) 0%, rgba(8, 22, 29, .82) 48%, rgba(8, 22, 29, .58) 100%),
+ url("https://kde.org/reusable-assets/home-blur.jpg") center / cover no-repeat;
color: #fff;
- min-height: 80vh;
- //height: 80vh; // 80% of the screen height
-
- .container {
- display: flex;
- min-height: 80vh;
- //height: 80vh; // 80% of the screen height
- }
-
- .heading {
- font-size: 4rem;
- line-height: 1.3;
- color: white !important;
- margin-bottom: 40px;
- font-family: "Inter";
+ margin-top: 0 !important;
+ min-height: 610px;
+ overflow: hidden;
+}
+
+.pm-hero-layout {
+ align-items: end;
+ display: grid;
+ gap: 75px;
+ grid-template-columns: .9fr 1.1fr;
+ min-height: 610px;
+}
+
+.pm-hero-copy {
+ align-self: center;
+ max-width: 520px;
+ padding: 72px 0;
+
+ h1 {
+ color: #fff;
+ font-size: clamp(2.65rem, 4.35vw, 4.15rem);
font-weight: 700;
+ letter-spacing: -.035em;
+ line-height: 1.06;
+ margin-bottom: 22px;
}
+}
- .subheading {
- color: white !important;
- line-height: 1.5;
- font-size: 1.25rem;
- font-family: "Inter";
- opacity: 0.8;
- margin-bottom: 40px;
+.pm-lead {
+ color: rgba(255, 255, 255, .73);
+ font-size: 1rem;
+ line-height: 1.65;
+ margin-bottom: 28px;
+ max-width: 500px;
+}
+
+.pm-hero-device {
+ height: 570px;
+ position: relative;
+}
+
+.pm-phone {
+ border-radius: 16px;
+ bottom: 45px;
+ box-shadow: 0 30px 72px rgba(0, 0, 0, .22);
+ height: 480px;
+ left: calc(50% + 34px);
+ overflow: hidden;
+ position: absolute;
+ transform: translateX(-50%);
+ width: 240px;
+
+ img {
+ display: block;
+ height: 100%;
+ object-fit: cover;
+ object-position: top;
+ width: 100%;
}
+}
- @media (max-width: 1060px) {
- .heading {
- font-size: 3rem;
- line-height: 1.3;
- }
+.pm-latest {
+ --pm-latest-accent: #1271a1;
+ --pm-latest-background: #eef8fd;
+ --pm-latest-heading: #212529;
+ --pm-latest-heading-hover: #1271a1;
+ --pm-latest-meta: #5e6871;
+
+ background: var(--pm-latest-background);
+ margin-top: 0 !important;
+ padding: 28px 0;
+}
+
+.pm-latest-layout {
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+
+ h2 {
+ font-size: 1.25rem;
+ font-weight: 600;
+ margin-bottom: 0;
- .subheading {
- font-size: 1.4rem;
- font-weight: normal;
+ a {
+ color: var(--pm-latest-heading);
+
+ &:hover {
+ color: var(--pm-latest-heading-hover);
+ }
}
}
+}
- @media (max-width: 768px) {
- .container {
- flex-direction: column;
- }
+.pm-latest-label {
+ color: var(--pm-latest-accent);
+ font-size: .68rem;
+ font-weight: 700;
+ letter-spacing: .09em;
+ margin-bottom: 5px;
+ text-transform: uppercase;
+}
- .header-buttons {
- align-items: center;
- text-align: center;
- }
+.pm-latest-meta {
+ align-items: center;
+ color: var(--pm-latest-meta);
+ display: flex;
+ flex: 0 0 auto;
+ font-size: .78rem;
+ gap: 22px;
+ padding-left: 30px;
+
+ a {
+ color: var(--pm-latest-accent);
+ font-size: 1.2rem;
+ }
+}
- .heading {
- font-size: 2rem;
- line-height: 1;
- text-align: center;
- }
+@media (max-width: 980px) {
+ .pm-hero-layout {
+ gap: 35px;
+ grid-template-columns: 1fr 1fr;
+ }
- .subheading {
- font-size: 1rem;
- text-align: center;
- }
+ .pm-phone {
+ left: 50%;
+ }
+}
+
+@media (max-width: 760px) {
+ .pm-container {
+ padding-left: 22px;
+ padding-right: 22px;
+ }
+
+ .pm-hero {
+ background-position: 62% center;
+ }
+
+ .pm-hero-layout {
+ grid-template-columns: minmax(0, 1fr);
+ min-height: auto;
+ }
+
+ .pm-hero-copy {
+ padding: 65px 0 10px;
+ }
+
+ .pm-hero-device {
+ height: 440px;
+ }
+
+ .pm-phone {
+ bottom: 25px;
+ height: 360px;
+ width: 180px;
+ }
+
+ .pm-latest-layout {
+ align-items: start;
+ }
+
+ .pm-latest-meta time {
+ display: none;
+ }
+}
+
+@media (max-width: 500px) {
+ .pm-hero-copy h1 {
+ font-size: 2.65rem;
+ }
+
+ .pm-hero-device {
+ height: 410px;
+ }
+
+ .pm-latest {
+ padding: 22px 0;
+ }
+
+ .pm-latest-layout h2 {
+ font-size: 1rem;
+ }
+
+ .pm-latest-meta {
+ padding-left: 12px;
+ }
+}
+
+@media (prefers-color-scheme: dark) {
+ .pm-latest {
+ --pm-latest-accent: #73c8f8;
+ --pm-latest-background: #102b38;
+ --pm-latest-heading: #f1f4f5;
+ --pm-latest-heading-hover: #8fd4fb;
+ --pm-latest-meta: #adb8bf;
}
}
diff --git a/config.yaml b/config.yaml
index affe0fc4..0754408e 100644
--- a/config.yaml
+++ b/config.yaml
@@ -39,7 +39,7 @@ languages:
weight: 6
url: https://invent.kde.org/plasma/plasma-mobile/-/wikis/Issue-Tracking
params:
- description: Privacy-respecting, open source and secure phone ecosystem
+ description: An open-source project to create a mobile shell and application ecosystem for Linux, based on KDE Plasma.
title: Plasma Mobile
weight: 1
markup:
@@ -66,6 +66,9 @@ params:
repoName: plasma-mobile-org
rssSection: blog
permalinks:
- blog: /:year/:month/:day/:filename/
+ blog: /:year/:month/:day/:contentbasename/
rssLimit: 4
+security:
+ allowContent:
+ - ^text/(html|markdown)$
summaryLength: 30
diff --git a/i18n/en.yaml b/i18n/en.yaml
index 7b01699b..f71c191f 100644
--- a/i18n/en.yaml
+++ b/i18n/en.yaml
@@ -1,5 +1,5 @@
plasma-in-your-pocket:
- other: Plasma, in your pocket.
+ other: Plasma Mobile
openup:
other: Open up.
opensource-phone:
@@ -28,4 +28,5 @@ home.why:
other: Community Powered
home.why.description:
other: The most common offerings on mobile devices lack openness and trust. In a world of walled gardens, we want to create a platform that respects and protects the user’s privacy to the fullest, built by the community. We want to provide a fully open base which others can help develop and use for themselves, or in their products.
-
+home.latest:
+ other: Latest update
diff --git a/layouts/index.html b/layouts/index.html
index d8cb6fb3..d7babb6b 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -3,19 +3,44 @@
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ end }}
{{ define "main" }}
-<section class="home" >
- <div class="container align-items-center">
+<section class="pm-home pm-hero">
+ <div class="pm-container pm-hero-layout">
+ <div class="pm-hero-copy">
+ <h1>{{ i18n "plasma-in-your-pocket" }}</h1>
+ <p class="pm-lead">{{ .Site.Params.description }}</p>
+ <div class="pm-actions">
+ <a class="mobile-main-button" href="{{ "/get/" | relLangURL }}">
+ {{ i18n "install" }}
+ </a>
+ <a class="pm-link" href="{{ "/join/" | relLangURL }}">
+ {{ i18n "contribute" }} <span aria-hidden="true">→</span>
+ </a>
+ </div>
+ </div>
+ <div class="pm-hero-device">
+ <div class="pm-phone">
+ <img src="/img/plasma-home.png" alt="">
+ </div>
+ </div>
+ </div>
+</section>
+
+{{ with first 1 (where .Site.RegularPages.ByDate.Reverse "Section" "blog") }}
+{{ range . }}
+<section class="pm-home pm-latest">
+ <div class="pm-container pm-latest-layout">
<div>
- <h2 class="heading mt-5 mt-md-0">{{ i18n "plasma-in-your-pocket" }}</h2>
- <h3 class="subheading">{{ .Site.Params.description }}</h3>
- <p class="header-buttons">
- <a href="/get/" class="mobile-main-button">{{ i18n "install" }}</a>
- <a href="/join/" class="mobile-secondary-button">{{ i18n "contribute" }}</a>
- </p>
+ <p class="pm-latest-label">{{ i18n "home.latest" }}</p>
+ <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
+ </div>
+ <div class="pm-latest-meta">
+ <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date | time.Format ":date_long" }}</time>
+ <a href="{{ .RelPermalink }}" aria-label="{{ i18n "home.latest" }}: {{ .Title }}">→</a>
</div>
- <img src="/img/plasmaphone.png" class="" style="padding-left: 50px; padding-right: 50px; width: 600px">
</div>
</section>
+{{ end }}
+{{ end }}
<section class="openup">
<div class="container my-5">
diff --git a/static/img/plasma-home.png b/static/img/plasma-home.png
new file mode 100644
index 00000000..2f72533b
Binary files /dev/null and b/static/img/plasma-home.png differ