Skip to content

Commit

Permalink
Merge pull request #57 from InseeFr/feature/modifySurveyListStyle
Browse files Browse the repository at this point in the history
modify survey list style and dockerfile
  • Loading branch information
BettyB979 authored Jun 5, 2024
2 parents 39b25ce + 0de773f commit f30d576
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx
FROM nginx:stable-alpine
COPY build /usr/share/nginx/html
RUN rm etc/nginx/conf.d/default.conf
COPY nginx-coleman-promotion.conf etc/nginx/conf.d/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "colempub",
"version": "1.0.2",
"version": "1.0.3",
"dependencies": {
"axios": "^0.19.2",
"bootstrap": "^3.3.7",
Expand Down
2 changes: 1 addition & 1 deletion src/components/template/response-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ResponseButton = ({ id }) => (
<button
type="button"
className="btn btn-lg"
id="boutonRepondre"
id="accessButton"
disabled={!getIsSurveyOnlineById(id)}
>
{'Accéder au questionnaire'}
Expand Down
4 changes: 2 additions & 2 deletions src/components/template/survey-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { Link } from 'react-router-dom';

const SurveyItem = ({ survey }) => (
<div className="survey-item">
<Link to={`/${survey.id}`} tabIndex="-1">
<button type="button" className="btn btn-lg" id="boutonRepondre">
<Link to={`/${survey.id}`} tabIndex="-1" className='survey-item-link'>
<button type="button" className="btn" id="boutonRepondre">
<span>{survey.titleShort}</span>
<br />
{`${window.location.host}/${survey.id}`}
Expand Down
37 changes: 31 additions & 6 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,27 @@ h2 {
.btn-md {
margin-right: 10px;
}

#survey-item-link {
display: inline-block;
width: 100%;
height: 100%;
}

#boutonRepondre {
display: flex;
flex-direction: column;
white-space: inherit;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
word-wrap: break-word;
}

#menuItemRepondre,
#boutonRepondre,
#accessButton,
#boutonMailConfirm,
#boutonMailModif,
#formSend,
Expand All @@ -105,10 +124,12 @@ h2 {
}
#menuItemRepondre:hover,
#boutonRepondre:hover,
#accessButton:hover,
#boutonMailConfirm:hover,
#boutonMailModif:hover,
#menuItemRepondre:focus,
#boutonRepondre:focus,
#accessButton:focus,
#boutonMailConfirm:focus,
#boutonMailModif:focus,
#formSend:hover,
Expand Down Expand Up @@ -321,14 +342,18 @@ div.banner-top h1 {

/* survey item */
.surveys-list {
text-align: center;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
margin-top:2rem;
}

.survey-item {
text-align: center;
margin: 5px;
display: inline-block;
width: 30%;
min-width: 300px;
border-radius: 7px;
width: auto;
background-color: $blue-insee;
color: $yellow-insee;

Expand All @@ -340,7 +365,7 @@ div.banner-top h1 {
text-decoration: none;
}
span {
font-size: 2em;
font-size: 1.5em;
}
}

Expand Down

0 comments on commit f30d576

Please sign in to comment.