• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

EcrituresNumeriques / stylo / 15066626824

16 May 2025 10:41AM UTC coverage: 37.574% (-0.02%) from 37.594%
15066626824

Pull #1517

github

web-flow
Merge e05a1c169 into 607ffe7f9
Pull Request #1517: Mise à jour vers react-router@7

549 of 776 branches covered (70.75%)

Branch coverage included in aggregate %.

13 of 373 new or added lines in 28 files covered. (3.49%)

5 existing lines in 4 files now uncovered.

5319 of 14841 relevant lines covered (35.84%)

2.56 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/front/src/components/Home.jsx
1
import React from 'react'
×
NEW
2
import { Link } from 'react-router'
×
3
import { useTranslation, Trans } from 'react-i18next'
×
4
import styloLogo from '/images/logo.svg'
×
5

6
import Loading from './molecules/Loading.jsx'
×
7
import Publication from './publications/Publication.jsx'
×
8
import Release from './publications/Release.jsx'
×
9
import Workshop from './publications/Workshop.jsx'
×
10

11
import styles from '../layout.module.scss'
×
12
import headerStyles from './header.module.scss'
×
13
import buttonStyles from './button.module.scss'
×
14
import clsx from 'clsx'
×
15
import { useActiveUserId } from '../hooks/user.js'
×
16
import { useFeed } from '../hooks/feed.js'
×
17

18
export default function Home() {
×
19
  const { t } = useTranslation('home')
×
20
  const { t: tGlobal } = useTranslation()
×
21
  const userId = useActiveUserId()
×
22

23
  const styloFeed = useFeed('/feed/publications')
×
24
  const releaseFeed = useFeed('/feed/releases')
×
25

26
  return (
×
27
    <>
×
28
      <section
×
29
        className={clsx(styles.sectionPrimary, styles.centered)}
×
30
        aria-labelledby="home-title"
×
31
        aria-describedby="home-description"
×
32
      >
33
        <h1 id="home-title">
×
34
          <img src={styloLogo} alt="Stylo" className={headerStyles.logoAsImg} />
×
35
        </h1>
×
36

37
        <p className={styles.hero} id="home-description">
×
38
          {t('hero.main')}
×
39
        </p>
×
40

41
        <p>{t('hero.description')}</p>
×
42

43
        {!userId && (
×
44
          <p className={styles.horizontalActions}>
×
45
            <Link to="/register" className={buttonStyles.linkPrimary}>
×
46
              {tGlobal('credentials.login.registerLink')}
×
47
            </Link>
×
48

49
            <Link to="/login" className={buttonStyles.linkSecondary}>
×
50
              {tGlobal('credentials.login.confirmButton')}
×
51
            </Link>
×
52
          </p>
×
53
        )}
54

55
        <p>
×
56
          <a
×
57
            href="https://stylo-doc.ecrituresnumeriques.ca/fr/about/"
×
58
            rel="noreferrer noopener"
×
59
            target="_blank"
×
60
            className={buttonStyles.linkSecondary}
×
61
            aria-label={tGlobal('more.about.accessibleLabel', {
×
62
              about: 'Stylo',
×
63
            })}
×
64
          >
65
            {tGlobal('more.about')}
×
66
          </a>
×
67
        </p>
×
68
      </section>
×
69

70
      <section className={styles.sectionAlternate} aria-labelledby="project">
×
71
        <h1 id="project">{t('project.title')}</h1>
×
72

73
        <p>
×
74
          <Trans i18nKey="project.tool" ns="home" />
×
75
        </p>
×
76

77
        <p>
×
78
          <Trans i18nKey="project.research" ns="home" />
×
79
        </p>
×
80

81
        <h2>{t('project.features.title')}</h2>
×
82

83
        <ul className={styles.spacer}>
×
84
          <li>{t('project.features.0')}</li>
×
85
          <li>{t('project.features.1')}</li>
×
86
          <li>{t('project.features.2')}</li>
×
87
          <li>{t('project.features.3')}</li>
×
88
          <li>{t('project.features.4')}</li>
×
89
          <li>{t('project.features.5')}</li>
×
90
          <li>{t('project.features.6')}</li>
×
91
          <li>{t('project.features.7')}</li>
×
92
          <li>{t('project.features.8')}</li>
×
93
        </ul>
×
94

95
        {!userId && (
×
96
          <p className={styles.horizontalActions}>
×
97
            <Link to="/register" className={buttonStyles.linkPrimary}>
×
98
              {tGlobal('credentials.login.registerLink')}
×
99
            </Link>
×
100

101
            <Link to="/login" className={buttonStyles.linkSecondary}>
×
102
              {tGlobal('credentials.login.confirmButton')}
×
103
            </Link>
×
104
          </p>
×
105
        )}
106

107
        <p>
×
108
          <a
×
109
            href="https://stylo-doc.ecrituresnumeriques.ca/fr/about/"
×
110
            rel="noreferrer noopener"
×
111
            target="_blank"
×
112
            className={buttonStyles.linkSecondary}
×
113
            aria-label={tGlobal('more.about.accessibleLabel', {
×
114
              about: 'Stylo',
×
115
            })}
×
116
          >
117
            {tGlobal('more.about')}
×
118
          </a>
×
119
        </p>
×
120
      </section>
×
121

122
      <section className={styles.sectionPrimary} aria-labelledby="news">
×
123
        <h1 id="news">{t('news.title')}</h1>
×
124

125
        <h2>{t('news.workshops.title')}</h2>
×
126

127
        <div className={styles.desktopGridOf3}>
×
128
          {styloFeed.isLoading ? (
×
129
            <Loading />
×
130
          ) : (
131
            styloFeed.data
×
132
              .filter((entry) =>
×
133
                entry.querySelector('category[term="atelierstylo"]')
×
134
              )
×
135
              .map((entry, i) => <Workshop entry={entry} key={i} />)
×
136
          )}
137
        </div>
×
138

139
        <h2>{t('news.release.title')}</h2>
×
140

141
        <div className={styles.desktopGridOf3}>
×
142
          {releaseFeed.isLoading ? (
×
143
            <Loading />
×
144
          ) : (
145
            <Release
×
146
              entry={releaseFeed.data.find(
×
147
                (entry) =>
×
148
                  entry
×
149
                    .querySelector('content[type="html"]')
×
150
                    // automatic releases simply have a '<p>Release vX.Y.Z</p>' content
151
                    .textContent.startsWith('<p>Release') === false
×
152
              )}
×
153
            />
×
154
          )}
155
        </div>
×
156

157
        <h2>{t('news.publications.title')}</h2>
×
158

159
        <div className={styles.desktopGridOf3}>
×
160
          {styloFeed.isLoading ? (
×
161
            <Loading />
×
162
          ) : (
163
            styloFeed.data
×
164
              .filter((entry) => entry.querySelector('category[term="stylog"]'))
×
165
              .map((entry, i) => <Publication entry={entry} key={i} />)
×
166
          )}
167
        </div>
×
168
      </section>
×
169

170
      <section className={styles.sectionAlternate}>
×
171
        <h1>{t('contactus.title')}</h1>
×
172

173
        <p>{t('contactus.description')}</p>
×
174

175
        <p className={styles.spacer}>
×
176
          <a
×
177
            href="https://discussions.revue30.org/c/stylo/"
×
178
            className={buttonStyles.linkPrimary}
×
179
            rel="noreferrer noopener"
×
180
            target="_blank"
×
181
          >
182
            {t('contactus.join')}
×
183
          </a>
×
184
        </p>
×
185

186
        <p>{t('contactus.publishing')}</p>
×
187

188
        <p>
×
189
          <a
×
190
            href="https://stylo-doc.ecrituresnumeriques.ca/fr/contacts/"
×
191
            target="_blank"
×
192
            rel="noreferrer noopener"
×
193
            className={buttonStyles.linkSecondary}
×
194
          >
195
            {t('contactus.mailto')}
×
196
          </a>
×
197
        </p>
×
198
      </section>
×
199
    </>
×
200
  )
201
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc