Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
a602ee0e
Commit
a602ee0e
authored
Aug 08, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the basic app template.
parent
0e013c4f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
115 deletions
+47
-115
SiteController.php
apps/basic/controllers/SiteController.php
+0
-1
main.php
apps/basic/views/layouts/main.php
+28
-25
index.php
apps/basic/views/site/index.php
+17
-16
site.css
apps/basic/web/css/site.css
+2
-73
No files found.
apps/basic/controllers/SiteController.php
View file @
a602ee0e
...
@@ -21,7 +21,6 @@ class SiteController extends Controller
...
@@ -21,7 +21,6 @@ class SiteController extends Controller
public
function
actionIndex
()
public
function
actionIndex
()
{
{
Yii
::
warning
(
'test'
);
return
$this
->
render
(
'index'
);
return
$this
->
render
(
'index'
);
}
}
...
...
apps/basic/views/layouts/main.php
View file @
a602ee0e
...
@@ -19,36 +19,39 @@ app\config\AppAsset::register($this);
...
@@ -19,36 +19,39 @@ app\config\AppAsset::register($this);
</head>
</head>
<body>
<body>
<?php
$this
->
beginBody
();
?>
<?php
$this
->
beginBody
();
?>
<div
class=
"container"
>
<div
class=
"navbar navbar-inverse navbar-fixed-top"
>
<div
class=
"masthead"
>
<div
class=
"container"
>
<h3
class=
"text-muted"
>
My Company
</h3>
<?php
echo
Html
::
a
(
'My Company'
,
Yii
::
$app
->
homeUrl
,
array
(
'class'
=>
'navbar-brand'
));
?>
<div
class=
"nav-collapse collapse pull-right"
>
<?php
echo
Menu
::
widget
(
array
(
'options'
=>
array
(
'class'
=>
'nav navbar-nav'
),
'items'
=>
array
(
array
(
'label'
=>
'Home'
,
'url'
=>
array
(
'/site/index'
)),
array
(
'label'
=>
'About'
,
'url'
=>
array
(
'/site/about'
)),
array
(
'label'
=>
'Contact'
,
'url'
=>
array
(
'/site/contact'
)),
Yii
::
$app
->
user
->
isGuest
?
array
(
'label'
=>
'Login'
,
'url'
=>
array
(
'/site/login'
))
:
array
(
'label'
=>
'Logout ('
.
Yii
::
$app
->
user
->
identity
->
username
.
')'
,
'url'
=>
array
(
'/site/logout'
)),
),
));
?>
</div>
</div>
</div>
<?php
echo
Menu
::
widget
(
array
(
<div
class=
"container"
>
'options'
=>
array
(
'class'
=>
'nav navbar-nav nav-justified'
),
<?php
echo
Breadcrumbs
::
widget
(
array
(
'items'
=>
array
(
'links'
=>
isset
(
$this
->
params
[
'breadcrumbs'
])
?
$this
->
params
[
'breadcrumbs'
]
:
array
(),
array
(
'label'
=>
'Home'
,
'url'
=>
array
(
'/site/index'
)),
array
(
'label'
=>
'About'
,
'url'
=>
array
(
'/site/about'
)),
array
(
'label'
=>
'Contact'
,
'url'
=>
array
(
'/site/contact'
)),
Yii
::
$app
->
user
->
isGuest
?
array
(
'label'
=>
'Login'
,
'url'
=>
array
(
'/site/login'
))
:
array
(
'label'
=>
'Logout ('
.
Yii
::
$app
->
user
->
identity
->
username
.
')'
,
'url'
=>
array
(
'/site/logout'
)),
),
));
?>
));
?>
<?php
echo
$content
;
?>
</div>
</div>
<?php
echo
Breadcrumbs
::
widget
(
array
(
<footer
class=
"footer"
>
'links'
=>
isset
(
$this
->
params
[
'breadcrumbs'
])
?
$this
->
params
[
'breadcrumbs'
]
:
array
(),
<div
class=
"container"
>
));
?>
<p
class=
"pull-left"
>
©
My Company
<?php
echo
date
(
'Y'
);
?>
</p>
<?php
echo
$content
;
?>
<p
class=
"pull-right"
>
<?php
echo
Yii
::
powered
();
?>
</p>
</div>
</footer>
<div
class=
"footer"
>
<p>
©
My Company
<?php
echo
date
(
'Y'
);
?>
</p>
<p>
<?php
echo
Yii
::
powered
();
?>
Template by
<a
href=
"http://twitter.github.io/bootstrap/"
>
Twitter Bootstrap
</a>
</p>
</div>
</div>
<?php
$this
->
endBody
();
?>
<?php
$this
->
endBody
();
?>
</body>
</body>
</html>
</html>
...
...
apps/basic/views/site/index.php
View file @
a602ee0e
...
@@ -5,44 +5,45 @@
...
@@ -5,44 +5,45 @@
$this
->
title
=
'Welcome'
;
$this
->
title
=
'Welcome'
;
?>
?>
<div
class=
"jumbotron"
>
<div
class=
"jumbotron"
>
<h1>
Welcome
!
</h1>
<h1>
Congratulations
!
</h1>
<p
class=
"lead"
>
Cras justo odio, dapibus ac facilisis in, egestas eget quam. Fusce dapibus, tellus ac cursus
<p
class=
"lead"
>
You have successfully created your Yii-powered application.
</p>
commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet.
</p>
<p><a
class=
"btn btn-large btn-success"
href=
"http://www.yiiframework.com"
>
Get started with Yii
</a></p>
<p><a
class=
"btn btn-large btn-success"
href=
"http://www.yiiframework.com"
>
Get started with Yii
</a></p>
</div>
</div>
<div
class=
"body-content"
>
<div
class=
"body-content"
>
<!-- Example row of columns -->
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-4"
>
<div
class=
"col-lg-4"
>
<h2>
Heading
</h2>
<h2>
Heading
</h2>
<p>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
euismod. Donec sed odio dui.
</p>
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.
</p>
<p><a
class=
"btn btn-default"
href=
"
#"
>
View details
»
</a></p>
<p><a
class=
"btn btn-default"
href=
"
http://www.yiiframework.com/doc/"
>
Yii Documentation
»
</a></p>
</div>
</div>
<div
class=
"col-lg-4"
>
<div
class=
"col-lg-4"
>
<h2>
Heading
</h2>
<h2>
Heading
</h2>
<p>
Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
euismod. Donec sed odio dui.
</p>
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.
</p>
<p><a
class=
"btn btn-default"
href=
"
#"
>
View details
»
</a></p>
<p><a
class=
"btn btn-default"
href=
"
http://www.yiiframework.com/forum/"
>
Yii Forum
»
</a></p>
</div>
</div>
<div
class=
"col-lg-4"
>
<div
class=
"col-lg-4"
>
<h2>
Heading
</h2>
<h2>
Heading
</h2>
<p>
Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
fermentum massa.
</p>
ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur.
</p>
<p><a
class=
"btn btn-default"
href=
"
#"
>
View detail
s
»
</a></p>
<p><a
class=
"btn btn-default"
href=
"
http://www.yiiframework.com/extensions/"
>
Yii Extension
s
»
</a></p>
</div>
</div>
</div>
</div>
...
...
apps/basic/web/css/site.css
View file @
a602ee0e
body
{
body
{
padding-top
:
20px
;
padding-top
:
70px
;
}
/* Everything but the jumbotron gets side spacing for mobile-first views */
.masthead
,
.body-content
,
.footer
{
padding-left
:
15px
;
padding-right
:
15px
;
}
.masthead
:before
,
.masthead
:after
{
display
:
table
;
content
:
" "
;
}
.masthead
:after
{
clear
:
both
;
}
}
.footer
{
.footer
{
border-top
:
1px
solid
#ddd
;
border-top
:
1px
solid
#ddd
;
margin-top
:
30px
;
margin-top
:
30px
;
padding-top
:
29
px
;
padding-top
:
15
px
;
padding-bottom
:
30px
;
padding-bottom
:
30px
;
}
}
/* Main marketing message and sign up button */
.jumbotron
{
.jumbotron
{
text-align
:
center
;
text-align
:
center
;
background-color
:
transparent
;
background-color
:
transparent
;
...
@@ -35,56 +17,3 @@ body {
...
@@ -35,56 +17,3 @@ body {
font-size
:
21px
;
font-size
:
21px
;
padding
:
14px
24px
;
padding
:
14px
24px
;
}
}
/* Customize the nav-justified links to be fill the entire space of the .navbar */
.nav-justified
{
max-height
:
50px
;
background-color
:
#eee
;
border-radius
:
5px
;
border
:
1px
solid
#ccc
;
}
.nav-justified
>
li
>
a
{
padding-top
:
15px
;
padding-bottom
:
15px
;
color
:
#777
;
font-weight
:
bold
;
text-align
:
center
;
border-left
:
1px
solid
rgba
(
255
,
255
,
255
,
.75
);
border-right
:
1px
solid
rgba
(
0
,
0
,
0
,
.1
);
background-color
:
#e5e5e5
;
/* Old browsers */
background-repeat
:
repeat-x
;
/* Repeat the gradient */
background-image
:
-moz-linear-gradient
(
top
,
#f5f5f5
0%
,
#e5e5e5
100%
);
/* FF3.6+ */
background-image
:
-webkit-gradient
(
linear
,
left
top
,
left
bottom
,
color-stop
(
0%
,
#f5f5f5
),
color-stop
(
100%
,
#e5e5e5
));
/* Chrome,Safari4+ */
background-image
:
-webkit-linear-gradient
(
top
,
#f5f5f5
0%
,
#e5e5e5
100%
);
/* Chrome 10+,Safari 5.1+ */
background-image
:
-ms-linear-gradient
(
top
,
#f5f5f5
0%
,
#e5e5e5
100%
);
/* IE10+ */
background-image
:
-o-linear-gradient
(
top
,
#f5f5f5
0%
,
#e5e5e5
100%
);
/* Opera 11.10+ */
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
startColorstr
=
'#f5f5f5'
,
endColorstr
=
'#e5e5e5'
,
GradientType
=
0
);
/* IE6-9 */
background-image
:
linear-gradient
(
top
,
#f5f5f5
0%
,
#e5e5e5
100%
);
/* W3C */
}
.nav-justified
>
.active
>
a
{
background-color
:
#ddd
;
background-image
:
none
;
box-shadow
:
inset
0
3px
7px
rgba
(
0
,
0
,
0
,
.15
);
}
.nav-justified
>
li
:first-child
>
a
{
border-left
:
0
;
border-top-left-radius
:
5px
;
border-bottom-left-radius
:
5px
;
}
.nav-justified
>
li
:last-child
>
a
{
border-right
:
0
;
border-top-right-radius
:
5px
;
border-bottom-right-radius
:
5px
;
}
/* Responsive: Portrait tablets and up */
@media
screen
and
(
min-width
:
768px
)
{
/* Remove the padding we set earlier */
.masthead
,
.marketing
,
.footer
{
padding-left
:
0
;
padding-right
:
0
;
}
}
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