GithubHelp home page GithubHelp logo

Comments (7)

karfianto avatar karfianto commented on June 15, 2024

When I search the structure, bootstrap is located in golang-server-bootstrap/bootstrap

I've tried to replace the variables
resource_bootstrap_js and resource_bootstrap_css but still no luck.

from golang-fave.

vladimirok5959 avatar vladimirok5959 commented on June 15, 2024

Bootstrap is mounted to binary too, both, CSS and JS.

It will be not easy.
golang-fave/node_modules used only for Cypress testing and nothing more.

To change control panel template you needs to modify this files:
golang-fave/assets/cp.styles.css, golang-fave/assets/cp.scripts.js. Then compile it to golang-fave/assets/cp.styles.css.go and golang-fave/assets/cp.scripts.js.go, and then re-compile application.

This files actually is sources for development:

golang-fave/assets/cp.styles.css
golang-fave/assets/cp.scripts.js

This files used in real-time:

golang-fave/assets/cp.styles.css.go
golang-fave/assets/cp.scripts.js.go

They contains all CSS and JS from different libs to reduce http requests. Bootstarp here too.

from golang-fave.

vladimirok5959 avatar vladimirok5959 commented on June 15, 2024

Or you can just replace JS src here: https://github.com/vladimirok5959/golang-fave/blob/master/assets/tmpl.cp.base.html#L18

This var generate here: https://github.com/vladimirok5959/golang-fave/blob/master/utils/utils.go#L130

If you don't want to use it as mounted resource.

from golang-fave.

karfianto avatar karfianto commented on June 15, 2024

Have tried but still no luck. Is it possible to provide a branch with bootstrap template example?

from golang-fave.

vladimirok5959 avatar vladimirok5959 commented on June 15, 2024

Sorry, this is hobby project for me, my wife and some several peoples web-sites. Currently I am woks at full-stuck time. Can work on this only on holidays or after work if I have some energy... So, if it will be still actually for you, I will make some example after 4-5 hours.

Don't forgot to recompile app after some changes, it's not like PHP. Take a look here: https://github.com/vladimirok5959/golang-fave/blob/master/assets/tmpl.cp.base.go , this is compiled HTML file, if you edit just this file https://github.com/vladimirok5959/golang-fave/blob/master/assets/tmpl.cp.base.html it will not works. Probably needs to add some auto-compilation in Makefile...

from golang-fave.

vladimirok5959 avatar vladimirok5959 commented on June 15, 2024

Branch: temp/how-to-change-control-panel-css-js
You can review changes here: c86863a

File assets/tmpl.cp.base.go just unwrapped, actually I added only 2 lines:

<link rel="stylesheet" href="/assets/cp/sb-admin-2/styles.css">
<script src="/assets/cp/sb-admin-2/scripts.js"></script>

Run make in root project folder, and you will be able to access new files by links:

http://localhost:8080/assets/cp/sb-admin-2/styles.css
http://localhost:8080/assets/cp/sb-admin-2/scripts.js

BTW: I review, SB Admin 2 demo, it's not usable by mobile phones where screen width is 240-280 pixels. It's will be a hard work to rework all CP for new components. Popup messages, dialogs, ajax actions, places for images and etc.. I don't see a reason for this. Looks like there are only CSS is used. So, if something is needs, you can just copy to main control panel CSS file and all... (this is how I would do).

CP forms HTML code here:

engine/builder/*.go

CP base HTML code here:

assets/tmpl.cp.base.html
assets/tmpl.cp.base.go

from golang-fave.

karfianto avatar karfianto commented on June 15, 2024

Hi, @vladimirok5959 that's cool and very useful.

Really appreciate it.

from golang-fave.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.