Skip to content

Commit

Permalink
refactor: add SCSS for better CE support
Browse files Browse the repository at this point in the history
  • Loading branch information
altrusl committed Feb 2, 2024
1 parent 3aef321 commit 04ed9b7
Show file tree
Hide file tree
Showing 15 changed files with 241 additions and 216 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "release-timeline",
"type": "module",
"version": "0.5.4",
"version": "0.5.6",
"private": false,
"source": "src/index.ts",
"author": "Ruslan Makarov",
Expand Down
Binary file removed rt.jpg
Binary file not shown.
8 changes: 4 additions & 4 deletions src/ReleaseTimeline.ce.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if (!options) {
</template>

<style lang="scss">
@import "./css/user-badge.css";
@import "./css/timeline-item.css";
@import "./css/timeline-item-issues.css";
@import "./css/release-timeline.css";
@import "./css/user-badge.scss";
@import "./css/timeline-item.scss";
@import "./css/timeline-item-issues.scss";
@import "./css/release-timeline.scss";
</style>
5 changes: 1 addition & 4 deletions src/ReleaseTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,5 @@ onMounted(async () => {
</template>

<style lang="scss">
@import "./css/user-badge.css";
@import "./css/timeline-item.css";
@import "./css/timeline-item-issues.css";
@import "./css/release-timeline.css";
@import "./css/release-timeline.scss";
</style>
1 change: 1 addition & 0 deletions src/TimelineItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ function formatDate(inputDate: string): string {
</template>

<style>
@import "./css/timeline-item.scss";
</style>
8 changes: 6 additions & 2 deletions src/TimelineItemIssues.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const tabs = [
},
];
const tabsMobile = tabs;
tabsMobile[1].title = "pulls";
if (props.options.display.release.defaultOpenTab) {
curTab.value = props.options.display.release.defaultOpenTab;
}
Expand All @@ -44,7 +47,7 @@ function toggle(_tab: string) {
<template>
<div class="issue-tabs">
<button
v-for="tab in tabs"
v-for="tab in tabsMobile"
:key="tab.name"
class="tab"
:class="{ active: curTab === tab.name }"
Expand Down Expand Up @@ -99,5 +102,6 @@ function toggle(_tab: string) {
</div>
</template>

<style>
<style lang="scss">
@import "./css/timeline-item-issues.scss";
</style>
4 changes: 4 additions & 0 deletions src/UserBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ defineProps<{
</span>
</a>
</template>

<style lang="scss">
@import "./css/user-badge.scss";
</style>
File renamed without changes.
98 changes: 0 additions & 98 deletions src/css/timeline-item-issues.css

This file was deleted.

112 changes: 112 additions & 0 deletions src/css/timeline-item-issues.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
.release-timeline {
a {
text-decoration: none;
color: var(--rt-c-brand-1);
}

.issues h1,
.issues h2,
.issues h3,
.issues h4,
.issues h5,
.issues h6 {
margin: 7px 0 10px 0;
border-top: none;
padding: 0;
}

.issue p {
margin: 5px 0 3px 0;
line-height: .9rem;
}

.commits .issue p,
.pulls .issue p {
margin: 1px 0 0 0;
/* line-height: .9rem; */
}

.tab {
text-wrap: nowrap;
background-color: inherit;
color: var(--rt-c-text-3);
cursor: pointer;
padding: 2px 5px;
text-align: left;
border: solid 1px var(--rt-c-border);
border-radius: 3px;
transition: 0.4s;
margin: 7px 7px 0 0;
font-size: 0.7rem;
text-transform: lowercase;
letter-spacing: 0.3px;
font-weight: 400;
line-height: 0.8rem;

&.active,
&:hover {
color: var(--rt-c-text-2);
border-color: var(--rt-c-text-2);
background-color: var(--rt-c-bg-alt)
}
}

.issues {
padding-top: 5px;
background-color: var(--rt-c-bg-issues);
overflow: hidden;
max-height: 0;
/* transition: all 0.5s cubic-bezier(0, 1, 0, 1); */
transition: max-height 0.6s ease-in-out, opacity 0.4s ease-in-out;


section {
opacity: 0;
display: none;
transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;

&.open {
opacity: 1;
display: block;
transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
}

.issue {
font-size: 0.8rem;
letter-spacing: -0.3px;
color: var(--rt-c-text-2);
line-height: 0.8rem;
display: block;
border-style: dashed;
border-width: 1px;
padding: 3px 4px;
border-color: var(--rt-c-border);
margin-top: 5px;
font-weight: 400;

h1 {
font-size: 1.2rem;
}

h2 {
font-size: 1.05rem;
}

h3 {
font-size: 1rem;
}
}
}
}

@media screen and (max-width: 440px) {
.issues {
margin-left: -20px;
}

.left .issues {
margin-right: -20px;
text-align: right;
}
}
81 changes: 0 additions & 81 deletions src/css/timeline-item.css

This file was deleted.

Loading

0 comments on commit 04ed9b7

Please sign in to comment.