Skip to content

Commit ab9ad54

Browse files
danieldietrichroboquat
authored andcommitted
Use a TailwindCSS managed class to centralize layout styling and to reduce redundant code
1 parent e7c93eb commit ab9ad54

File tree

13 files changed

+18
-15
lines changed

13 files changed

+18
-15
lines changed

components/dashboard/src/FromReferrer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function FromReferrer() {
1818
return <></>;
1919
}
2020

21-
return <div className="lg:px-28 px-10 flex flex-col space-y-2">
21+
return <div className="app-container flex flex-col space-y-2">
2222
<div className="px-6 py-3 flex justify-between space-x-2 text-gray-400 h-96">
2323
<div className="flex flex-col items-center w-96 m-auto mt-40">
2424
<h3 className="text-center pb-3 text-gray-500 dark:text-gray-400">No Referrer Found</h3>

components/dashboard/src/Menu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export default function Menu() {
244244
}
245245

246246
return <>
247-
<header className={`lg:px-28 px-10 flex flex-col pt-4 space-y-4 ${isMinimalUI || !!prebuildId ? 'pb-4' : ''}`} data-analytics='{"button_type":"menu"}'>
247+
<header className={`app-container flex flex-col pt-4 space-y-4 ${isMinimalUI || !!prebuildId ? 'pb-4' : ''}`} data-analytics='{"button_type":"menu"}'>
248248
<div className="flex h-10">
249249
<div className="flex justify-between items-center pr-3">
250250
<Link to={gitpodIconUrl()}>

components/dashboard/src/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function Header(p: HeaderProps) {
1919
}
2020
document.title = `${p.title} — Gitpod`;
2121
}, []);
22-
return <div className="lg:px-28 px-10 border-gray-200 dark:border-gray-800">
22+
return <div className="app-container border-gray-200 dark:border-gray-800">
2323
<div className="flex pb-8 pt-6">
2424
<div className="">
2525
{typeof p.title === "string" ? (<h1 className="tracking-tight">{p.title}</h1>) : p.title}

components/dashboard/src/components/PageWithSubMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function PageWithSubMenu(p: PageWithSubMenuProps) {
2222
const location = useLocation();
2323
return <div className="w-full">
2424
<Header title={p.title} subtitle={p.subtitle} />
25-
<div className='lg:px-28 px-10 flex pt-9'>
25+
<div className='app-container flex pt-9'>
2626
<div>
2727
<ul className="flex flex-col text tracking-wide text-gray-500 pt-4 lg:pt-0 w-48 space-y-2">
2828
{p.subMenu.map(e => {

components/dashboard/src/index.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
@apply text-sm text-gray-400 dark:text-gray-600;
3434
}
3535

36+
.app-container {
37+
@apply lg:px-28 px-10;
38+
}
3639
.btn-login {
3740
@apply rounded-md border-none bg-gray-100 hover:bg-gray-200 text-gray-500 dark:text-gray-200 dark:bg-gray-800 dark:hover:bg-gray-600;
3841
}

components/dashboard/src/prebuilds/InstallGitHubApp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function InstallGitHubApp() {
4848
const params = new URLSearchParams(location.search);
4949
const installationId = params.get("installation_id") || undefined;
5050
if (!installationId) {
51-
return <div className="lg:px-28 px-10 flex flex-col space-y-2">
51+
return <div className="app-container flex flex-col space-y-2">
5252
<div className="px-6 py-3 flex justify-between space-x-2 text-gray-400 border-t border-gray-200 dark:border-gray-800 h-96">
5353
<div className="flex flex-col items-center w-96 m-auto">
5454
<h3 className="text-center pb-3 text-gray-500 dark:text-gray-400">No Installation ID Found</h3>
@@ -61,7 +61,7 @@ export default function InstallGitHubApp() {
6161
const goToApp = () => window.location.href = gitpodHostUrl.toString();
6262

6363
return <>
64-
<div className="lg:px-28 px-10 flex flex-col space-y-2">
64+
<div className="app-container flex flex-col space-y-2">
6565
<div className="px-6 py-3 flex justify-between space-x-2 text-gray-400">
6666
<div className="flex flex-col items-center m-auto max-w-lg mt-40">
6767
<h3 className="text-center pb-3 text-gray-500">Install GitHub App</h3>

components/dashboard/src/projects/ConfigureProject.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export default function () {
211211

212212
return <>
213213
<Header title="Configuration" subtitle="View and edit project configuration." />
214-
<div className="lg:px-28 px-10 mt-8 flex space-x-4">
214+
<div className="app-container mt-8 flex space-x-4">
215215
<div className="flex-1 h-96 rounded-xl overflow-hidden relative flex flex-col">
216216
<div className="flex bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-600 px-6 pt-3">
217217
<TabMenuItem name=".gitpod.yml" selected={selectedEditor === '.gitpod.yml'} onClick={() => setSelectedEditor('.gitpod.yml')} />

components/dashboard/src/projects/Prebuild.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export default function () {
114114

115115
return <>
116116
<Header title={renderTitle()} subtitle={renderSubtitle()} />
117-
<div className="lg:px-28 px-10 mt-8">
117+
<div className="app-container mt-8">
118118
<div className="rounded-xl overflow-hidden bg-gray-100 dark:bg-gray-800 flex flex-col">
119119
<div className="h-96 flex">
120120
<PrebuildLogs workspaceId={prebuild?.info?.buildWorkspaceId} onInstanceUpdate={onInstanceUpdate} />

components/dashboard/src/projects/Prebuilds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ export default function () {
151151

152152
return <>
153153
<Header title="Prebuilds" subtitle={`View recent prebuilds for active branches.`} />
154-
<div className="lg:px-28 px-10">
154+
<div className="app-container">
155155
<div className="flex mt-8">
156156
<div className="flex">
157157
<div className="py-4">

components/dashboard/src/projects/Project.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export default function () {
173173

174174
return <>
175175
<Header title="Branches" subtitle={<h2 className="tracking-wide">View recent active branches for <a className="gp-link" href={project?.cloneUrl!}>{toRemoteURL(project?.cloneUrl || '')}</a>.</h2>} />
176-
<div className="lg:px-28 px-10">
176+
<div className="app-container">
177177
{showAuthBanner ? (
178178
<div className="mt-8 rounded-xl text-gray-500 bg-gray-50 dark:bg-gray-800 flex-col">
179179
<div className="p-8 text-center">

components/dashboard/src/projects/Projects.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export default function () {
100100

101101
)}
102102
{projects.length > 0 && (
103-
<div className="lg:px-28 px-10">
103+
<div className="app-container">
104104
<div className="mt-8 pb-2 flex border-b border-gray-200 dark:border-gray-800">
105105
<div className="flex">
106106
<div className="py-4">

components/dashboard/src/teams/Members.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export default function() {
111111

112112
return <>
113113
<Header title="Members" subtitle="Manage team members." />
114-
<div className="lg:px-28 px-10">
114+
<div className="app-container">
115115
<div className="flex mt-8">
116116
<div className="flex">
117117
<div className="py-4">

components/dashboard/src/workspaces/Workspaces.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export default function () {
143143
{workspaceModel?.initialized && (
144144
activeWorkspaces.length > 0 || inactiveWorkspaces.length > 0 || workspaceModel.searchTerm ?
145145
<>
146-
<div className="lg:px-28 px-10 py-2 flex">
146+
<div className="app-container py-2 flex">
147147
<div className="flex">
148148
<div className="py-4">
149149
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16" width="16" height="16"><path fill="#A8A29E" d="M6 2a4 4 0 100 8 4 4 0 000-8zM0 6a6 6 0 1110.89 3.477l4.817 4.816a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 010 6z" /></svg>
@@ -167,7 +167,7 @@ export default function () {
167167
</div>
168168
<button onClick={showStartWSModal} className="ml-2">New Workspace</button>
169169
</div>
170-
<ItemsList className="lg:px-28 px-10">
170+
<ItemsList className="app-container">
171171
<div className="border-t border-gray-200 dark:border-gray-800"></div>
172172
{
173173
teamsWorkspaceModel?.initialized && <ActiveTeamWorkspaces teams={teams} teamProjects={teamsProjects} teamWorkspaces={teamsActiveWorkspaces} />
@@ -191,7 +191,7 @@ export default function () {
191191
</ItemsList>
192192
</>
193193
:
194-
<div className="lg:px-28 px-10 flex flex-col space-y-2">
194+
<div className="app-container flex flex-col space-y-2">
195195
<div className="px-6 py-3 flex flex-col text-gray-400 border-t border-gray-200 dark:border-gray-800">
196196
{teamsWorkspaceModel?.initialized && <ActiveTeamWorkspaces teams={teams} teamProjects={teamsProjects} teamWorkspaces={teamsActiveWorkspaces} />}
197197
<div className="flex flex-col items-center justify-center h-96 w-96 mx-auto">

0 commit comments

Comments
 (0)