Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
italy-theme
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
italy-theme
Commits
4311880d
Commit
4311880d
authored
Apr 27, 2018
by
Pietro Albini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
navbar: make responsive
parent
ddf21ea6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
25 deletions
+48
-25
demo.html
demo.html
+7
-5
scss/_navbar.scss
scss/_navbar.scss
+41
-20
No files found.
demo.html
View file @
4311880d
...
@@ -47,11 +47,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
...
@@ -47,11 +47,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<li><a
href=
"#"
>
Chat
</a></li>
<li><a
href=
"#"
>
Chat
</a></li>
<li><a
href=
"#"
>
Cerca
</a></li>
<li><a
href=
"#"
>
Cerca
</a></li>
<li><a
href=
"#"
>
Planet
</a></li>
<li><a
href=
"#"
>
Planet
</a></li>
<li
class=
"right"
><a
href=
"#"
>
Telegram
</a></li>
</ul>
<li
class=
"right"
><a
href=
"#"
>
YouTube
</a></li>
<ul
class=
"right"
>
<li
class=
"right"
><a
href=
"#"
>
Google+
</a></li>
<li><a
href=
"#"
>
Telegram
</a></li>
<li
class=
"right"
><a
href=
"#"
>
Twitter
</a></li>
<li><a
href=
"#"
>
YouTube
</a></li>
<li
class=
"right"
><a
href=
"#"
>
Facebook
</a></li>
<li><a
href=
"#"
>
Google+
</a></li>
<li><a
href=
"#"
>
Twitter
</a></li>
<li><a
href=
"#"
>
Facebook
</a></li>
</ul>
</ul>
</div>
</div>
</nav>
</nav>
...
...
scss/_navbar.scss
View file @
4311880d
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
@mixin
navbar-style
(
$background
,
$color
,
$hover_color
)
{
@mixin
navbar-style
(
$background
,
$color
,
$hover_color
,
$font_size
)
{
background
:
$background
;
background
:
$background
;
ul
li
{
ul
li
{
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
border-right
:
1px
solid
mix
(
#000
,
$background
,
5%
);
border-right
:
1px
solid
mix
(
#000
,
$background
,
5%
);
border-left
:
1px
solid
mix
(
#000
,
$background
,
5%
);
border-left
:
1px
solid
mix
(
#000
,
$background
,
5%
);
font-size
:
$font_size
;
a
{
a
{
color
:
$color
;
color
:
$color
;
...
@@ -44,18 +46,30 @@
...
@@ -44,18 +46,30 @@
nav
{
nav
{
box-shadow
:
0
0
.15em
0
.15em
rgba
(
100
,
100
,
100
,
0
.1
);
box-shadow
:
0
0
.15em
0
.15em
rgba
(
100
,
100
,
100
,
0
.1
);
font-size
:
0
;
width
:
100%
;
overflow
:
auto
;
white-space
:
nowrap
;
ul
{
ul
{
padding
:
0
;
padding
:
0
;
margin
:
0
;
margin
:
0
;
font-size
:
0
;
float
:
left
;
&
.right
{
float
:
right
;
}
li
{
li
{
padding
:
0
;
padding
:
0
;
padding-right
:
0
.1em
;
padding-right
:
1px
;
margin
:
0
;
margin
:
0
;
margin-left
:
-
0
.1em
;
margin-left
:
-
1px
;
display
:
block
;
display
:
inline-
block
;
float
:
left
;
vertical-align
:
top
;
a
{
a
{
display
:
inline-block
;
display
:
inline-block
;
...
@@ -68,40 +82,36 @@ nav {
...
@@ -68,40 +82,36 @@ nav {
}
}
}
}
&
.right
{
float
:
right
;
}
&
.site-name
a
{
&
.site-name
a
{
font-size
:
1
.4em
;
font-size
:
1
.4em
;
padding
:
0
.45em
0
.7em
0
.45em
0
.4em
;
padding
:
0
.45em
0
.7em
0
.45em
0
.4em
;
line-height
:
100%
;
line-height
:
100%
;
}
}
}
}
}
&
:after
{
&
:after
{
clear
:
both
;
clear
:
both
;
content
:
""
;
content
:
""
;
height
:
0
;
height
:
0
;
visibility
:
hidden
;
visibility
:
hidden
;
display
:
block
;
display
:
block
;
}
}
}
@include
navbar-style
(
@include
navbar-style
(
mix
(
#fff
,
$color_warm_gray
,
90%
)
,
mix
(
#fff
,
$color_warm_gray
,
90%
)
,
mix
(
#000
,
$color_warm_gray
,
40%
)
,
mix
(
#000
,
$color_warm_gray
,
40%
)
,
mix
(
#000
,
$color_warm_gray
,
60%
)
mix
(
#000
,
$color_warm_gray
,
60%
)
,
1rem
,
);
);
&
.main-navbar
{
&
.main-navbar
{
font-weight
:
400
;
font-weight
:
400
;
@include
navbar-style
(
$color_orange
,
#fff
,
#fff
);
@include
navbar-style
(
$color_orange
,
#fff
,
#fff
,
1rem
);
}
}
&
.sites-list
{
&
.sites-list
{
font-size
:
0
.8em
;
@include
navbar-style
(
$color_cool_gray
,
$color_warm_gray
,
#fff
,
0
.8rem
);
@include
navbar-style
(
$color_cool_gray
,
$color_warm_gray
,
#fff
);
ul
li
a
{
ul
li
a
{
padding
:
0
.5em
0
.7em
;
padding
:
0
.5em
0
.7em
;
...
@@ -110,4 +120,15 @@ nav {
...
@@ -110,4 +120,15 @@ nav {
}
}
}
}
}
}
@media
all
and
(
max-width
:
$page_size
)
{
div
.container
{
display
:
inline-block
;
}
ul
{
display
:
inline-block
;
float
:
none
!
important
;
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment