Skip to content

Commit

Permalink
Make the phare looks different to the other news
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Aug 1, 2018
1 parent b0b6c2e commit 9ab0aef
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 29 deletions.
5 changes: 3 additions & 2 deletions app/assets/stylesheets/parts/a_tag.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ html {
box-sizing: border-box;
}

*, *:before, *:after {
*,
*:before,
*:after {
box-sizing: inherit;
}


body {
position: relative;
color: #000;
Expand Down
10 changes: 4 additions & 6 deletions app/assets/stylesheets/parts/content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ article {
/* the translation should be the exact sum of padding and margin of all elements to the right */
position: absolute;
right: -$RAY_CONTAINER - $BORDER_CONTENT;
}
.score, .datePourCss {
box-sizing: content-box;
border-image: url("/images/contrib/RonRonnement/coin-transparent.png") 0 0 0 15;
box-sizing: content-box;
border-image: url("/images/contrib/RonRonnement/coin-transparent.png") 0 0 0
15;
border-style: solid;
}
.score {
Expand All @@ -95,14 +94,13 @@ article {
}
.datePourCss {
background: $C_BANDEAU;
display: block !important;
color: white;
padding: 0;
margin-bottom: 2px;
top: 20px;

.jour {
box-sizing: border-box;
box-sizing: border-box;
padding-left: 2px;
float: left;
line-height: 31px;
Expand Down
10 changes: 3 additions & 7 deletions app/assets/stylesheets/parts/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
display: none;
}

margin: 2rem 61px;
box-shadow: 0 4px 6px 0 #aaa;
border: solid $BORDER_PHARE $C_BANDEAU;

/* comme le bord est plus grand, translation légèrement suppérieur */
.score,
.datePourCss {
right: -$RAY_CONTAINER - $BORDER_PHARE;
width: $RAY_CONTAINER + $BORDER_PHARE;
}
border-radius: 0;
}

/* information générale, "publicité" (genre fosdem p. ex.) */
Expand Down
19 changes: 10 additions & 9 deletions app/assets/stylesheets/responsive/m.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,16 @@
}
}

#redaction,
#container {
.datePourCss {
display: none !important;
}
.score {
top: 5px;
right: 0 !important;
}
.datePourCss {
display: none !important;
}
.score {
top: 5px;
right: 0 !important;
}

#phare article {
margin: 0.5rem 8px;
}

#container {
Expand Down
8 changes: 5 additions & 3 deletions app/views/home/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- if @ppp
- content_for :hero do
%section#phare
= render @ppp

- content_for :column do
= render 'polls/box'
= render 'sections/box'
Expand All @@ -6,9 +11,6 @@
- title "Accueil"
- cache_unless account_signed_in?, "home/#{@order}/#{@nodes.current_page}", expires_in: 1.minute do
%h1 "Accueil"
- if @ppp
%section#phare
= render @ppp
- if @banner
%aside.banner
= @banner
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
%body{body_attr}
#top
= render 'layouts/site', home: false
= yield :hero
= render 'layouts/sidebar'
%section#container.container
- [:alert, :notice].each do |type|
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"stylelint-scss": "3.1.3"
},
"scripts": {
"lint": "stylelint app/assets/stylesheets/{,common/,pygments/}*.scss",
"pretty": "prettier --write app/assets/**/*.scss"
"lint": "stylelint app/*/*/{,common/,parts/,responsive/}*.scss",
"pretty": "prettier --write app/*/*/{,common/,parts/,responsive/}*.scss"
},
"stylelint": {
"extends": "stylelint-config-recommended-scss",
Expand Down

0 comments on commit 9ab0aef

Please sign in to comment.