Skip to content

Commit 8c92203

Browse files
Community page (#40820)
1 parent b1a6c33 commit 8c92203

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2878
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ source/_data/blueprint_exchange_data.json
99
source/_data/version_data.json
1010
source/_data/alerts_data.json
1111
source/_data/language_scores.json
12+
source/_data/codeowners.json
1213
source/_stash
14+
source/stylesheets/homeassistant/pages/community/index.css
1315
source/stylesheets/screen.css
1416
source/.jekyll-cache/
1517
vendor

Rakefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ task :generate do
3232
abort("Generating version data failed") unless success
3333
success = system "rake language_scores_data"
3434
abort("Generating language scores data failed") unless success
35+
success = system "rake codeowners_data"
36+
abort("Extracting codeowners") unless success
3537
success = system "jekyll build"
3638
abort("Generating site failed") unless success
3739
if ENV["CONTEXT"] != 'production'
@@ -71,6 +73,7 @@ task :preview, :listen do |t, args|
7173
system "rake analytics_data"
7274
system "rake version_data"
7375
system "rake language_scores_data"
76+
system "rake codeowners_data"
7477
system "rake alerts_data"
7578
jekyllPid = Process.spawn({"OCTOPRESS_ENV"=>"preview"}, "jekyll build -t --watch --incremental")
7679
compassPid = Process.spawn("compass watch")
@@ -128,3 +131,25 @@ task :language_scores_data do
128131
file.write(JSON.generate(remote_data))
129132
end
130133
end
134+
135+
desc "Extract CODEOWNERS and output to _data/codeowners.json"
136+
task :codeowners_data do
137+
codeowners = []
138+
File.readlines("CODEOWNERS").each do |line|
139+
next if line.start_with?("#") || line.strip.empty?
140+
parts = line.split
141+
next if parts.length < 2
142+
owners = parts[1..-1]
143+
owners.each do |owner|
144+
owner = owner.delete_prefix('@')
145+
next if owner.include?('/')
146+
codeowners << owner unless codeowners.include?(owner)
147+
end
148+
end
149+
150+
codeowners.sort!
151+
152+
File.open("#{source_dir}/_data/codeowners.json", "w") do |file|
153+
file.write(JSON.generate(codeowners))
154+
end
155+
end
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
.container {
2+
display: flex;
3+
margin: 0 auto;
4+
max-width: calc(var(--container-max-width) + (var(--container-gutters) * 2));
5+
padding: 12px calc(var(--container-gutters) / 2);
6+
width: 100%;
7+
height: 100%;
8+
9+
@include bp(desktop) {
10+
padding: 12px var(--container-gutters);
11+
}
12+
13+
&-full {
14+
margin: 0 auto;
15+
padding: 0 calc(var(--container-gutters) / 2);
16+
max-width: calc(var(--container-full-max-width) + (var(--container-gutters) * 2));
17+
width: 100%;
18+
19+
@include bp(desktop) {
20+
padding: 0 var(--container-gutters);
21+
}
22+
}
23+
}
24+
25+
footer{
26+
isolation: isolate;
27+
position: relative;
28+
&:before{
29+
content: '';
30+
position: absolute;
31+
height: 500px;
32+
left: 0;
33+
right: 0;
34+
bottom: 100%;
35+
background: linear-gradient(180deg, #F5F6FA 0%, #FFFFFF 100%);
36+
}
37+
}
38+
39+
html{
40+
scroll-padding-top: 92px;
41+
}
42+
43+
#landingpage {
44+
background-color: #F5F6FA;
45+
color: #002332;
46+
47+
height: auto;
48+
49+
.page-content {
50+
overflow-x: clip;
51+
padding-top: 68px;
52+
}
53+
54+
.content {
55+
max-width: unset;
56+
margin: 0;
57+
}
58+
59+
img {
60+
box-shadow: unset;
61+
vertical-align: unset;
62+
border: unset;
63+
}
64+
65+
.spacer {
66+
display: none;
67+
}
68+
}
69+
70+
section {
71+
padding: var(--section-spacing-y) 0;
72+
position: relative;
73+
z-index: 1;
74+
}
75+
76+
main#page-community {
77+
h1,
78+
.h1 {
79+
@include h1;
80+
}
81+
82+
h2,
83+
.h2 {
84+
@include h2;
85+
}
86+
87+
h3,
88+
.h3 {
89+
@include h3;
90+
text-transform: unset;
91+
letter-spacing: unset;
92+
}
93+
94+
h4,
95+
.h4 {
96+
@include h4;
97+
}
98+
99+
h5,
100+
.h5 {
101+
@include h5;
102+
}
103+
104+
h6,
105+
.h6 {
106+
@include h6;
107+
}
108+
109+
.small {
110+
@include small;
111+
}
112+
113+
.big {
114+
@include big;
115+
}
116+
117+
p {
118+
color: var(--typography-paragraph-color);
119+
font-size: var(--typography-paragraph-font-size);
120+
font-weight: var(--typography-paragraph-font-weight);
121+
line-height: var(--typography-paragraph-line-height);
122+
margin: 0;
123+
124+
&:last-child {
125+
margin-bottom: 0;
126+
}
127+
}
128+
129+
figure {
130+
margin: 0;
131+
}
132+
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
.button {
2+
// Reset - remove after global button refactor
3+
border: unset;
4+
color: initial;
5+
height: unset;
6+
line-height: initial;
7+
margin: unset;
8+
overflow: hidden;
9+
10+
align-items: center;
11+
background-color: #99DFFC;
12+
border-radius: 40px;
13+
display: inline-flex;
14+
font-size: 10px;
15+
font-weight: 600;
16+
padding: 10px 24px;
17+
transition: color 0.2s ease, background-color 0.2s ease;
18+
19+
@include bp(desktop) {
20+
font-size: 14px;
21+
}
22+
23+
&:hover {
24+
box-shadow: unset;
25+
background-color: var(--color-primary);
26+
color: #ffffff;
27+
}
28+
29+
&:before {
30+
content: unset;
31+
}
32+
33+
&:has(.icon) {
34+
gap: 4px;
35+
padding: 4px 14px 4px 4px;
36+
37+
@include bp(desktop) {
38+
gap: 10px;
39+
padding: 8px 24px 8px 8px;
40+
}
41+
}
42+
43+
&.secondary {
44+
background-color: var(--color-secondary);
45+
46+
&:hover {
47+
background-color: var(--color-primary);
48+
color: #ffffff;
49+
}
50+
}
51+
52+
&.hollow-dark {
53+
background-color: unset;
54+
box-shadow: inset 0 0 0 1px #fff;
55+
color: #ffffff;
56+
57+
58+
&:hover {
59+
background-color: #ffffff;
60+
color: #002332;
61+
62+
63+
}
64+
}
65+
}
66+
67+
.buttons {
68+
display: flex;
69+
flex-wrap: wrap;
70+
justify-content: center;
71+
gap: 12px;
72+
73+
// If DSAP is enabled
74+
&[data-dsap] {
75+
76+
// Only apply if scrolling down into view
77+
&:not([data-dsap-is="in"]):not([data-dsap-is="above"]) {
78+
// Only if scrolling down into the element
79+
80+
.button {
81+
transition-duration: 0s;
82+
transition-delay: 0s;
83+
opacity: 0;
84+
transform: translateY(50px);
85+
scale: 0.85;
86+
}
87+
}
88+
89+
.button {
90+
transform: translateY(0);
91+
92+
@for $i from 1 through 10 {
93+
&:nth-child(#{$i}) {
94+
transition-property: transform, opacity, scale;
95+
transition-duration: .5s;
96+
transition-delay: #{0.1 + ($i * 0.05)}s;
97+
transition-timing-function: cubic-bezier(0.2, 1, 0.5, 1);
98+
99+
}
100+
}
101+
}
102+
}
103+
104+
@include bp(desktop) {
105+
gap: 24px;
106+
}
107+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.event-card{
2+
background-color: rgba(255,255,255,0.4);
3+
padding: 12px;
4+
border-radius: 12px;
5+
border: 1px solid #ffffff;
6+
7+
.button{
8+
margin-top: 20px;
9+
}
10+
11+
.event-title{
12+
@include h4;
13+
}
14+
15+
.event-meta{
16+
@include p;
17+
color: #4F606E;
18+
margin-top: 6px;
19+
font-size: 12px;
20+
}
21+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.icon{
2+
aspect-ratio: 1/1;
3+
background-color: #ffffff;
4+
border-radius: 50%;
5+
color: #002332;
6+
height: 100%;
7+
padding: 4px;
8+
display: grid;
9+
place-items: center;
10+
height: 24px;
11+
width: 24px;
12+
13+
&:has(use[href="#facebook"]){
14+
padding: 0;
15+
svg{
16+
height: 100%;
17+
width: 100%;
18+
}
19+
}
20+
21+
svg{
22+
width: 100%;
23+
height: 100%;
24+
}
25+
}

0 commit comments

Comments
 (0)