File tree 6 files changed +75
-13
lines changed
6 files changed +75
-13
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ namespace $ {
218
218
@ $mol_mem_key
219
219
post_template ( id : keyof typeof $piterjs_post_template , next ?: string ) {
220
220
return this . sub ( 'post_template' , $hyoo_crowd_dict ) . sub ( id , $hyoo_crowd_text ) . text ( next )
221
- || $piterjs_post_template [ id ] . replace ( / \t / g , '' ) . trim ( )
221
+ || $piterjs_post_template [ id ]
222
222
}
223
223
224
224
@ $mol_mem_key
Original file line number Diff line number Diff line change @@ -11,22 +11,25 @@ $piterjs_meetup_templates $mol_page
11
11
body /
12
12
<= Content $mol_list rows /
13
13
<= Init_template_labeler $piterjs_meetup_templates_field
14
- title \Анонса мероприятия
14
+ title \✨ Анонса мероприятия
15
15
template? <=> post_template*init?
16
16
<= Init_speech_template_labeler $piterjs_meetup_templates_field
17
- title \Доклад в анонсе
17
+ title \🗣️ Доклад в анонсе
18
18
template? <=> post_template*init_speech?
19
+ <= Speech_template_labeler $piterjs_meetup_templates_field
20
+ title \🗣️ Анонс доклада
21
+ template? <=> post_template*speech?
19
22
<= Place_template_labeler $piterjs_meetup_templates_field
20
- title \Напоминание за день
23
+ title \⌛ Напоминание за день
21
24
template? <=> post_template*place?
22
25
<= Air_template_labeler $piterjs_meetup_templates_field
23
- title \Выход в эфир
26
+ title \⏰ Выход в эфир
24
27
template? <=> post_template*air?
25
28
<= Afterparty_template_labeler $piterjs_meetup_templates_field
26
- title \Афтепати
29
+ title \🎊 Афтепати
27
30
template? <=> post_template*afterparty?
28
31
<= Retro_template_labeler $piterjs_meetup_templates_field
29
- title \Ретроспектива
32
+ title \🙏 Ретроспектива
30
33
template? <=> post_template*retro?
31
34
32
35
$piterjs_meetup_templates_field $mol_expander
Original file line number Diff line number Diff line change @@ -16,23 +16,28 @@ $piterjs_meetup_texts $mol_page
16
16
body /
17
17
<= Content $mol_list rows /
18
18
<= Init_text $piterjs_meetup_texts_card
19
- title \Анонс мероприятия
19
+ title \✨ Анонс мероприятия
20
20
text <= post_text*init
21
21
moment? <=> post_moment*init?
22
+ ^ speech_post_texts /
23
+ <= Speech_post_text*0 $piterjs_meetup_texts_card
24
+ title <= speech_post_title* \🗣️ {speaker}
25
+ text <= speech_post_text* \
26
+ moment? <=> speech_post_moment*place? $mol_time_moment
22
27
<= Place_text $piterjs_meetup_texts_card
23
- title \Напоминание за день
28
+ title \⌛ Напоминание за день
24
29
text <= post_text*place
25
30
moment? <=> post_moment*place?
26
31
<= Air_text $piterjs_meetup_texts_card
27
- title \Выход в эфир
32
+ title \⏰ Выход в эфир
28
33
text <= post_text*air
29
34
moment? <=> post_moment*air?
30
35
<= Arterpaty_text $piterjs_meetup_texts_card
31
- title \Афтепати
36
+ title \🎊 Афтепати
32
37
text <= post_text*afterparty
33
38
moment? <=> post_moment*afterparty?
34
39
<= Retro_text $piterjs_meetup_texts_card
35
- title \Ретроспектива
40
+ title \🙏 Ретроспектива
36
41
text <= post_text*retro
37
42
moment? <=> post_moment*retro?
38
43
Original file line number Diff line number Diff line change
1
+ namespace $ . $$ {
2
+ export class $piterjs_meetup_texts extends $ . $piterjs_meetup_texts {
3
+
4
+ @ $mol_mem
5
+ speech_post_texts ( ) {
6
+ return this . meetup ( ) . speeches ( ) . map ( speech => this . Speech_post_text ( speech ) )
7
+ }
8
+
9
+ speech_post_title ( speech : $piterjs_speech ) {
10
+ return super . speech_post_title ( speech ) . replace ( '{speaker}' , speech . speaker ( ) . title ( ) )
11
+ }
12
+
13
+ speech_post_text ( speech : $piterjs_speech ) {
14
+ return speech . post_text ( )
15
+ }
16
+
17
+ }
18
+ }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ namespace $ {
2
2
3
3
export let $piterjs_post_template = {
4
4
init : `
5
- Ура! Скоро **PiterJS {title}**
5
+ ✨ Ура! Скоро **PiterJS {title}**
6
6
7
7
{descr}
8
8
@@ -19,6 +19,12 @@ namespace $ {
19
19
🗣️ {start} {speaker}
20
20
🎤 **{title}**
21
21
` ,
22
+ speech : `
23
+ ✨ На PiterJS {meetup} в {time} для вас выступит {speaker} с докладом:
24
+ 📜 **{title}**
25
+
26
+ {descr}
27
+ ` ,
22
28
place : `
23
29
🎉 PiterJS {title} уже завтра в {place}: **{address}**
24
30
@@ -45,4 +51,8 @@ namespace $ {
45
51
` ,
46
52
}
47
53
54
+ for ( const name of Object . keys ( $piterjs_post_template ) as ( keyof typeof $piterjs_post_template ) [ ] ) {
55
+ $piterjs_post_template [ name ] = $piterjs_post_template [ name ] . replace ( / \t / g, '' ) . trim ( )
56
+ }
57
+
48
58
}
Original file line number Diff line number Diff line change @@ -60,6 +60,32 @@ namespace $ {
60
60
return reviews . filter ( Boolean ) . join ( '\n---\n' )
61
61
}
62
62
63
+ @ $mol_mem
64
+ post_template ( next ?: string ) {
65
+ return this . sub ( 'post_template' , $hyoo_crowd_text ) . text ( next )
66
+ || $piterjs_post_template . speech
67
+ }
68
+
69
+ @ $mol_mem
70
+ post_text ( ) {
71
+
72
+ const title = this . title ( )
73
+ const descr = this . description ( )
74
+ const speaker = this . speaker ( ) . title ( )
75
+ const meetup = this . meetup ( ) ?. title ( ) ?? ''
76
+ const date = this . start ( ) ?. toString ( 'DD Month' ) ?? 'скоро'
77
+ const time = this . start ( ) ?. toString ( 'hh:mm' ) ?? ''
78
+
79
+ return this . post_template ( )
80
+ . replaceAll ( '{title}' , title )
81
+ . replaceAll ( '{descr}' , descr )
82
+ . replaceAll ( '{date}' , date )
83
+ . replaceAll ( '{time}' , time )
84
+ . replaceAll ( '{speaker}' , speaker )
85
+ . replaceAll ( '{meetup}' , meetup )
86
+
87
+ }
88
+
63
89
}
64
90
65
91
}
You can’t perform that action at this time.
0 commit comments