Skip to content

Commit cf2593e

Browse files
authored
Merge pull request #11 from Arkshine/modernize
COMPATIBILITY: Modernize the component
2 parents f3561ce + 0a8d0fb commit cf2593e

24 files changed

+3021
-1085
lines changed

.discourse-compatibility

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
< 3.3.0.beta1-dev: f3561ce7fd9dded965fb8e9a99229539c7af3aa1

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@discourse/lint-configs/eslint-theme");
Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Linting
1+
name: Discourse Theme
22

33
on:
44
push:
@@ -7,37 +7,5 @@ on:
77
pull_request:
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- uses: actions/checkout@v2
15-
16-
- name: Set up Node.js
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: 12
20-
21-
- name: Yarn install
22-
run: yarn install
23-
24-
- name: ESLint
25-
if: ${{ always() }}
26-
run: yarn eslint --ext .js,.js.es6 --no-error-on-unmatched-pattern {test,javascripts}
27-
28-
- name: Prettier
29-
if: ${{ always() }}
30-
shell: bash
31-
run: |
32-
yarn prettier -v
33-
shopt -s extglob
34-
if ls @(javascripts|desktop|mobile|common|scss)/**/*.@(scss|js|es6) &> /dev/null; then
35-
yarn prettier --list-different "@(javascripts|desktop|mobile|common|scss)/**/*.{scss,js,es6}"
36-
fi
37-
if ls test/**/*.@(js|es6) &> /dev/null; then
38-
yarn prettier --list-different "test/**/*.{js,es6}"
39-
fi
40-
41-
- name: Ember template lint
42-
if: ${{ always() }}
43-
run: yarn ember-template-lint javascripts --no-error-on-unmatched-pattern
10+
ci:
11+
uses: discourse/.github/.github/workflows/discourse-theme.yml@v1

.github/workflows/component-tests.yml

Lines changed: 0 additions & 121 deletions
This file was deleted.

.prettierrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@discourse/lint-configs/prettier");

.template-lintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require("@discourse/lint-configs/template-lint");

.template-lintrc.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

common/common.scss

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
@import 'mixins';
2-
@import 'buttons';
1+
@import "mixins";
2+
@import "buttons";
3+
4+
@if $links_position == "left" {
5+
.home-logo-wrapper-outlet {
6+
display: flex;
7+
align-items: center;
8+
gap: 1rem;
9+
}
10+
}
311

412
.custom-header-links {
513
.top-level-links {
@@ -8,10 +16,11 @@
816
justify-content: center;
917
align-items: center;
1018
gap: 1rem;
19+
margin: 0;
1120

1221
.custom-header-link {
1322
color: $main_link_color;
14-
padding-block: 1rem;
23+
padding-block: 0.5rem;
1524
cursor: default;
1625

1726
&-icon {
@@ -55,7 +64,8 @@
5564
list-style: none;
5665
transform: scale(0);
5766
transition: transform 0.2s ease;
58-
transition-delay: 0.3s;
67+
transition-delay: 0.1s;
68+
will-change: transform;
5969

6070
&-link {
6171
color: $dropdown_item_color;
@@ -81,11 +91,11 @@
8191
}
8292

8393
// hide on scroll when nav is positioned to left of header:
84-
.title .custom-header-links.scrolling {
94+
.d-header .custom-header-links.scrolling {
8595
display: none;
8696
}
8797

88-
// maintains suitable spacing when Sign Up buttons are present
89-
.anon .d-header .sign-up-button {
90-
margin-left: 1.25em;
98+
// maintains suitable spacing when auth buttons are present
99+
.anon .d-header .header-buttons:has(.custom-header-links) .auth-buttons {
100+
margin-left: 1.25em;
91101
}

desktop/desktop.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
.custom-header-links {
2+
display: flex;
3+
4+
.custom-header-link {
5+
display: flex;
6+
}
7+
28
@media screen and (max-width: 712px) {
39
display: none;
410
}

0 commit comments

Comments
 (0)