Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Tailwind classes to normal CSS #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
168 changes: 102 additions & 66 deletions components/lib/buildInfoBanner.vue
Original file line number Diff line number Diff line change
@@ -1,34 +1,49 @@
<template>
<div v-if="!this.bannerClosed">
<div class="banner">
<div class="main-container">
<div class="row-container">
<span>🔨</span>
<p>
<span class="font-bold">Build</span>:
<a
:href="$config.DRONE_BUILD_LINK"
target="_blank"
rel="noopener noreferrer"
>
#{{ $config.DRONE_BUILD_NUMBER }}
</a>
<a
:href="$config.DRONE_COMMIT_LINK"
target="_blank"
rel="noopener noreferrer"
>
({{ $config.DRONE_COMMIT_SHA && $config.DRONE_COMMIT_SHA.slice(0, 6) }})
</a>
</p>
</div>
<div class="row-container">
<span>🚧</span>
<p> <span class="font-bold"> Environment: </span> {{ $config.TARGET_ENV }} </p>
<button class="bannerBtn" v-on:click="closeBanner">
&#215;
</button>
</div>
<div v-if="!this.bannerClosed" class="banner">
<div class="banner-container">
<div>
<span>🔨</span>
<p>
<span class="font-bold">Build</span>:
<a
:href="$config.DRONE_BUILD_LINK"
target="_blank"
rel="noopener noreferrer"
>
#{{ $config.DRONE_BUILD_NUMBER }}
</a>
<a
:href="$config.DRONE_COMMIT_LINK"
target="_blank"
rel="noopener noreferrer"
>
({{ $config.DRONE_COMMIT_SHA && $config.DRONE_COMMIT_SHA.slice(0, 6) }})
</a>
</p>
</div>
<div>
<span>🚧</span>
<p>
<span class="font-bold"> Environment: </span>
{{ $config.TARGET_ENV }}
</p>
<button
class="banner-btn"
v-on:click="closeBanner"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="32"
height="32"
viewBox="0 0 24 24"
class="close-icon"
>
<path
fill="white"
d="M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6L6.4 19Z"
/>
</svg>
</button>
</div>
</div>
<div class="hidden-whitespace"></div>
Expand All @@ -50,56 +65,77 @@ export default {
}
</script>
<style scoped>

.main-container,
.row-container,
.banner {
display: flex;
align-items: center;
* {
font-family: 'IBM Plex Sans';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to reflect the changes from issue #4 here as well

font-size: 18px;
direction: ltr;
}
.banner p,
.banner a {
color: white;
text-decoration: none;
}
.banner-btn {
background: none;
border: none;
}
.banner-btn .close-icon:hover {
background-color: #00718a;
border-radius: 8px;
}
.font-bold {
font-weight: 700;
}

.banner {
direction: ltr;
justify-content: space-between;
background-color: #019ec3;
width: 100%;
height: 36px;
z-index: 10;
position: fixed;
top:0;
height: 40px;
z-index: 20;
display: flex;
}

.banner p,
.banner a,
.banner button {
color: white;
.banner-container > div {
display: flex;
align-items: center;
column-gap: 1rem;
}

.main-container {
/* Banner container */
.banner .banner-container {
display: flex;
align-items: center;
justify-content: space-between;
margin:0 auto;
height: inherit;
padding: 0 40px;
width: 100%;
margin-right: auto;
margin-left: auto;
padding-right: 1.25rem/* 20px */;
padding-left: 1.25rem/* 20px */;
}

.row-container {
column-gap: 0.5rem;
@media (min-width: 640px) {
.banner .banner-container {
max-width: 640px;
}
}

.bannerBtn {
font-size: 2rem;
font-weight: bold;
@media (min-width: 768px) {
.banner .banner-container {
max-width: 768px;
}
}
.hidden-whitespace {
height: 36px;
@media (min-width: 1024px) {
.banner .banner-container {
max-width: 1024px;
padding-right: 2.5rem/* 40px */;
padding-left: 2.5rem/* 40px */;
}
}

@media (max-width: 540px) {
.main-container {
padding: 0 5px;
font-size: 0.7rem;
@media (min-width: 1280px) {
.banner .banner-container {
max-width: 1280px;
}
}
@media (min-width: 1536px) {
.banner .banner-container {
max-width: 1536px;
}
}

</style>
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.