Comments (4)
I thought about that! I couldn't figure out how to do it. I don't know what I was thinking that day because I tried to define it as a twig array instead of a php one. 😓 I didn't break it out into new lines though (it was only the first few bottom_links
items), and I just thought that it looked too intimidating for a user to configure, so I dropped the idea.
Actually seeing it fully formatted though, it looks pretty good. I'll definitely switch it to an array. Thanks!
Also, Is there any difference to specifying null
vs just leaving empty quotes?
from notepaper.
Yes and no, I guess it just depends how you check it with php isset
/is_null
and empty
. I stuck a null
there while I was transferring it over to an array because I thought it would override in the theme (and that isn't the path to the themes css file)
I'm glad you like the idea 😄
from notepaper.
Actually, the css_override is a second stylesheet linked (in the html) after the first. If it doesn't exist, it just 404's and there's no real harm. 😄 The default styles are always loaded first, then the override file just contains the items you wish to change. I did it to provide a quick way to change the background or color scheme. For example, I'll probably include this override as an alternate style in the future.
Right now, I'm checking for the override using {% if config.css_override %}
, which returns false with either blank quotes or null. If it is defined but has a bad url, the theme doesn't break, it just uses the default styles. I'll probably continue use blank quotes, as it provides a nice indication to the user of where they should put their info (and prevents them from forgetting the quotes altogether).
Do you think I should provide the config setup in an example file, like sample-config.php
or would this be too confusing? Right now the example site and the readme.md
(which generates the example site) are the only places to find this information. As it stands, it's getting a little unreadable with all the config variables squashed into a small area. I'm thinking I may make that section collapse or break it into another page.
from notepaper.
Done! 9fa2704
Thanks for the tip! 😄 👍
from notepaper.
Related Issues (10)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notepaper.