Skip to content

Commit

Permalink
[home,webapp] add users logo and update hertzbeat brand (apache#302)
Browse files Browse the repository at this point in the history
* [home]add who use hertzbeat.

* [home,webapp] add users logo and update hertzbeat brand
  • Loading branch information
tomsun28 committed Sep 25, 2022
1 parent 3ff4226 commit 2e05958
Show file tree
Hide file tree
Showing 19 changed files with 197 additions and 58 deletions.
4 changes: 0 additions & 4 deletions home/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 317,6 @@ module.exports = {
],
themes: ['@docusaurus/theme-live-codeblock'],
scripts: [
{
src: 'https://cdn.jsdelivr.net/gh/buttons/buttons.github.io/buttons.js',
async: true,
},
{
src: 'https://hm.baidu.com/hm.js?77fb03ed1c6c1267119fec6d84dd88f3',
async: true,
Expand Down
53 changes: 27 additions & 26 deletions home/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 225,33 @@ export const friendsLink = [
},
]

export const usersLink = [
{
img: 'skyworth_logo.png',
alt: 'skyworth',
},
{
img: 'sc_edu_logo.png',
alt: 'sc_edu_logo',
},
{
img: 'cmge_logo.png',
alt: 'cmge',
},
{
img: 'cnsodata_logo.svg',
alt: 'cnsodata',
},
{
img: 'tancloud_logo.svg',
alt: 'tancloud',
},
{
img: 'hibobi_logo.svg',
alt: 'hibobi',
}
]

export const SetupExample = `
<dependency>
<groupId>com.usthe.sureness</groupId>
Expand All @@ -234,29 261,3 @@ export const SetupExample = `
compile group: 'com.usthe.sureness', name: 'sureness-core', version: '1.0.6'
`

export const SurenessIntegration = `
@Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)
throws IOException, ServletException {
try {
SubjectSum subject = SurenessSecurityManager.getInstance().checkIn(servletRequest);
} catch (IncorrectCredentialsException | UnknownAccountException | ExpiredCredentialsException e1) {
logger.debug("this request account info is illegal");
responseWrite(ResponseEntity
.status(HttpStatus.UNAUTHORIZED).body(e1.getMessage()), servletResponse);
return;
} catch (UnauthorizedException e4) {
logger.debug("this account can not access this resource");
responseWrite(ResponseEntity
.status(HttpStatus.FORBIDDEN).body(e4.getMessage()), servletResponse);
return;
} catch (RuntimeException e) {
logger.error("other exception happen: ", e);
responseWrite(ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).build(),
servletResponse);
return;
}
filterChain.doFilter(servletRequest, servletResponse);
}
`
2 changes: 1 addition & 1 deletion home/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 30,7 @@
--wdio-link-background-color: #eee0d7;
--wdio-link-color: #000;
--wdio-section-background-color: #fff;
--wdio-dark-section-background-color: #efefef;
--wdio-dark-section-background-color: #b78af8;
}

html[data-theme=dark] {
Expand Down
5 changes: 3 additions & 2 deletions home/src/pages/components/LogoCarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 33,9 @@ export default class LogoCarousel extends React.Component {
this.list = () => (
<Slider {...settings}>
{this.props.logos.map((value, index) => (
<a key={index} href={value.url} target="_blank" rel="noopener noreferrer">
<img style={{ maxHeight: '80px', maxWidth: '100px' }} src={value.remoteImg} onError={(e) => e.target.src = iconCommonUrl value.img} alt={value.alt} />
<a key={index} href={value.url == null ? '#' : value.url} target="_blank" rel="noopener noreferrer">
<img style={{ maxHeight: '100px', maxWidth: '120px' }} src={value.remoteImg == null ? iconCommonUrl value.img : value.remoteImg}
onError={(e) => e.target.src = iconCommonUrl value.img} alt={value.alt} />
</a>
))}
</Slider>
Expand Down
15 changes: 9 additions & 6 deletions home/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,7 @@ import LogoCarousel from './components/LogoCarousel'
import cdnTransfer from '../CdnTransfer'

import styles from './styles.module.css'
import { features, dromaraFriends, friendsLink } from '../constants'
import {features, dromaraFriends, friendsLink, usersLink} from '../constants'
import LogoCarouselStatic from './components/LogoCarouselStatic'

function Home() {
Expand Down Expand Up @@ -171,6 171,7 @@ function Home() {
</SwiperSlide>
</Swiper>
</div>

<div
className="swiper-button-prev user-swiper-button-prev"
style={{ top: '880px', left: '50px', color: '#000033' }}
Expand All @@ -179,17 180,19 @@ function Home() {
className="swiper-button-next user-swiper-button-next"
style={{ top: '880px', right: '50px', color: '#000033' }}
/>
{/*who is using*/}
<Section isDark>
<LogoCarousel logos={usersLink}
headerTitle={translate({ message: 'Who Use HertzBeat?' })}>
</LogoCarousel>
</Section>
{features && features.length > 0 && (
<Section isDark>
<Section>
{features.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</Section>
)}
{/*who is using*/}
{/*<Section>*/}
{/* <LogoCarousel logos={logos}></LogoCarousel>*/}
{/*</Section>*/}

{/*Friend Links*/}
<Section>
Expand Down
13 changes: 10 additions & 3 deletions home/static/img/hertzbeat-brand-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 10 additions & 3 deletions home/static/img/hertzbeat-brand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added home/static/img/icons/cmge_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions home/static/img/icons/cnsodata_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions home/static/img/icons/hibobi_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added home/static/img/icons/sc_edu_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added home/static/img/icons/skyworth_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions home/static/img/icons/tancloud_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions web-app/src/app/layout/passport/passport.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 3,7 @@
<div class="wrap">
<div class="top">
<div class="head">
<img class="logo" src="./assets/logo.svg" alt="" />
<span class="title">HertzBeat</span>
<img class="logo" src="./assets/brand.svg" alt="" />
</div>
<div class="desc">{{ 'app.passport.desc' | i18n }}</div>
</div>
Expand Down
Loading

0 comments on commit 2e05958

Please sign in to comment.