Merge branch 'dropdown_menu'

This commit is contained in:
nek0 2016-06-12 15:17:53 +02:00
commit 3fd14e9391
8 changed files with 91 additions and 22 deletions

View file

@ -117,7 +117,8 @@ renderLayout widget = do
, js_picturefill_js , js_picturefill_js
]) ])
$(combineStylesheets 'StaticR $(combineStylesheets 'StaticR
[ css_bootstrap_min_css [ css_dropdown_css
, css_bootstrap_min_css
, css_style_global_css , css_style_global_css
]) ])
$(widgetFile "default-layout") $(widgetFile "default-layout")

50
static/css/dropdown.css Normal file
View file

@ -0,0 +1,50 @@
#user-nav {
list-style: none;
font-weight: bold;
margin-bottom: 10px;
position: relative;
}
#user-nav ul {
display: none;
position: absolute;
}
#user-nav li {
margin-right: 20px;
}
#user-nav li a {
padding: 10px 20px 10px;
border-radius: 5px;
background-color: white;
}
#user-nav input[type="checkbox"]:checked + ul {
display: block;
background-color: white;
border-radius: 5px;
z-index: 99;
}
#user-nav a {
display: block;
text-decoration: none;
color: #d64760;
}
#user-nav a:hover {
color: black;
transition-timing-function: linear
transition-duration: 0.25s;
}
#user-nav label {
margin: 0;
}
.vanish {
/*position: absolute;
left: -9999px;*/
display: none;
}

View file

@ -101,7 +101,7 @@
#header #header
{ {
padding: 2em 3em; padding: 2em 3em;
xmin-height: 212px; min-height: 212px;
vertical-align: middle; vertical-align: middle;
} }

View file

@ -277,3 +277,7 @@
outline: 0px none; outline: 0px none;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(255,249,183, 0.6); box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset, 0px 0px 8px rgba(255,249,183, 0.6);
} }
nav {
min-height: 0 !important;
}

View file

@ -1,5 +1,4 @@
<div id="header" class="item" data-width="400"> <div id="header" class="item" data-width="400">
<form class="inner" method=post enctype=#{enctype}> <form class="inner" method=post enctype=#{enctype}>
<h3>Upload multiple images Upload multiple images
<p>Here you can upload your images.
^{uploadWidget} ^{uploadWidget}

View file

@ -1,5 +1,4 @@
<div id="header" class="item" data-width="400"> <div id="header" class="item" data-width="400">
<form class="inner" method=post enctype=#{enctype}> <form class="inner" method=post enctype=#{enctype}>
<h1>Image upload to album #{albumTitle album} Image upload to album #{albumTitle album}
<p>Here you can upload your image.
^{dUploadWidget} ^{dUploadWidget}

View file

@ -1,24 +1,37 @@
<nav id="header"> <nav id="header">
<div .row> <div .row>
<div .col-md-9> <div .col-md-9>
<ul id="user-nav" .nav .nav-pills> <ul #user-nav>
<li role="presentation"> <li>
<a href=@{HomeR}>Home <a href=@{HomeR}>
Home
$maybe su <- msu $maybe su <- msu
<li role="presentation"> <li>
<a href=@{UserR username}>#{slug}<br> <label for="cb1">
<li role="presentation"> <a>
<a href=@{LogoutR}>Logout #{slug}<span class="caret"></span>
<li role="presentation"> <input type="checkbox" #cb1 .vanish aria-hidden="true">
<a href=@{NewAlbumR}>Create album <ul>
<li role="presentation"> <li>
<a href=@{UploadR}>Upload images <a href=@{UserR username}>
Your Profile
<li>
<a href=@{NewAlbumR}>
Create album
<li>
<a href=@{UploadR}>
Upload images
<li>
<a href=@{LogoutR}>
Logout
$nothing $nothing
<li role="presentation"> <li>
<a href=@{LoginR}>Login <a href=@{LoginR}>
Login
$if block == False $if block == False
<li role="presentation"> <li>
<a href=@{SignupR}>Signup <a href=@{SignupR}>
Signup
<div .col-md-3 #search> <div .col-md-3 #search>
^{pageBody searchWidget} ^{pageBody searchWidget}

View file

@ -1,5 +1,8 @@
/*templates/form-widget.cassius*/ /*templates/form-widget.cassius*/
#main, #reel, #header #main, #reel, #header
overflow-y: auto !important /*overflow-y: auto !important*/
height: auto !important height: auto !important
#main
margin-top: -220px !important;