New responsive UI for mobile devices
This commit is contained in:
parent
ed03be8bde
commit
e9ae13e69c
3 changed files with 230 additions and 27 deletions
|
|
@ -21,6 +21,7 @@ Now uses Astro instead of the old static website !
|
|||
- `components/`
|
||||
- `layouts/`
|
||||
- `pages/`
|
||||
- `scripts/`
|
||||
- `data/` - Contains the configs to generate the website, each as a JSON file (contains cards, site name, etc.)
|
||||
- `styles` - default CSS style sheets and custom themes
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
import "../styles/common.css";
|
||||
import data from "../data/op-public.json";
|
||||
import "../styles/mobile.css";
|
||||
import data from "../data/content.json";
|
||||
const { cards, website_title, website_logo } = data;
|
||||
---
|
||||
|
||||
|
|
@ -19,31 +20,28 @@ const { cards, website_title, website_logo } = data;
|
|||
<body>
|
||||
<div class="halo"></div>
|
||||
|
||||
<a href="https://status.oblic-parallels.fr"
|
||||
><img class="logo" src={website_logo} /></a
|
||||
></body
|
||||
>
|
||||
|
||||
<div>
|
||||
<!--Titles-->
|
||||
<div>
|
||||
<h2>Welcome to</h2>
|
||||
</div>
|
||||
<div>
|
||||
<h1>Oblic Parallels</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-container">
|
||||
<!-- Cards -->
|
||||
{
|
||||
cards.map((card) => (
|
||||
<a class="card" href={card.link}>
|
||||
<img src={card.icon} />
|
||||
<div class="card-title">{card.title}</div>
|
||||
<div class="card-desc">{card.description}</div>
|
||||
<header class="site-header">
|
||||
<div class="header-row">
|
||||
<a href="https://status.oblic-parallels.fr">
|
||||
<img class="logo" src={website_logo} />
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
<h1 class="site-title">{website_title}</h1>
|
||||
</div>
|
||||
<div class="welcome-title">
|
||||
<h2>Welcome to</h2>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="card-container">
|
||||
{
|
||||
cards.map((card) => (
|
||||
<a class="card" href={card.link}>
|
||||
<img src={card.icon} />
|
||||
<div class="card-title">{card.title}</div>
|
||||
<div class="card-desc">{card.description}</div>
|
||||
</a>
|
||||
))
|
||||
}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
204
src/styles/mobile.css
Normal file
204
src/styles/mobile.css
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
/*-Imports----------------------------------------------------------*/
|
||||
/*@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");*/
|
||||
|
||||
/*-Phone Screen Styles---------------------------------------------*/
|
||||
|
||||
@media (max-width: 600px) {
|
||||
/*-Page----------------------------------------------------------*/
|
||||
|
||||
html,
|
||||
body {
|
||||
width: 100vw;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: "Inter";
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.halo {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/*-Header--------------------------------------------------------*/
|
||||
|
||||
.site-header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 20;
|
||||
|
||||
width: 100vw;
|
||||
height: 5.5rem;
|
||||
|
||||
background: transparent;
|
||||
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.header-row {
|
||||
position: relative;
|
||||
|
||||
width: 100vw;
|
||||
height: 5.5rem;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: absolute;
|
||||
top: 1.3rem;
|
||||
left: 1.3rem;
|
||||
z-index: 2;
|
||||
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
display: block;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.site-title {
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
|
||||
margin: 0;
|
||||
|
||||
flex: 0 1 auto;
|
||||
|
||||
font-size: 2.2em;
|
||||
font-family: "Inter";
|
||||
font-weight: 600;
|
||||
color: #eaeaea;
|
||||
text-align: center;
|
||||
letter-spacing: 0.1rem;
|
||||
line-height: 1;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.welcome-title {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*-Texts---------------------------------------------------------*/
|
||||
|
||||
h1,
|
||||
h2 {
|
||||
position: static;
|
||||
transform: none;
|
||||
z-index: 1;
|
||||
|
||||
margin-top: 2.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
font-size: 2.2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.3em;
|
||||
margin-top: 1.2rem;
|
||||
}
|
||||
|
||||
/*-Cards---------------------------------------------------------*/
|
||||
|
||||
.card-container {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 5.5rem;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
width: 100vw;
|
||||
min-height: 0;
|
||||
height: calc(100vh - 5.5rem);
|
||||
|
||||
margin: 0;
|
||||
padding: 10rem 1rem 1rem 1rem;
|
||||
|
||||
gap: 1rem;
|
||||
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: relative;
|
||||
width: 90vw;
|
||||
max-width: 420px;
|
||||
height: auto;
|
||||
min-height: 14rem;
|
||||
|
||||
margin: 1rem 0;
|
||||
padding: 1.2rem 1rem;
|
||||
|
||||
background-color: #121212;
|
||||
box-sizing: border-box;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.card::after {
|
||||
border-radius: 1.2em;
|
||||
filter: drop-shadow(#00000080 0 1em 20px);
|
||||
}
|
||||
|
||||
.card > img {
|
||||
position: static;
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
|
||||
margin-bottom: 0.8em;
|
||||
margin-right: 0;
|
||||
margin-top: 0.2em;
|
||||
|
||||
flex-shrink: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card-title {
|
||||
position: static;
|
||||
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 0.2em;
|
||||
margin-left: 0;
|
||||
|
||||
font-size: 1.7em;
|
||||
font-weight: 600;
|
||||
color: #eaeaea;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card-desc {
|
||||
position: static;
|
||||
width: 100%;
|
||||
|
||||
margin-top: 1em;
|
||||
margin-left: 0;
|
||||
|
||||
font-size: 1em;
|
||||
color: #eaeaea;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue