Skip to content

Commit d609222

Browse files
koray-erenJeff
authored andcommitted
rejigged mobile sizing and breakpoints
1 parent 8736649 commit d609222

File tree

2 files changed

+24
-12
lines changed

2 files changed

+24
-12
lines changed

sogs/templates/base.html

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<html id="html" class="">
22
<head>
33
<title> sogs </title>
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
45
<link rel="stylesheet" href="{{ url_for('static', filename='main.css') }}">
56
<script src="https://cdn.tailwindcss.com"></script>
67
<script>
@@ -35,25 +36,34 @@
3536
lightGray: '#585858',
3637
otherGray: '#272726'
3738
}
39+
},
40+
screens : {
41+
'xs' : '365px',
42+
'sm' : '640px',
43+
'md' : '768px',
44+
'lg' : '1024px',
45+
'xl' : '1280px',
46+
'2xl' : '1536px'
3847
}
3948
}
4049
}
4150
</script>
4251
</head>
4352
<body class="dark:bg-otherGray transition duration-500">
4453
<!-- header / navbar -->
45-
<div class="px-5 flex justify-between items-center w-full h-32 mb-10 bg-sessionGreen dark:bg-otherGray border-b-8 border-black dark:border-sessionGreen transition duration-500">
54+
<div class="px-5 flex justify-between items-center w-full h-32 mb-4
55+
bg-sessionGreen dark:bg-otherGray border-b-8 border-black dark:border-sessionGreen transition duration-500">
4656
<div class="text-black dark:text-white text-center">
47-
<h1 class="text-7xl ">{% block heading %}{% endblock %}</h1>
48-
<p class="text-2xl ">Session Open Group Server</p>
57+
<h1 class="text-3xl xs:text-4xl sm:text-5xl">{% block heading %}{% endblock %}</h1>
58+
<p class="text-lg xs:text-xl sm:text-2xl">Session Open Group Server</p>
4959
</div>
50-
<button class='h-8 px-4 bg-black text-white rounded-full space-x-3' onclick="toggleDarkMode()">Toggle Dark Mode</button>
60+
<button class='h-12 px-1 bg-black text-white rounded' onclick="toggleDarkMode()">Dark<br>Mode</button>
5161
</div>
5262

5363
<!-- content/body -->
5464
<section class="text-black dark:text-white">
5565
{% block body %}
5666
{% endblock %}
57-
</section>
67+
</section>
5868
</body>
5969
</html>

sogs/templates/index.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66

77
{% block body %}
88

9-
<div class="grid grid-cols-2 lg:grid-cols-4 2xl:grid-cols-6 justify-items-center gap-y-5 gap-x-7 px-5 mx-16">
9+
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-6 justify-items-center gap-y-2 gap-x-2 mx-4">
1010
{% for room in rooms %}
11-
<a class="px-5 flex flex-col justify-center items-center transition duration-500 text-center
12-
w-full h-36 md:h-28 bg-sessionGreen hover:bg-black hover:text-white text-6xl lg:text-4xl border-8 border-black
13-
dark:border-sessionGreen rounded-full dark:bg-black dark:hover:bg-sessionGreen dark:hover:text-black " href="/r/{{room.token}}">
14-
<p>{{room.token }}</p>
15-
<p class="text-3xl lg:text-xl">{{room.active_users() }} Active User{{'s' if room.active_users() > 1}}</p>
16-
</a>
11+
{% for i in range(8) %}
12+
<a class="px-5 flex flex-col justify-center items-center transition duration-500 text-center w-full h-24
13+
border-8 border-black bg-sessionGreen hover:bg-black hover:text-white md:h-28
14+
dark:border-sessionGreen rounded-full dark:bg-black dark:hover:bg-sessionGreen dark:hover:text-black " href="/r/{{room.token}}">
15+
<p class="text-2xl xs:text-3xl sm:text-4xl">{{room.token }}</p>
16+
<p class="text-sm xs:text-lg sm:text-xl">{{room.active_users() }} Active User{{'s' if room.active_users() > 1}}</p>
17+
</a>
18+
{% endfor %}
1719
{% endfor %}
1820
</div>
1921

0 commit comments

Comments
 (0)