How to easily implement another CSS-Framework

81 views
Skip to first unread message

Jay B

unread,
Oct 11, 2019, 1:38:52 AM10/11/19
to web2py-users
Hello guys,

I'm trying to figure out how to include another CSS framework instead of bootstrap. But the fact that the layout.html and other files point to the bootstrap files makes it harder than I thought.

I would like to test other CSS frameworks like Semantic UI or Bulma instead of Bootstrap and wonder how to do it best. Or am I forced to delete all CSS files and standard views?

I would be happy if you could help me and thank you in advance for all the tips.

Greetz
Jay

Ruslan Gareev

unread,
Oct 11, 2019, 1:01:07 PM10/11/19
to web2py-users
Hi. Yes, you can delete files. For me it's normal and i use that way in my projects.

пятница, 11 октября 2019 г., 10:38:52 UTC+5 пользователь Jay B написал:

Jay B

unread,
Oct 12, 2019, 9:34:23 AM10/12/19
to web2py-users
So, do you delete all views or just the layout view?

Massimo Di Pierro

unread,
Oct 12, 2019, 12:54:56 PM10/12/19
to web2py-users
I'd say you don't delete anything. You edit the views that need to be deleted to deal with a different css like you would for any html page

Alex Beskopilny

unread,
Oct 14, 2019, 4:04:16 AM10/14/19
to web2py-users
1:
views/default/myindex.html
<HTML>
<HEAD>
<TITLE>Mysite</TITLE>
</HEAD>
<BODY BGCOLOR="yellow">
 <p> myown unique  page with my_css</p>
{{=message}}
</BODY>
</HTML>

2:
def index():
    response.view = 'default/myindex.html'
    return dict(message=T('Welcome to web2py!'))


пятница, 11 октября 2019 г., 8:38:52 UTC+3 пользователь Jay B написал:

Ruslan Gareev

unread,
Oct 14, 2019, 4:42:12 AM10/14/19
to web...@googlegroups.com
In newly created application there are a few views, so you can modify them as you want.
If i use any theme, with no difference bootstrap or other framework, i delete all css and js files in default application and then copy files from my theme.
So layout.html wil be fully rewritten.

there are some screenshots from my last project:https://postimg.cc/gallery/31vpbmqv2/

суббота, 12 октября 2019 г., 18:34:23 UTC+5 пользователь Jay B написал:
Reply all
Reply to author
Forward
0 new messages